Telephony
Twilio and Telnyx
Inbound webhook and stream bridge behavior in `voice/server`.
Twilio and Telnyx
Telephony ingress is handled by voice/server.
Inbound Webhooks
POST /telephony/twilio/incoming/{agent_id}POST /telephony/telnyx/inbound/{agent_id}
On webhook receive, the server:
- Parses
agent_idfrom URL path - Loads active agent/runtime config from Postgres
- Registers a runtime session and signs a token
- Returns TwiML/TeXML containing stream URL
Stream Endpoints
GET /telephony/twilio/stream/{session_id}/{token}GET /telephony/telnyx/stream/{session_id}/{token}
These are path-based to avoid websocket query-string stripping by edge proxies.
Browser Voice Sessions
For non-telephony testing:
POST /voice/session/{agent_id}
This returns a websocket URL and token for browser clients.
Required Settings
Configure voice_server_url in /api/settings/telephony so webhooks and stream URLs resolve correctly.