Connect Exotel SIP trunking to Rapida AI
This guide aligns Exotel with Rapida AI for voice assistants. Rapida documents two relevant patterns:
GitHub repo (reference): https://github.com/exotel/AgentStream-VoiceAIEcosystem
Applicability: Hybrid — UI-driven native Exotel integration (webhook/streaming) OR SIP-driven SIP trunk path.
- Native Exotel integration — Exotel app / Flow calls Rapida’s webhook + bidirectional media stream (no Exotel SIP trunk API required for this path).
- SIP trunk — Exotel as SIP carrier (SIP trunking) ↔ Rapida’s SIP server at sip-01.in.rapida.ai:5060 — same trunk / credentials / destination-uris patterns as other articles in this repo.
Primary Rapida reference: Exotel integration · SIP trunk integration · Phone deployment
Engineering detail: rapida/integrations/exotel-vsip/rapida-exotel-voice-ai-connector.md
Quickstart: rapida/integrations/exotel-vsip/QUICKSTART.md
Choose a path
Path | Best when | Exotel work | Rapida work |
|---|---|---|---|
A — Native Exotel | You want Rapida’s documented streaming integration | Configure App / Flow webhook to Rapida; assign DID | Integration → Tools → Exotel credentials; Phone deployment with App ID + number |
B — SIP trunk (SIP trunking) | You need SIP toward Rapida from Exotel (or digest toward Exotel for outbound) | Create trunk → map DID → credentials; destination-uris toward Rapida SIP host; Connect sip:<trunk_sid> | SIP Trunk credential + Phone deployment with SIP as provider |
If you use Path A, you may not need POST …/trunks at all — follow Rapida’s Exotel guide first.
Path A — Native Exotel (webhook + media stream)
From Rapida — Exotel:
Rapida — credentials
- Integration → Tools → Exotel → Setup Credential.
- Fields (per Rapida): Account SID, Client ID, Client Secret — sourced from the Exotel dashboard (API / app settings).
- Exotel India often labels credentials API Key and API Token; map them to whatever Rapida’s form expects (Exotel API credentials for India).
Rapida — phone deployment
- Assistant → Deploy → Phone.
- Telephony: provider Exotel, select credential, Phone number (Exotel virtual number), App ID (Exotel applet / flow id that will hit Rapida).
Exotel — applet / Flow
Set the inbound URL Rapida documents (replace placeholders):
Assign your Exotel number to this app. Confirm the exact hostname and path in Rapida’s Exotel guide if it changes.
Outbound
Use Rapida SDK or REST (POST https://api.rapida.ai/v1/talk/call) — examples in Rapida — Exotel.
Path B — Exotel SIP trunking + Rapida SIP trunk
From Rapida — SIP trunk:
Rapida SIP endpoint (for routing to Rapida)
Transport UDP or TCP; codecs G.711 PCMU (preferred) / PCMA. Allow RTP per Rapida + your firewall docs.
Exotel — inbound PSTN → Rapida
- Create trunk → map DID → (optional) POST …/credentials if your design requires digest on the Exotel side.
- POST …/destination-uris toward Rapida, e.g.:
- Flow → Connect: Dial whom = sip:<trunk_sid> (Voice AI / SIP trunking).
Rapida — SIP trunk credential
Integration → Tools → SIP Trunk: set SIP URI to your Exotel edge IP:port (and digest if used) for outbound from Rapida toward Exotel — mirror ElevenLabs-style termination. Use Exotel network and firewall for edge values.
Optional Exotel ACL: POST …/whitelisted-ips only if Rapida publishes fixed static SIP egress IPs to allow — one IP per POST, mask: 32 (Exotel trunk does not support arbitrary CIDR ranges).
Exotel SIP trunk API Reference for Voice AIShared Exotel curls
Troubleshooting
Symptom | What to check |
|---|---|
Inbound never hits Rapida (Path A) | Webhook URL, assistant id, x-api-key, number linked to correct app |
SIP failures (Path B) | sip-01.in.rapida.ai reachability, UDP/TCP, codec; destination-uris format |
Outbound fails | Rapida credential + deployment; from number is your Exotel DID |
Connect misrouted | sip:<trunk_sid> only in Dial whom (Path B) |
References
Resource | URL |
|---|---|
Rapida — Exotel | https://doc.rapida.ai/integrations/telephony/exotel |
Rapida — SIP trunk | https://doc.rapida.ai/integrations/telephony/sip |
Rapida — Phone deployment | https://doc.rapida.ai/voice-deployment-options/phone |
Rapida — Credentials | https://doc.rapida.ai/credential/rapida-credentials |
Rapida — Overview | https://doc.rapida.ai/introduction/overview |
Exotel SIP API | https://docs.exotel.com/dynamic-sip-trunking/detailed-sip-trunking-api-reference |