Skip to main content

Exotel Virtual SIP Trunking -- TCP (Mumbai) -- Customer Integration Guide

This guide provides enterprise customers with technical steps to integrate Exotel's Virtual SIP Trunking (vSIP) with your PBX, SIP server, or SBC over TCP via the Mumbai PoP. It outlines configuration practices, header formats, best practices, and validation techniques.

Alpha Release

This Alpha release is intended for controlled pilots and is not SLA-backed for production workloads.

Product Overview​

Exotel's Virtual SIP Trunking (Alpha) allows secure SIP-based PSTN call origination and termination between your SIP infrastructure and Exotel's platform using IP authentication.

ParameterValue
Call TypePSTN <-> SIP Gateway Interconnect
TransportSIP over TCP (Port 5070)
MediaRTP over UDP (Ports 10000-40000)
AuthenticationIP Whitelisting (Registration-based auth not supported)
Edge LocationMumbai PoP (India)
vSIP Throttling

Exotel enforces a default vSIP rate-limit of 200 calls per minute (CPM) per trunk to safeguard carrier capacity and call quality.

If your traffic profile requires a higher burst rate, raise a request via your CSM or Support ticket. The capacity-planning team will review historical traffic, carrier limits, and QoS requirements and can increase the throttling threshold accordingly.

Required Configuration​

IP Whitelisting​

  • Your static public IP must be whitelisted by Exotel.
  • Registration (SIP REGISTER) is not supported.

Ports to Open​

TypePort RangeProtocolPurpose
Signaling5070TCPSIP signaling
Media10000-40000UDPRTP streams

SIP Domain and Proxy Details​

Media Server PoP

RegionMedia IPs
Mumbai DC182.76.143.61, 122.15.8.184
KA DC14.194.10.247, 61.246.82.75

Signaling Server PoP

RegionProxy FQDN
Mumbai DCpstn.in2.exotel.com
Mumbai Cloudpstn.in4.exotel.com

Use this proxy for configuring Exotel as a peer/trunk on your SBC or PBX.

Sample Configuration -- Asterisk PBX​

[general]
externip = <your_public_ip>
localnet = 192.168.0.0/16

[exotelvsip]
type = friend
context = incoming
fromdomain = <accountsid>.pstn.exotel.com
host = pstn.in2.exotel.com
port = 5070
transport = tcp
disallow = all
allow = alaw
allow = ulaw
nat = force_rport
insecure = port
canreinvite = no
sendrpid = yes
trustrpid = yes
relaxdtmf = yes

SIP Message Format​

A. INVITE from Exotel Trunk (Exotel to Customer)​

This is triggered when Exotel routes an inbound call to the customer SIP gateway over TCP.

Sample SIP INVITE​

INVITE sip:+91XXXXXXXXXX@<customer-ip>:5061;transport=tcp SIP/2.0
Record-Route: sip:<exotel-ip>:443;transport=tls;lr
Via: SIP/2.0/TCP <exotel-ip>:443;branch=z9hG4bK2414...
From: "+91AAAAAAAAAA" <sip:+91AAAAAAAAAA@exotelt.pstn.exotel.com>;tag=as2aefddf2
To: <sip:+91XXXXXXXXXX@<customer-ip>>
Call-ID: <UUID>@pstn.mum1.exotel.com
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
X-Exotel-LegSid: <leg-id>
X-Exotel-CallSid: <call-id>
X-Exotel-TrunkSid: <trunk-id>
P-Asserted-Identity: <sip:+91AAAAAAAAAA@exotelt.pstn.exotel.com>
P-Early-Media: supported
Contact: <sip:+91AAAAAAAAAA@<public-ip>:port;transport=tcp>
Content-Type: application/sdp
Content-Length: 1168
Max-Forwards: 67

v=0
o=root 1683048786 1683048786 IN IP4 <exotel-media-ip>
c=IN IP4 <exotel-media-ip>
t=0 0
m=audio 37456 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=sendrecv
a=rtcp:37457
a=ptime:20

Header Reference -- INVITE from Exotel​

HeaderMandatoryDescription
Request URIYesDestination SIP URI (Exophone mapped to customer SIP IP)
ViaYesRouting path for SIP responses. Uses TCP in this case
Record-RouteOptionalEnsures Exotel remains in signaling path for subsequent requests
FromYesCaller party number (CLI) received by Exotel (e.g., end-user)
ToYesExophone provisioned by Exotel for this customer
Call-IDYesUnique identifier for the call
CSeqYesCommand sequence number, must increment with each new transaction
AllowYesList of SIP methods supported by Exotel
SupportedOptionalSIP extensions like replaces, timer
X-Exotel-CallSidYesUnique ID for the call session (tracking/debugging)
X-Exotel-LegSidOptionalCall leg identifier; unique to this direction of the call
X-Exotel-TrunkSidOptionalIdentifies which virtual SIP trunk was used
P-Asserted-IdentityOptionalValidated caller ID presented to customer SIP server
P-Early-MediaOptionalIndicates support for early media before call is answered
ContactOptionalWhere Exotel can be reached for further in-dialog SIP messages
Content-TypeYesIndicates media description follows (SDP)
Content-LengthYesLength of the SDP body
Max-ForwardsYesPrevents infinite loops by limiting hop count
SDP (v=...)YesContains RTP setup: IP, codecs (PCMA/PCMU), RTP/DTMF, etc. (unencrypted RTP)

B. INVITE to Exotel Trunk (Customer to Exotel)​

Customer initiates an outbound call over TCP, using a registered Exophone as the CLI and targeting any mobile/landline via Exotel.

Sample SIP INVITE​

INVITE sip:+91YYYYYYYYYY@<exotel-ip>:5070 SIP/2.0
Via: SIP/2.0/TCP <customer-ip>:5061;branch=z9hG4bKbK4041f853
Max-Forwards: 70
From: "+91XXXXXXXXXX" <sip:+91XXXXXXXXXX@exotelt.pstn.exotel.com>;tag=as63e4d7f1
To: <sip:+91YYYYYYYYYY@<exotel-ip>>
Contact: <sip:+91XXXXXXXXXX@<customer-ip>:5061;transport=tcp>
Call-ID: <UUID>@exotelt.pstn.exotel.com
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 371

v=0
o=root 1002281923 1002281923 IN IP4 <customer-media-ip>
c=IN IP4 <customer-media-ip>
t=0 0
m=audio 18232 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

Header Reference -- INVITE to Exotel​

HeaderMandatoryDescription
Request URIYesFinal destination number (callee) to be dialed via Exotel trunk
ViaYesDescribes how to return SIP responses to customer (over TCP)
FromYesCLI being used -- must be a valid Exophone registered with Exotel
ToYesDestination number (callee, Called Party Number); not used for routing
Call-IDYesUnique identifier for the call session
CSeqYesSIP sequence number and method (e.g., INVITE)
ContactOptionalWhere Exotel can reach back for in-dialog requests
AllowYesMethods supported by customer
SupportedOptionalSIP extensions
Content-TypeYesMIME type of message body (SDP)
Content-LengthYesByte length of SDP content
Max-ForwardsYesUsed to control and limit SIP hops
SDP (v=...)YesMedia negotiation block, including codecs and ports. RTP only (unencrypted)

CLI and Exophone Roles​

DirectionFrom (CLI)Request URI (Destination)Notes
Exotel to YouCustomer's end-user CLIYour SIP URI (Exophone)Used in inbound flows to your system
You to ExotelYour Exophone (CLI)Final user number to dialMust use registered CLI in From, else call will be rejected

Best Practices and Pre-checks​

Before Configuration​

  • Confirm you have a static public IP with no CG-NAT or port masking
  • Make sure your firewall allows TCP 5070 and UDP 10000-40000 bidirectionally
  • Validate that your PBX/SBC supports SIP over TCP and G.711 codecs (PCMA/PCMU)

During Configuration​

  • Prefer PCMA as the first codec in media negotiations; PCMU as fallback
  • Disable registration and use static peer trunking
  • Use nat=force_rport for NAT traversal if behind a firewall
  • Monitor and log Call-ID, X-Exotel-* headers for debugging

After Configuration​

  • Run test calls and inspect SIP INVITEs and RTP
  • Monitor audio quality, latency, and early media (ringback)
  • Use tcpdump or sngrep to validate SIP dialogues and media ports
Quick Sanity Checks
  • Transport match -- your Via: ...;transport=tcp must align with port 5070
  • Caller-ID hygiene -- the From: number in your outbound INVITE must be an authorised CLI/Exophone
  • Log Exotel headers -- X-Exotel-CallSid, LegSid, TrunkSid are read-only but invaluable for troubleshooting

How to Test Your Setup​

Inbound Test (Exotel to Your SIP Server)​

  1. Trigger a call to your Exotel VN mapped to the SIP trunk
  2. Check if your server receives an INVITE from pstn.in2.exotel.com
  3. Confirm RTP is flowing from 182.76.143.61 or 122.15.8.184

Outbound Test (Your Server to Exotel)​

  1. Send a SIP INVITE to pstn.in2.exotel.com:5070 with the To URI set to a valid destination (e.g., mobile number)
  2. Ensure correct formatting of headers and the contact field
  3. Look for 100/180/200 OK responses and RTP flow

Troubleshooting​

IssuePotential CauseResolution
No INVITE receivedIP not whitelistedContact Exotel to confirm IP ACL
Call drops in 30sNAT binding lostEnable symmetric RTP / force_rport
One-way audioMedia ports blockedOpen UDP 10000-40000
403 ForbiddenIncorrect domain or authUse correct fromdomain and no auth creds

Support and Next Steps​

This guide covers Exotel vSIP over TCP via the Mumbai PoP under the Alpha release. Production deployment readiness (with TLS, SRTP, failover, dashboards) will be announced during the GA phase.

For support:

  • Contact your Exotel account manager
  • Or raise a ticket via support.exotel.com with:
    • Account SID
    • Call time and number
    • SIP trace logs (.pcap or .txt)