Skip to main content
The assistant-api supports five telephony providers. Each is identified by a string constant defined in api/assistant-api/internal/channel/telephony/telephony.go.

Provider Comparison

Twilio, Vonage, and Exotel are cloud providers — they call your server. You need PUBLIC_ASSISTANT_HOST set to a public HTTPS hostname (use ngrok locally).Asterisk AudioSocket and WebSocket run on your own PBX — Asterisk connects out to Rapida.SIP is a built-in server in assistant-api — any SIP client can call it directly.

URL Routing Pattern

All telephony paths follow this structure (source: api/assistant-api/internal/type/telephony.go):
The contextId is created on the first webhook hit and binds the conversation to a provider session. It is stored in PostgreSQL with the assistant ID, conversation ID, and auth token.

Inbound Call Flow


What’s Next

Running with a Provider

Step-by-step setup for Twilio, Vonage, Exotel, Asterisk AudioSocket, Asterisk WebSocket, and SIP.

Adding a New Provider

Implement the Telephony interface and register a new provider in the factory.

ngrok — Local Testing

Expose your local Rapida instance to Twilio, Vonage, and Exotel for development.

Configuration

All env vars: PUBLIC_ASSISTANT_HOST, SIP, AudioSocket, and more.