---
title: Exotel SIP Trunking – Quick Start
slug: dynamic-sip-trunking/exotel-sip-trunking-quick-start
description: Master Exotel SIP Trunking with this comprehensive guide, covering setup for outbound and inbound calls, configuration requirements, and essential troubleshooting steps.
docTags: 
createdAt: 2026-01-24T08:43:09.051Z
---

This guide helps you make your **first outbound and inbound call** using Exotel SIP Trunking.

By the end of this guide, you will:

- Make outbound calls from your SIP system to PSTN
- Receive inbound calls from PSTN to your SIP system

## Prerequisites

- Create or use [Exotel account](https://my.in.exotel.com/auth/register)
- Completed [KYC](https://docs.exotel.com/business-phone-system/kyc-verification)
- [API credentials](https://my.in.exotel.com/apisettings/site#api-credentials)
- At least one [Exophone](https://my.in.exotel.com/numbers) (DID)
- SIP system (PBX / SBC / Contact Center) with:
  - Public static IP/Credentials
  - SIP over TLS or TCP enabled
  - refer [Network & Firewall Configuration](docId\:qi8949Q_mZWt0daKM4zQH)&#x20;

You will need:

- API Key
- API Token
- Account SID

## Step 1: Create SIP Trunk

Create a logical SIP trunk.

```curl
curl -s -X POST "https://<api_key>:<api_token>@<subdomain>/v2/accounts/<account_sid>/trunks" \
  -H "Content-Type: application/json" \
  -d '{
    "trunk_name": "my_trunk",
    "nso_code": "ANY-ANY",
    "domain_name": "<account_sid>.pstn.exotel.com"
  }'
```

Save the trunk\_sid.

## Step 2: Map Phone Number to Trunk

Associate your Exophone (DID) with the trunk.

```curl
curl -s -X POST "https://<api_key>:<api_token>@<subdomain>/v2/accounts/<account_sid>/trunks/<trunk_sid>/phone-numbers" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+919876543210"
  }'
```

- Default mode is pstn
- Save the numeric id from the response

## Step 3(a): Map ACL for Outbound SIP(Whitelist IPs)

This is required for **Outbound/Termination&#x20;**&#x53;IP - allowing your system to send calls through the trunk.

Use **only** when your Voice AI provider gives a **single static egress IP** that you must allow. **Repeat the call for each distinct static IP** (no CIDR ranges on trunk, or you have a dedicated call server).

Required for:

- Outbound calls
- SIP authentication
- IP-based inbound destinations

```curl
curl -s -X POST "https://<api_key>:<api_token>@<subdomain>/v2/accounts/<account_sid>/trunks/<trunk_sid>/whitelisted-ips" \
  -H "Content-Type: application/json" \
  -d '{
    "ip": "<your_public_ip>",
    "mask": 32
  }'
```

## Step 3(b): Create SIP digest credentials (outbound auth)

POST /v2/accounts/\{ACCOUNT\_SID}/trunks/\{TRUNK\_SID}/credentials

:::BlockQuote
Use the **same** `user_name` and `password` on the Voice AI platform (ElevenLabs SIP digest, LiveKit authUsername / authPassword, Retell termination, etc.).
:::

```curl
curl -s -X POST \
  "https://${API_KEY}:${API_TOKEN}@${SUBDOMAIN}/v2/accounts/${ACCOUNT_SID}/trunks/${TRUNK_SID}/credentials" \
  -H "Content-Type: application/json" \
  -d '{
    "user_name": "SIP_USER",
    "password": "SIP_PASS",
    "friendly_name": "voice_ai_platform"
  }'
```

## Step 4: Map Destination URI for Inbound SIP (Mandatory)

Configures where incoming calls should be routed. This is required for **Inbound/Origination&#x20;**&#x63;alls - routing calls from the telephone network to your system.

This defines the **network endpoint** of the trunk.

### Using IP

(IP must be whitelisted in Step 3)

```curl
curl -s -X POST "https://<api_key>:<api_token>@<subdomain>/v2/accounts/<account_sid>/trunks/<trunk_sid>/destination-uris" \
-H "Content-Type: application/json" \
  -d '{
    "destinations": [
      {
        "destination": "<your_public_ip>:5061;transport=<tls/tcp>"
      }
    ]
  }'
```

### Using FQDN

(No IP whitelist required)

:::CodeblockTabs
curl

```curl
curl -s -X POST "https://<api_key>:<api_token>@<subdomain>/v2/accounts/<account_sid>/trunks/<trunk_sid>/destination-uris" \
  -H "Content-Type: application/json" \
  -d '{
    "destinations": [
      {
        "destination": "sip.yourcompany.com:5061;transport=<tls/tcp>"
      }
    ]
  }'
```
:::

## Step 5: Create Flow for Inbound Calls

Inbound calls are routed through **Exotel Flow**.

1. Go to App Bazaar
   *https\://my.in.exotel.com/apps*
2. Create a new Flow
3. Add **Connect Applet**
4. In **Dial Whom**, enter:

:::BlockQuote
&#x20;     `  sip:<trunk_sid>`
:::

6\.

::Image[]{src="https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/-XxU9FYzPgIy1GqtTPwVm_screenshot-2026-01-24-at-21709apm.png" size="94" width="2940" height="1670" position="center" darkWidth="2940" darkHeight="1670" showCaption="false"}

This connects the Flow to your SIP Trunk.

## Step 6: Map DID to Flow

Bind the Exophone (DID) to the Flow.

1. Go to Exophone Manager
   *https\://my.in.exotel.com/numbers*
2. Select your number or purchase
3. Set Exopone to the Flow created above

Inbound call path is now:

`PSTN → Exotel → DID→ Flow(Connect Applet)→ SIP Trunk → Destination URI → Your SIP system`

## Step 7: Configure SIP System

| **Setting**    | **Value**                       |
| -------------- | ------------------------------- |
| SIP Domain     | \<account\_sid>.pstn.exotel.com |
| Port           |  443 (TLS) or 5070 (TCP)        |
| Transport      | TCP or TLS                      |
| Authentication | IP-based                        |

Ensure RTP ports (UDP 10000–40000) are open.

## Step 8: Test Calls

### Outbound

- Dial any PSTN number from your SIP system

### Inbound

- Call your Exophone from a mobile phone

If both succeed, setup is complete.



## Flow Mode Clarification (Important)

| **Flow Type**                       | **Phone Number Mode** |
| ----------------------------------- | --------------------- |
| Connect Applet (sip:\<trunk\_sid>)  | pstn                  |
| Voicebot / other App Bazaar applets | flow                  |

Destination URI is required **in all cases**.

