---
title: Connect Exotel SIP trunking to Rapida AI
slug: exotel-agentstream/connect-exotel-sip-trunking-to-rapida-ai
createdAt: 2026-04-01T16:32:12.791Z
---

This guide aligns **Exotel** with **Rapida AI** for voice assistants. Rapida documents **two** relevant patterns:

**GitHub repo (reference):** https\://github.com/exotel/AgentStream-VoiceAIEcosystem

:::BlockQuote
**Applicability:** **Hybrid** — **UI-driven** native Exotel integration (webhook/streaming) OR **SIP-driven** SIP trunk path.
:::

1. **Native Exotel integration** — Exotel **app / Flow** calls Rapida’s **webhook + bidirectional media stream** (no Exotel SIP trunk API required for this path).
2. **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.

:::BlockQuote
**Primary Rapida reference:** Exotel integration · SIP trunk integration · Phone deployment
:::

:::BlockQuote
**Engineering detail:** rapida/integrations/exotel-vsip/rapida-exotel-voice-ai-connector.md
:::

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

1. **Integration → Tools** → **Exotel** → **Setup Credential**.
2. 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

1. Assistant → **Deploy** → **Phone**.
2. **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):

:::BlockQuote
https\://websocket-01.in.rapida.ai/v1/talk/exotel/call/&#x7B;your-assistant-id}?x-api-key=&#x7B;your-api-key}
:::

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](https://doc.rapida.ai/integrations/telephony/sip):

### Rapida SIP endpoint (for routing to Rapida)

:::BlockQuote
sip\:sip-01.in.rapida.ai:5060
:::

Transport **UDP** or **TCP**; codecs **G.711 PCMU** (preferred) / **PCMA**. Allow **RTP** per Rapida + your firewall docs.

### Exotel — inbound PSTN → Rapida

1. **Create trunk** → **map DID** → (optional) **POST …/credentials** if your design requires digest on the Exotel side.
2. **POST …/destination-uris** toward Rapida, e.g.:

:::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-01.in.rapida.ai:5060;transport=udp" }
&#x20;   ]
&#x20; }'
:::

1. **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 AI](docId\:jQ98JRRnXtZaUDYoGOdMZ)

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

