Skip to main content

Exotel Virtual SIP Trunking to Flow Integration Guide

This guide outlines how to integrate Exotel's Virtual SIP Trunking (vSIP) with your voice application flow (e.g., IVR or agent connect) using SIP signaling. It focuses on the use case of routing inbound SIP calls from external SIP systems into Exotel Flow Applets.

Alpha Release

This guide covers the Alpha release of vSIP-to-Flow integration.

Use Case: External SIP System to Exotel Flow​

This guide is meant for customers who:

  • Host their own SIP PBX or Bot Platform
  • Want to initiate SIP calls into Exotel to trigger flows (like Connect or IVR)
  • Require SIP-over-TLS or TCP transport

Example Scenarios​

ScenarioDescription
SIP Bot to Exotel FlowExternal SIP bot initiates call to Exotel VN, Exotel triggers IVR flow
SIP PBX to Exotel FlowSIP endpoint dials into Exotel Flow for agent routing or IVR processing
Regional SIP to Flow (cross-border PoP)Enterprise infra routes call to Exotel PoP (SG/Mum/KA) for flow handling

SIP Integration Requirements​

What You Need to Share with Exotel​

  • Account SID
  • Exophone (VN) that should route to flow
  • Source IP or FQDN from where SIP INVITE will originate
  • Transport type (TCP/TLS)
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.

What Exotel Will Do​

  • Provision SIP trunk mapping on the VN
  • Route incoming INVITE on SIP trunk to your assigned Flow (via Connect Applet)

SIP Configuration Reference (Customer Side)​

Here is an Asterisk-style example for TLS:

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

[exotelvsip]
type = friend
context = outgoing
fromdomain = <accountsid>.pstn.exotel.com
host = pstn.sgp1.exotel.com
port = 443
transport = tls
disallow = all
allow = ulaw
allow = alaw
nat = force_rport
insecure = port
canreinvite = no
sendrpid = yes
trustrpid = yes
relaxdtmf = yes
encryption = yes

Ports to Open​

TypePortProtocolDescription
SIP443 / 5070TLS/TCPSIP signaling
RTP Media10000-40000UDPMedia/audio ports

Sample SIP INVITE to Exotel (Flow Integration)​

INVITE sip:+91XXXXXXXXXX@pstn.sgp1.exotel.com SIP/2.0
Via: SIP/2.0/TLS your-sbc.domain.com:5061;branch=z9hG4bK4041f853
From: "+91YYYYYYYYYY" <sip:+91YYYYYYYYYY@exotelt.pstn.exotel.com>;tag=as63e4d7f1
To: <sip:+91XXXXXXXXXX@pstn.sgp1.exotel.com>
Call-ID: abcdef1234567890@exotelt.pstn.exotel.com
CSeq: 102 INVITE
Contact: sip:+91YYYYYYYYYY@your-sbc.domain.com:5061;transport=tls
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-Exotel-AccountSid: exotelt
Content-Type: application/sdp

Header Reference -- SIP INVITE to Exotel (Flow Integration)​

HeaderMandatoryExampleDescription
Request URIYessip:+91XXXXXXXXXX@pstn.in2.exotel.comTarget Exophone (VN) to route the call into a Flow or PSTN leg
X-Exotel-AccountSidYesExxxxxxIdentifies your Exotel account. Required for Flow integration (Tenant name)
ViaYesSIP/2.0/TLS your-sbc.domain.com:5061Your SBC's transport, used by Exotel to route responses
FromYesCaller numberCLI of Customer (Callee)
ToYesExophone numberExophone
ContactYesYour contact URIYour contact URI for Exotel to send 200 OK, BYE, and other dialog messages
Call-IDYesabc123xyz@your-sbcUnique identifier for SIP session; echoed in Exotel response
CSeqYes102 INVITESIP sequence number
Max-ForwardsYes70Prevents SIP loops by limiting hops
SupportedOptionalreplaces, timerAdvertises SIP extensions your UA supports
AllowOptionalINVITE, ACK, BYE, CANCEL, OPTIONSSIP methods your SBC is willing to process
Content-TypeYesapplication/sdpIndicates the message contains SDP for media negotiation
Important Notes
  • Only use X-Exotel-AccountSid for Flow routing. This is essential for Exotel to associate the call with the correct Flow.
  • Do not add X-Exotel-CallSid, X-Exotel-LegSid, or X-Exotel-TrunkSid. These headers are auto-injected by Exotel in the inbound leg.
  • Ensure your SIP infrastructure handles:
    • G.711 PCMA (preferred codec)
    • SIP over TLS (port 443)
    • SRTP if TLS is enabled

Edge PoPs and IPs to Whitelist​

RegionSIP Proxy FQDNMedia IPs
Karnatakapstn.in1.exotel.com14.194.10.247, 61.246.82.75
Mumbaipstn.in2.exotel.com182.76.143.61, 122.15.8.184
Singaporepstn.sgp1.exotel.com18.142.150.245, 122.248.223.73
KSA (upcoming)coming sooncoming soon

Testing Steps​

  1. Place a SIP INVITE to the Exophone you have been assigned
  2. Confirm that the call lands in the expected flow (e.g., Connect applet rings agent)
  3. Use sngrep, sip set debug on, or Wireshark to validate SIP path
  4. Ensure RTP is established from your system to Exotel's media IP

Best Practices​

  • Ensure Exophone is mapped to a live flow before testing
  • Always share your SIP signaling IP/FQDN and transport in advance
  • Prefer PCMA (G.711 A-law) for better regional PSTN compatibility
  • Use TLS transport when possible to ensure encryption and SRTP
  • Confirm DNS resolves FQDN correctly if not using static IP

Support​

  • Contact your Exotel Account Manager with:
    • Account SID
    • Flow/Exophone ID
    • SIP signaling IP or FQDN
    • Preferred Transport (TCP or TLS)
  • Technical Help: