feros
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:

  1. Parses agent_id from URL path
  2. Loads active agent/runtime config from Postgres
  3. Registers a runtime session and signs a token
  4. 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.

On this page