Vault Credentials
In the Rapida dashboard go to Credentials → Create Credential, select provider type Twilio:| Key | Description |
|---|---|
account_sid | Twilio Account SID (ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) |
account_token | Twilio Auth Token |
Setup
Set PUBLIC_ASSISTANT_HOST
PUBLIC_ASSISTANT_HOST is the public HTTPS hostname Twilio will use to reach your server — for webhooks and the WebSocket media stream.- Production
- Local Development (ngrok)
Set it to your server’s public domain in Also update
docker/assistant-api/.assistant.env:connection.media in ui/src/configs/config.production.json:Configure the Twilio phone number webhook
In Twilio Console → Phone Numbers → Manage → Active numbers, select your number:
Replace
| Field | Value |
|---|---|
| A call comes in | Webhook, HTTP POST |
| URL | https://{PUBLIC_ASSISTANT_HOST}/v1/talk/twilio/call/{assistantId}?x-api-key={apiKey} |
| Status callback URL | https://{PUBLIC_ASSISTANT_HOST}/v1/talk/twilio/ctx/{contextId}/event?x-api-key={apiKey} |
{assistantId} with the numeric assistant ID from the Rapida dashboard.Attach vault credential to the assistant
In the assistant’s Phone Deployment, select the Twilio vault credential you created.
Verify
What Rapida Returns
When Twilio hits the inbound webhook, Rapida responds with TwiML connecting a Media Stream:Outbound Calls
Rapida callsclient.Api.CreateCall via the Twilio Go SDK. The StatusCallback, StatusCallbackEvent, and Twiml are constructed automatically from PUBLIC_ASSISTANT_HOST. No additional configuration is required beyond the vault credential.
Audio Spec
| Property | Value |
|---|---|
| Encoding | μ-law (PCMU) 8-bit |
| Sample rate | 8000 Hz |
| Channels | Mono |
| Transport | Base64-encoded JSON frames (Media Streams spec) |
Vonage
Global PSTN alternative with higher audio quality
Exotel
India / SEA PSTN
Telephony Overview
All providers and URL routing reference
Configuration
Full env var reference