What Is SIP Trunking
SIP trunking is a voice communication service based on the SIP (Session Initiation Protocol) that connects an enterprise's PBX (Private Branch Exchange) to the public telephone network (PSTN) via IP networks, enabling high-quality international voice calling.
Unlike traditional E1/T1 physical lines, SIP trunking is entirely internet-based and requires no physical line installation. Businesses only need a SIP-compatible PBX (such as Asterisk, FreeSWITCH, or 3CX) and a stable internet connection to quickly activate voice routes covering 200+ countries worldwide.
Key advantages of SIP trunking:
- No physical lines required — deployment time reduced from weeks to days
- Elastic scaling of concurrent channels on demand
- Significantly lower international calling costs — typically 40%-70% savings
- Support for voice, video, and instant messaging media types
- Seamless integration with existing enterprise communication systems
SIP Protocol Stack
To understand the technical foundations of SIP trunking, you need to know the three core protocols behind it:
SIP (Session Initiation Protocol)
SIP is an application-layer signaling protocol responsible for establishing, modifying, and terminating multimedia sessions. It operates at Layer 7 of the OSI model, using UDP port 5060 by default (or TCP/TLS port 5061). SIP handles only "call control" — signaling operations like making calls, answering, and hanging up — and does not involve actual voice data transmission.
Core SIP methods include:
- REGISTER — A terminal registers its location with a SIP server
- INVITE — Initiates a call request, containing SDP session description
- ACK — Confirms call establishment
- BYE — Terminates a call
- CANCEL — Cancels a pending call request
RTP (Real-time Transport Protocol)
RTP handles actual media data transmission, including voice and video streams. It runs over UDP, with ports typically dynamically assigned in the 10000-65535 range. RTP provides end-to-end transport services for real-time data, including payload type identification, sequence numbering, timestamps, and monitoring mechanisms.
Typical RTP bandwidth requirements (including IP/UDP/RTP header overhead of ~40 bytes/packet):
| Codec | Encoding Rate | Packet Interval | Actual Bandwidth (with overhead) |
|---|---|---|---|
| G.711 | 64 kbps | 20ms | ~87.2 kbps |
| G.729 | 8 kbps | 20ms | ~31.2 kbps |
| G.722 | 64 kbps | 20ms | ~87.2 kbps |
| Opus | 6-510 kbps | 20ms | Depends on configuration |
SDP (Session Description Protocol)
SDP is embedded in SIP INVITE and 200 OK messages to describe multimedia session parameters. It tells the other party: which codecs I support, which port I use to receive RTP data, and my IP address. Both parties negotiate through SDP to determine the final codec and transport parameters.
Codec Comparison
Choosing the right codec is a critical decision in SIP trunk deployment. Different codecs make different trade-offs between audio quality, bandwidth, and compatibility:
| Codec | Type | Bitrate | MOS Score | Latency | Compatibility | Best For |
|---|---|---|---|---|---|---|
| G.711 (PCMA/PCMU) | Waveform | 64 kbps | 4.1 | 0.125ms | Universal | High-quality calls, ample bandwidth |
| G.729 (AB) | Parametric | 8 kbps | 3.7 | 15ms | Wide | Bandwidth-constrained, cost-sensitive |
| G.722 | Sub-band ADPCM | 64 kbps | 4.1 | 0.125ms | Wide | HD voice |
| Opus | Hybrid | 6-510 kbps | 4.5+ | 2.5-60ms | Growing | WebRTC, next-gen communications |
| G.726 | Waveform | 16/24/32/40 kbps | 3.5-3.9 | 0.125ms | Moderate | Legacy system compatibility |
Recommendation: For international voice routes, we recommend G.711 (best compatibility) or G.729 (bandwidth savings) as primary choices. For HD voice, choose G.722. Future-oriented systems should also support the Opus codec.
Quality Evaluation Metrics
When evaluating SIP trunk provider quality, focus on these four core metrics:
1. ASR (Answer Seizure Ratio)
ASR = Answered calls / Total call attempts x 100%. This is the core metric for measuring route efficiency. Quality routes typically achieve ASR of 50%-70% (note: ASR is affected by destination country, time of day, number type, and other factors — 100% is unrealistic). ASR below 40% usually indicates a quality problem.
2. ACD (Average Call Duration)
ACD reflects call stability and quality. If calls frequently drop, ACD will be low. For normal enterprise voice communications, ACD is typically 3-6 minutes. If ACD falls below 2 minutes and isn't due to the nature of the business itself, there may be route stability issues.
3. PDD (Post Dial Delay)
PDD is the time from dialing the last digit to hearing ringback tone. Excessive PDD severely impacts user experience. Premium routes should keep PDD under 2 seconds, with a general standard of no more than 5 seconds. Common causes of high PDD include: too many routing hops, cross-carrier transfers, and signaling processing delays.
4. MOS (Mean Opinion Score)
MOS is the standard metric for voice quality, using a 1-5 scale (5 being the highest). Theoretical MOS values for different codecs are: G.711 approximately 4.1, G.729 approximately 3.7, G.722 approximately 4.1. Actual call MOS is also affected by network jitter, packet loss, and other factors. We recommend a minimum MOS of 3.8 for international routes.
SIP Trunk vs Traditional Lines
| Comparison | SIP Trunk | Traditional E1/T1 |
|---|---|---|
| Deployment | Internet-based, no physical lines | Requires physical line installation |
| Deployment Time | 1-3 business days | 15-45 business days |
| Concurrent Capacity | Elastic scaling on demand | Fixed (E1=30 channels, T1=24 channels) |
| Monthly Fee | Usually none or very low | E1 line rental ~2,000-5,000 CNY/line |
| International Rates | Low (IP-based transport) | High (traditional international settlement) |
| Scalability | Quickly add/remove channels | Requires new physical lines |
| Disaster Recovery | Cross-region failover possible | Limited by physical line location |
| Maintenance Cost | Low (software-defined) | Higher (hardware maintenance) |
| Feature Extension | Supports voice, video, messaging | Voice only (some ISDN data support) |
Enterprise Use Cases
Call Centers / Customer Service
Call centers are the primary use case for SIP trunking. Through SIP trunks, businesses can quickly provision local numbers across multiple countries and build a unified global customer service platform. For example, a company operating in Singapore, Malaysia, and Thailand can obtain local DID numbers via SIP trunking, allowing customers to call local numbers while the support team handles calls centrally.
Enterprise PBX Interconnection
Multinational companies can use SIP trunks to connect PBX systems across global offices, achieving free internal calls and unified external routing. Combined with Asterisk or FreeSWITCH Dialplan configuration, intelligent routing and cost optimization are possible.
Unified Communications Platforms
SIP trunking integrates with Microsoft Teams, Cisco WebEx, Zoom Phone, and other unified communications platforms to provide complete enterprise voice solutions.
Voice Notifications / Verification Codes
Many internet companies use SIP trunking for voice verification codes, order notifications, and appointment reminders. These scenarios require high concurrent capacity, making SIP trunking's elastic scaling an ideal fit.
Configuration Guide
Asterisk Configuration Example
Here are the basic steps for configuring a SIP trunk in Asterisk:
; /etc/asterisk/sip.conf
[cainiao-trunk]
type=peer
host=sip.cainiaovoice.com
port=5060
transport=udp
context=from-cainiao
disallow=all
allow=g711
allow=g729
allow=g722
dtmfmode=rfc2833
insecure=port,invite
qualify=yes
qualifyfreq=60
; outbound registration (if required)
register => username:password@sip.cainiaovoice.com:5060/100
; /etc/asterisk/extensions.conf
[from-cainiao]
exten => _X.,1,NoOp(Incoming call from ${CALLERID(num)})
exten => _X.,n,Dial(SIP/1001,30)
exten => _X.,n,Hangup()
[outbound-cainiao]
exten => _X.,1,NoOp(Calling ${EXTEN})
exten => _X.,n,Dial(SIP/cainiao-trunk/${EXTEN})
exten => _X.,n,Hangup()
FreeSWITCH Configuration Example
<!-- /etc/freeswitch/sip_profiles/external/cainiao.xml -->
<include>
<gateway name="cainiao-trunk">
<param name="realm" value="sip.cainiaovoice.com"/>
<param name="username" value="your_username"/>
<param name="password" value="your_password"/>
<param name="register" value="true"/>
<param name="caller-id-in-from" value="true"/>
<param name="ping-interval" value="30"/>
</gateway>
</include>
; Dialplan example
<extension name="outbound-cainiao">
<condition field="destination_number" expression="^(.+)$">
<action application="set" data="effective_caller_id_number=your_did_number"/>
<action application="bridge" data="sofia/gateway/cainiao-trunk/$1"/>
</condition>
</extension>
Security Best Practices
SIP trunking security is a critical consideration. Here are key security measures:
- SIP TLS: Use TLS to encrypt SIP signaling, preventing eavesdropping and tampering. Configure port 5061.
- SRTP: Use SRTP to encrypt RTP media streams, ensuring call content cannot be intercepted.
- IP Whitelisting: Only allow SIP signaling and RTP media from specific IP addresses through the firewall.
- Strong Password Policy: Use random passwords of at least 16 characters, and rotate SIP registration passwords regularly.
- Toll Fraud Prevention: Set call permissions, daily spending limits, and abnormal call alerts.
- DOS Protection: Configure fail2ban or SIP firewalls to automatically block malicious IPs.
- Real-time Monitoring: Monitor for abnormal traffic patterns, such as a sudden surge of international calls.
Cainiao Voice Security: Cainiao Voice's SIP trunking service supports IP whitelist authentication by default, optional SIP TLS + SRTP encryption, and provides real-time traffic monitoring with anomaly alerts to help businesses guard against communication security risks.
Data Sources & References
- Industry Standards: SIP protocol per RFC 3261, RTP per RFC 3550, voice quality assessment per ITU-T P.800 (MOS) and ITU-T G.107 (E-Model).
- Operational Data: ASR, PDD, MOS and other metrics cited are statistical ranges from Cainiao Voice's global route operations and are for reference only. Actual performance varies by country, carrier, and time of day.
- Product Capabilities: Deployment timelines, SLA guarantees, and support descriptions reflect Cainiao Voice's current service offerings.
Frequently Asked Questions
Q: What is the minimum bandwidth required for SIP trunking?
A: Using the G.711 codec, each call requires approximately 87kbps (including overhead). A 100-concurrent call center needs at least ~8.7Mbps of dedicated bandwidth. Using G.729 reduces per-call bandwidth to ~31kbps, requiring only ~3.1Mbps for 100 concurrent channels.
Q: Does SIP trunking require a static IP?
A: A static IP is recommended for IP whitelist authentication, which is the most secure and stable method. If a static IP is not available, SIP registration (username + password) can also be used, though we recommend combining it with dynamic DNS.
Q: How do I migrate from traditional phone lines to SIP trunking?
A: We recommend a three-step approach: 1) Parallel operation — activate SIP trunking while keeping existing lines, gradually shifting some traffic to the new routes; 2) Quality validation — compare call quality metrics between both routes; 3) Full migration — once quality is confirmed, move all traffic to the SIP trunk.
Key Takeaways:
- SIP trunking uses the SIP/RTP/SDP protocol stack to replace traditional physical lines via IP networks
- G.711 offers the best compatibility, G.729 saves the most bandwidth, G.722 provides HD voice, and Opus is future-proof
- Evaluate route quality with 4 metrics: ASR >50%, ACD >3min, PDD <3s, MOS >3.8
- SIP trunking deployment costs 65% less than traditional E1, with 40-70% monthly operational savings
- Security essentials: SIP TLS + SRTP + IP whitelisting
References:
- RFC 3261 - SIP: Session Initiation Protocol (IETF, 2002)
- RFC 3550 - RTP: A Transport Protocol for Real-time Applications (IETF, 2003)
- ITU-T G.107 - The E-Model, a computational model for use in transmission planning (MOS calculation standard)
- ITU-T P.862 - PESQ: Objective voice quality assessment standard
- Gartner, "Market Guide for SIP Trunking Services", 2025
- Frost & Sullivan, "Global SIP Trunking Services Market Forecast", 2025 — Cost savings analysis of SIP trunking vs traditional E1
Need International SIP Trunking?
Cainiao Voice provides professional international SIP trunking services covering 200+ countries with 99.99% SLA guarantee
Get a Free Quote