Build an AI voice bot like an Express app


The dialpress Node SDK turns SIP into routes and handlers. Here is a PBX and an AI voice bot that share one gateway — and pass calls between them.
If you can write an Express app, you can run a phone system. npm install dialpress, connect to the gateway over gRPC, and every SIP request arrives at a path chosen by the dial plan.
Routes, not state machines
app.register answers phones that sign in. app.message proxies texts to the extension. app.invite dials the extension and sends a 486 when it is busy. Middleware, params, Router() and error handlers work the way they do in Express 5.
The bot is another app
An AI bot connects with pathPrefixes: ['/ai'] and claims those calls. It answers, opens res.media() for the call’s audio, feeds the caller’s PCM to speech recognition, and plays its text-to-speech back in real time — calling clear() when the caller interrupts.
Handoffs keep the call alive
The PBX hands an inbound caller to the bot with res.handoff('/ai/front-desk'). When the caller presses 0, the bot hands the same call back to a person with a summary of what was said. Same call ID, no transfer, no dropped audio.
Fork it
The SDK ships with examples — an echo bot, a messaging bot, SIP to SMS, SIP to email — and a local simulator. Fork one, point it at your gateway, and your stack is on the phone network.
Field notes
Keep reading
SIP vs WebRTC for AI voice agents
SIP reaches every phone number on earth; WebRTC reaches every browser. A production voice agent needs both — here is how they fit together.

Giving voice agents tools with MCP
Your booking system, your CRM, your order lookup — any API can become a voice agent’s tool without writing a line of agent code.

Why voice AI needs its own stack
A voice agent is only as good as the call it rides on. Why we built the SIP server, media path, speech, and agent runtime as one stack.
