Skip to main content

Exotel Virtual SIP Trunking -- FQDN-based

This guide explains how to configure Exotel's Virtual SIP Trunking (vSIP) using Fully Qualified Domain Name (FQDN) based trunking instead of fixed IPs. It details how the FQDN-based approach works, when it should be used, and why it offers benefits in enterprise-grade SIP deployments.

Alpha Release

FQDN-based Virtual SIP Trunking is currently in Alpha. Features may change before General Availability.

Product Overview​

Exotel's FQDN-based Virtual SIP Trunking allows customers to use DNS-resolvable hostnames (e.g., trunk.customer.com) instead of static IPs to establish SIP trunking with Exotel's PoPs. This method enables greater flexibility and reliability, especially for deployments on cloud infrastructure or load-balanced SIP setups.

What is an FQDN-based Trunk?​

An FQDN (Fully Qualified Domain Name) is a domain name that maps dynamically to one or more IPs. In this model:

  • Your SIP gateway/SBC is reachable via a DNS-resolvable FQDN
  • Exotel performs DNS resolution during SIP call setup
  • No static IP whitelisting is required from customer side

Exotel supports both static FQDN and dynamic DNS-based FQDN approaches.

When to Use FQDN Instead of Static IP​

ScenarioRecommendation
SIP infra hosted on cloud (AWS, Azure, GCP)Use FQDN
Customer SBC has load balancer or HA proxyUse FQDN
IP addresses change due to autoscaling/load shiftingUse FQDN
On-prem setup with fixed static IPsUse static IP
tip

FQDN is best suited when your IP address is not guaranteed to remain fixed or you have redundant/public-facing SIP endpoints.

How It Works​

  1. Customer provides an FQDN that resolves to their SBC/public SIP gateway
  2. Exotel adds this FQDN in the trunk configuration
  3. During each SIP call, Exotel queries DNS to resolve the IP
  4. Call is routed based on the returned A/AAAA record(s)
note

Exotel performs DNS resolution on each call attempt to support failover and dynamic environments.

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.

Configuration Requirements​

On Customer Side​

  • Expose SIP server using a public FQDN (e.g., sip.companydomain.com)
  • Ensure DNS A or AAAA records point to valid, routable IP(s)
  • SIP server must be reachable on TCP or TLS as applicable
  • Support G.711 codecs and standard RTP port ranges

On Exotel Side (done by Exotel Ops)​

  • Trunk is configured with FQDN instead of IP
  • DNS lookups are enabled in trunk routing logic
  • Media IP range is kept open as per standard PoP setup

SIP Trunk Parameters (via FQDN)​

Sample Configuration (Asterisk)​

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

[exotelvsip-fqdn]
type = friend
context = incoming
fromdomain = <accountsid>.pstn.exotel.com
host = sip.customerdomain.com
port = 5070 ; or 443 for TLS
transport = tcp ; or tls if using encrypted trunk
disallow = all
allow = alaw
allow = ulaw
nat = force_rport
insecure = port
canreinvite = no
sendrpid = yes
trustrpid = yes
relaxdtmf = yes
encryption = yes ; only if using TLS with SRTP

SIP Parameters Summary​

ParameterExample
SIP Peer FQDNsip.customerdomain.com
Port5070 (TCP) / 443 (TLS)
TransportTCP or TLS
Media IP Range10000-40000 (UDP)
DNS Record TypeA (IPv4) / AAAA (IPv6)

SIP Message Format (FQDN Mode -- TCP Transport)​

A. INVITE from Exotel to Customer via FQDN (Inbound)​

This is how Exotel delivers a call to your SBC or PBX using a public DNS hostname instead of a static IP.

Sample INVITE (Inbound via FQDN)​

INVITE sip:+91XXXXXXXXXX@sip.customer.com:5070;transport=tcp SIP/2.0
Via: SIP/2.0/TCP pstn.in2.exotel.com;branch=...
From: "+91AAAAAAAAAA" <sip:+91AAAAAAAAAA@exotelt.pstn.exotel.com>
To: sip:+91XXXXXXXXXX@sip.customer.com
Call-ID: abcd1234efgh@pstn.mum1.exotel.com
CSeq: 102 INVITE
Contact: sip:+91AAAAAAAAAA@<exotel-media-ip>:port;transport=tcp
X-Exotel-CallSid: <auto-generated-by-exotel>
X-Exotel-LegSid: <leg-id>
X-Exotel-TrunkSid: <trunk-id>
P-Asserted-Identity: sip:+91AAAAAAAAAA@pstn.in2.exotel.com
P-Early-Media: supported
Content-Type: application/sdp
Content-Length: ...

Inbound SIP Header Reference (Exotel to Customer via FQDN)​

HeaderMandatoryDescription
Request URIYesYour registered Exophone and SIP FQDN
ViaYesExotel's signaling IP + transport (TCP)
FromYesCaller CLI (could be real, masked, or Exophone)
ToYesYour PBX's FQDN URI target
Call-IDYesDialog identifier for SIP trace correlation
CSeqYesCommand sequence, starts with INVITE
ContactYesExotel's signaling contact (for BYE, ACK, etc.)
Content-TypeYesapplication/sdp
Content-LengthYesSDP payload length
Max-ForwardsYesLoop control
X-Exotel-CallSidYesExotel's global call ID -- key for webhook/CDR correlation
X-Exotel-LegSidYesCall leg identifier
X-Exotel-TrunkSidYesIdentifies the virtual SIP trunk provisioned to you
P-Asserted-IdentityYesValidated CLI presented by Exotel
P-Early-MediaOptionalIndicates early RTP media (if Exotel connects media pre-200 OK)
Key Takeaways for FQDN Mode
  • DNS resolution -- Exotel resolves your FQDN on every call; keep TTL <= 60s for rapid fail-over
  • Certificates (TLS) -- For secure trunks, your SBC's cert CN/SAN should match the FQDN Exotel is dialing
  • Logging -- Always capture X-Exotel-CallSid + Call-ID to join SIP pcaps with Exotel dashboards

Advantages of FQDN-based Approach​

  • No need for IP whitelisting: Reduces manual ACL changes
  • Supports redundancy: Load balancer IPs can be rotated behind the same FQDN
  • Cloud-friendly: Ideal for cloud-native SIP deployments
  • Failover-friendly: Multiple A-records supported for active/passive routing

Best Practices​

  • TTL for DNS entries should be low (e.g., 30s-60s) for fast failover
  • Use reliable DNS hosting with high availability
  • Ensure SIP firewall rules allow calls from Exotel media IPs
  • Avoid using CNAME records for SIP endpoints (use A/AAAA directly)

Troubleshooting​

IssueCauseFix
Call fails to reach SBCFQDN not resolving or DNS TTL delayUse dig/nslookup to verify resolution
One-way audioMedia ports blockedOpen UDP 10000-40000
Repeated 408 errorsDNS record TTL mismatchReduce DNS TTL and ensure IP is reachable

Support​

For FQDN-based trunk configuration:

  1. Share your FQDN and port with your Exotel account manager
  2. Exotel will provision the trunk using DNS-based routing
  3. Test connectivity using SIPp, sngrep, or call traces

For help: