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.
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​
| Scenario | Recommendation |
|---|---|
| SIP infra hosted on cloud (AWS, Azure, GCP) | Use FQDN |
| Customer SBC has load balancer or HA proxy | Use FQDN |
| IP addresses change due to autoscaling/load shifting | Use FQDN |
| On-prem setup with fixed static IPs | Use static IP |
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​
- Customer provides an FQDN that resolves to their SBC/public SIP gateway
- Exotel adds this FQDN in the trunk configuration
- During each SIP call, Exotel queries DNS to resolve the IP
- Call is routed based on the returned A/AAAA record(s)
Exotel performs DNS resolution on each call attempt to support failover and dynamic environments.
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​
| Parameter | Example |
|---|---|
| SIP Peer FQDN | sip.customerdomain.com |
| Port | 5070 (TCP) / 443 (TLS) |
| Transport | TCP or TLS |
| Media IP Range | 10000-40000 (UDP) |
| DNS Record Type | A (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)​
| Header | Mandatory | Description |
|---|---|---|
| Request URI | Yes | Your registered Exophone and SIP FQDN |
| Via | Yes | Exotel's signaling IP + transport (TCP) |
| From | Yes | Caller CLI (could be real, masked, or Exophone) |
| To | Yes | Your PBX's FQDN URI target |
| Call-ID | Yes | Dialog identifier for SIP trace correlation |
| CSeq | Yes | Command sequence, starts with INVITE |
| Contact | Yes | Exotel's signaling contact (for BYE, ACK, etc.) |
| Content-Type | Yes | application/sdp |
| Content-Length | Yes | SDP payload length |
| Max-Forwards | Yes | Loop control |
| X-Exotel-CallSid | Yes | Exotel's global call ID -- key for webhook/CDR correlation |
| X-Exotel-LegSid | Yes | Call leg identifier |
| X-Exotel-TrunkSid | Yes | Identifies the virtual SIP trunk provisioned to you |
| P-Asserted-Identity | Yes | Validated CLI presented by Exotel |
| P-Early-Media | Optional | Indicates early RTP media (if Exotel connects media pre-200 OK) |
- 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-IDto 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​
| Issue | Cause | Fix |
|---|---|---|
| Call fails to reach SBC | FQDN not resolving or DNS TTL delay | Use dig/nslookup to verify resolution |
| One-way audio | Media ports blocked | Open UDP 10000-40000 |
| Repeated 408 errors | DNS record TTL mismatch | Reduce DNS TTL and ensure IP is reachable |
Support​
For FQDN-based trunk configuration:
- Share your FQDN and port with your Exotel account manager
- Exotel will provision the trunk using DNS-based routing
- Test connectivity using SIPp,
sngrep, or call traces
For help:
- Contact support.exotel.com with FQDN, DNS setup, and logs