---
title: Connect Exotel SIP trunking to Retell AI
slug: exotel-agentstream/connect-exotel-sip-trunking-to-retell-ai
createdAt: 2026-04-01T16:35:15.835Z
---

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

:::BlockQuote
**Applicability:** **UI-driven** (Retell dashboard custom telephony) with optional **API-driven** call control.
:::

:::BlockQuote
**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.
:::

:::BlockQuote
**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.
:::

:::BlockQuote
**Full reference:** retell/integrations/exotel-vsip/retell-exotel-voice-ai-connector.md
:::

:::BlockQuote
**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.](https://docs.retellai.com/deploy/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

1. Configure agent; **import** Exotel DID after Exotel trunk exists (Custom telephony).
2. Match **digest** to Exotel POST .../credentials for outbound termination.

## Part B — Exotel APIs

**Auth:** API\_KEY\:API\_TOKEN\@api.in.exotel.com · **200 requests/minute (SIP trunk APIs)** ·&#x20;

[Exotel SIP trunk API Reference for Voice AI](docId\:jQ98JRRnXtZaUDYoGOdMZ)

### Outbound SIP

1. Create trunk
2. Map DID
3. POST .../credentials
4. *(Optional)* whitelisted-ips — **only** for a **static IP** from Retell, mask: 32

### Inbound SIP

POST .../destination-uris — example shape (confirm port/transport with Retell):

:::BlockQuote
curl -s -X POST "https\://$&#x7B;API\_KEY}:$&#x7B;API\_TOKEN}@$&#x7B;SUBDOMAIN}/v2/accounts/$&#x7B;ACCOUNT\_SID}/trunks/$&#x7B;TRUNK\_SID}/destination-uris" \\
&#x20; -H "Content-Type: application/json" \\
&#x20; -d '\{
&#x20;   "destinations": \[
&#x20;     \{ "destination": "sip.retellai.com:5060;transport=tcp" }
&#x20;   ]
&#x20; }'
:::

**Connect:** **sip:\<trunk\_sid>** in Dial whom.

## Dial to SIP URI (alternative)

[Register Phone Call ](https://docs.retellai.com/api-references/register-phone-call)→ dial sip:&#x7B;call\_id}@sip.retellai.com within **5 minutes** — [Method 2.](https://docs.retellai.com/deploy/custom-telephony)

## 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 |

