Give Legacy Linux Devices a Voice A Twilio technical post outlines a proof of concept that adds the open source PJSIP SIP stack to existing Linux-based devices — elevator intercoms, door entry systems, factory terminals and kiosks — and connects them to a Twilio SIP Domain for IVR, PSTN, live agents and Voice AI, without replacing the hardware. The post argues SIP is a better fit than WebRTC for legacy embedded Linux devices that lack a browser or reliable WebRTC runtime, since PJSIP implements SIP, SDP, RTP, STUN, TURN and ICE in C and runs on embedded systems. Calls can flow both ways, letting an operator call back a registered device such as a stalled elevator's intercom. Give Legacy Linux Devices a Voice Time to read: Written by Reviewed by It's 9 p.m. An elevator in an office tower stalls between the 17th and 18th floors. The only person inside is an engineer heading home after a late night. He presses the intercom button. The panel is ten years old, and the security desk it rings went dark hours ago. Now, imagine a different ending: a few seconds after he presses the button, an AI agent picks up. Speaking his language, it asks which floor he's on, how many people are with him, and whether anyone is hurt. Once it's clear he needs help, it transfers the call to a 24/7 monitoring center and sends the elevator's location and a call summary to an on-call operator's browser. Not a single part of that ten-year-old panel had to change. Devices like this one are everywhere: elevator intercoms, door entry systems, factory-floor terminals, and self-service kiosks in hospitals and train stations. Many of them run Linux, have a microphone and a speaker, and sit on a network. Yet most of them can only dial a single hard-coded number, often to a desk that nobody is watching. The hardware is capable enough – what's missing is a bridge to modern communications and AI. Ripping out and replacing these devices is expensive, slow, and disruptive. But now, there's another option: add a standard SIP client to the hardware you already have, and move the voice experience to the cloud. In this post, I'll walk through how it can work . PJSIP, an open source SIP stack, runs on the device, and a Twilio SIP Domain https://www.twilio.com/docs/voice/sip/api/sip-domain-resource connects it to IVR, the PSTN, live agents, and Voice AI. Then I'll share a small proof of concept that you can run today. Let's get started The big idea: let the device speak SIP, let the cloud do the rest toc-heading-685c96d4-bed7-446c-a0df-8a1a58bc8948 Who does what toc-heading-c31e0b57-cf9c-4738-89f4-a300459334ed PJSIP https://docs.pjsip.org/en/latest/overview/intro is an open source multimedia communication library written in C. It implements standard protocols such as SIP, SDP, RTP, STUN, TURN, and ICE, and runs on desktop, mobile, and embedded systems. Rather than squeezing a browser-oriented SDK onto a Linux device, you’ll draw a clear protocol boundary. Every call passes through three layers: - The device PJSIP captures and plays audio, registers with the SIP Domain, sets up calls, streams media, and reconnects after a network drop. - Twilio SIP Domain https://www.twilio.com/docs/voice/sip/api/sip-domain-resource and Programmable Voice https://www.twilio.com/docs/voice/api authenticates the device, accepts the call, and provides the voice building blocks: IVR, PSTN connectivity, live agents, and AI. - Your application logic a Studio Flow https://www.twilio.com/docs/studio , TwiML https://www.twilio.com/docs/voice/twiml , or your own backend decides what happens next. Calls can flow both ways:o nce a device registers with your SIP Domain, you can also call it from the cloud, so an operator can call back the intercom in a stalled elevator or make an announcement on a specific terminal. Why not WebRTC? toc-heading-93f266e3-ce89-4830-ab34-b7eee2cf1b0b WebRTC is a great technology for real-time voice, but it isn't a good fit for every device. Many legacy Linux devices have no browser and no reliable WebRTC runtime. They often combine an old distribution, a custom kernel, an ARM SoC, and a proprietary audio interface. Their CPU, memory, and update process were not designed to run a browser-grade media stack. SIP is already the native language of the phone network, so the choice comes down to practicality : - For browsers and modern apps, WebRTC is usually the natural choice. - For embedded devices, legacy hardware, and anything that needs to talk to the phone network, SIP is usually the more direct path. One SIP connection, four voice experiences toc-heading-b2b2dded-e207-4c2f-9c63-c71b628a2e6f Let's go back to that elevator. Once the call reaches Twilio, it can use any of four capabilities : - IVR self-service. Not every button press is an emergency. On an ordinary day, the same panel can play announcements and let people press a key to report a problem, reach building management, or hear service hours. Menus live in Studio, TwiML, or your backend, so you can update them without touching a single device. - PSTN transfer. In a real emergency, the caller needs a human. With