Connect Exotel SIP trunking to Retell AI
This guide connects Exotel SIP trunking to Retell AI using elastic SIP per Retell custom telephony, with Exotel as the Indian PSTN provider.
GitHub repo (reference): https://github.com/exotel/AgentStream-VoiceAIEcosystem
Applicability: UI-driven (Retell dashboard custom telephony) with optional API-driven call control.
Edge hostnames you may see (India): in.voip.exotel.com:5070 (TCP) and in.voip.exotel.com:443 (TLS). Use the exact host/IP + port + transport Exotel assigns. See _exotel-trunk-api-snippets.md.
ACL vs digest (important): Exotel trunk ACL is intended for static /32 IPs only (mask: 32), not CIDR ranges. If Retell provides CIDR ranges (common), do not attempt to whitelist ranges on Exotel—prefer digest and coordinate with Exotel/provider support if you see auth/routing issues.
Full reference: retell/integrations/exotel-vsip/retell-exotel-voice-ai-connector.md
Quickstart: retell/integrations/exotel-vsip/QUICKSTART.md
Retell (from official docs)
- SIP server: sip:sip.retellai.com with ;transport=tcp (or tls / udp) — Custom telephony.
- Retell publishes IP ranges for carriers to allowlist toward Retell; on Exotel trunk ACL, you can only add static single IPs (mask: 32) per Exotel — not full CIDR ranges on the trunk. If Retell gives ranges, coordinate with Exotel or use digest auth.
Flows
Direction | What to configure |
|---|---|
Outbound SIP | Exotel: create trunk → map DID → credentials. Optional whitelisted-ips only if Retell provides a fixed static egress IP (one IP per POST, mask: 32). |
Inbound SIP | Exotel: destination URI on trunk toward Retell (sip.retellai.com host/port/transport per Retell). Connect applet: sip:<trunk_sid> in Dial whom (value = API trunk_sid, not a full URI). |
Part A — Retell
- Configure agent; import Exotel DID after Exotel trunk exists (Custom telephony).
- Match digest to Exotel POST .../credentials for outbound termination.
Part B — Exotel APIs
Auth: API_KEY:[email protected] · 200 requests/minute (SIP trunk APIs) ·
Outbound SIP
- Create trunk
- Map DID
- POST .../credentials
- (Optional) whitelisted-ips — only for a static IP from Retell, mask: 32
Inbound SIP
POST .../destination-uris — example shape (confirm port/transport with Retell):
Connect: sip:<trunk_sid> in Dial whom.
Dial to SIP URI (alternative)
Register Phone Call → dial sip:{call_id}@sip.retellai.com within 5 minutes — Method 2.
References
Resource | URL |
|---|---|
Retell dashboard | https://dashboard.retellai.com/ |
Retell — custom telephony | https://docs.retellai.com/deploy/custom-telephony |
Retell — quick start | https://docs.retellai.com/get-started/quick-start |
Exotel SIP API | https://docs.exotel.com/dynamic-sip-trunking/detailed-sip-trunking-api-reference |