What is a Trunk?
A SIP trunk is a virtual connection that enables your Cloud PBX to make and receive calls through the public telephone network. Think of it as the phone line for your business, but using internet protocol instead of traditional phone lines.
Trunk Types
Your Cloud PBX supports three authentication methods for connecting to SIP providers:
Register Trunk (Most Common)
The PBX registers with the service provider using credentials (username/password). This is like logging into an account.
Best For:
- Most VoIP providers (TheVoĉo Trunking, Twilio, Bandwidth, etc.)
- Dynamic IP addresses
- Standard business setups
How It Works:
- PBX sends registration requests to provider
- Provider authenticates and accepts connections
- Two-way calling enabled after registration
Peer Trunk (IP-Based)
Connection based on IP address whitelisting. No username/password needed - the provider trusts your IP address.
Best For:
- Dedicated circuits or private connections
- Provider requires IP-based authentication
- Static IP addresses
How It Works:
- Provider whitelists your PBX IP address
- Calls are authenticated by source IP
- No registration required
Account Trunk (Enhanced Security)
Similar to Register trunk but supports multiple concurrent registrations. Uses enhanced authentication with auth ID separate from username.
Best For:
- High-security requirements
- Providers requiring separate auth ID
- Multiple simultaneous registrations
How It Works:
- Uses username + separate auth ID
- Supports multiple device registrations
- Enhanced security credentials
Add a Trunk
Navigate to Trunks
Go to Settings > Trunks > Click Add Trunk
Configure Basic Settings
Trunk Identification:
- Trunk Name: Descriptive name (e.g., "TheVoĉo Main Line", "Twilio US", "Emergency Line")
- Trunk Type: Select authentication method
- Register (most common)
- Peer (IP-based)
- Account (enhanced security)
Naming Best Practice
Use descriptive names that identify the provider and purpose (e.g., "TheVoĉo-EU-Main", "Twilio-Support", "Emergency-911").
Server Configuration:
- Host/Server: Provider's SIP server address
- Domain:
sip.provider.com - IP:
192.168.1.100 - IP:Port:
192.168.1.100:5060
- Domain:
Provider Examples:
- TheVoĉo Trunking:
sip.thevoco.com - Twilio: Provided in your console
- Bandwidth:
voice.bandwidth.com
Important
Use the exact host address provided by your SIP provider. Incorrect host settings will prevent trunk registration.
Transport Protocol:
- UDP: Default, best performance, most compatible
- TCP: More reliable, better for unstable networks
- TLS: Encrypted, most secure (requires certificates)
When to Use:
- UDP: Standard setups (recommended)
- TCP: NAT/firewall issues with UDP
- TLS: Security/compliance requirements (HIPAA, financial)
Port Numbers
Standard ports: UDP/TCP = 5060, TLS = 5061. Most providers use these defaults.
Configure Authentication
Registration Credentials (provided by your SIP provider):
- Username: SIP account username
- Password: SIP account password
- Auth ID: Authentication ID (often same as username)
Where to Find These
Your SIP provider sends these credentials when you purchase a trunk. Check your welcome email or provider portal.
Optional Settings:
- From User: Custom "From" field in SIP messages (leave blank to use username)
- From Domain: Custom domain in "From" field (leave blank to use host domain)
Result
Once saved, the PBX will automatically attempt to register with the provider. Check trunk status to verify registration succeeded.
IP Whitelist Configuration:
- Peer IP Address: Provider's SIP server IP address (or multiple IPs)
- No credentials required: Authentication is IP-based
Prerequisites
Before configuring:
- Ensure your PBX has a static public IP address
- Provide your IP to the SIP provider for whitelisting
- Confirm provider has whitelisted your IP
Multiple IP Addresses: If your provider uses multiple servers, add each IP address:
192.168.1.10192.168.1.11192.168.1.12
Failover
Multiple IPs provide automatic failover - if one server is down, the PBX tries the next IP.
Enhanced Authentication Credentials:
- Username: SIP account username
- Password: SIP account password
- Auth ID: Separate authentication identifier (different from username)
Auth ID vs Username
Username: Identifies your account Auth ID: Used for authentication (enhanced security)
Some providers require these to be different for security compliance.
Additional Settings:
- From User: Custom "From" field
- From Domain: Custom domain
- Max Registrations: Number of concurrent registrations allowed (default: 1)
Use Case
Account trunks are ideal when you need multiple devices/PBXs to share the same trunk credentials simultaneously.
Configure Advanced Settings (Optional)
Audio Codecs (in order of preference):
- G.711u (PCMU): Standard, best quality, high bandwidth
- G.711a (PCMA): European standard, same quality as G.711u
- G.729: Compressed, lower bandwidth, slight quality reduction
- Opus: Modern, adaptive, excellent quality
Provider Compatibility
Use codecs supported by your provider. G.711u/a are universally supported. Contact your provider if unsure.
Codec Priority: Drag codecs to reorder priority. The PBX negotiates with the provider, using the first mutually supported codec.
DTMF Mode (Dual-Tone Multi-Frequency - keypad tones):
- RFC2833: Standard, recommended (most common)
- INFO: Alternative method, used by some providers
- Inband: Audio-based, legacy method
Why This Matters
DTMF is used for IVR menus ("Press 1 for Sales"), voicemail PIN entry, and call transfers. Incorrect DTMF settings cause keypresses to not be recognized.
Best Practice: Use RFC2833 unless your provider specifically requires INFO or Inband.
Network Address Translation:
- NAT: Enable if PBX is behind a router/firewall
- External IP: Your public IP address (auto-detected or manual)
- Local Network: Your internal network range (e.g., 192.168.1.0/24)
When to Enable
Enable NAT if:
- PBX is behind a router
- One-way audio issues occur
- Provider cannot reach your PBX
STUN Server (optional):
- Helps PBX discover its public IP address
- Format:
stun.provider.com:3478 - Usually not needed if external IP is configured
Call Limits:
- Max Concurrent Calls: Maximum simultaneous calls (based on your trunk capacity)
- Inbound Calls: Limit concurrent inbound calls
- Outbound Calls: Limit concurrent outbound calls
Setting Limits
Set this to match your trunk subscription:
- 10 channels = 10 max concurrent calls
- Unlimited = 9999 or leave blank
Prevents oversubscription and toll fraud.
Save and Test
Click Save to create the trunk.
Trunk Created
The trunk is now configured. Next, verify the trunk status and test calling.
Verify Trunk Status
Check trunk registration status:
For Register/Account Trunks:
- Go to Settings > Trunks
- Look for Status column
- ✅ Registered: Trunk is connected and ready
- ❌ Registration Failed: Check credentials and host settings
For Peer Trunks:
- Status shows OK if configured correctly
- Verify IP addresses are correct
- Confirm provider whitelisted your IP
Troubleshooting
If registration fails:
- Double-check username/password
- Verify host/server address
- Check network connectivity
- Confirm transport protocol matches provider
- Review provider-specific requirements
Test Calling
Verify the trunk is working:
Outbound Test:
- Configure an outbound route (if not already done)
- Make a test call from an extension
- Verify call connects and audio is clear
Inbound Test:
- Configure an inbound route
- Call your DID/phone number from external phone
- Verify call routes correctly
Success!
If both tests succeed, your trunk is fully operational and ready for production use.
Common Trunk Configurations
TheVoĉo Trunking Configuration:
- Trunk Type: Register
- Host/Server:
sip.thevoco.com - Transport: UDP
- Username: Provided in welcome email
- Password: Provided in welcome email
- Auth ID: Same as username
Additional Settings:
- Codec: G.711u, G.711a, Opus
- DTMF: RFC2833
- NAT: Enable if behind router
Support
Contact TheVoĉo support for trunk provisioning and credentials: [email protected]
Twilio Elastic SIP Trunking:
-
Create Trunk in Twilio Console:
- Go to Elastic SIP Trunking
- Create new trunk
- Note the SIP URI
-
Configure in Cloud PBX:
- Trunk Type: Register
- Host/Server: Your Twilio SIP URI (e.g.,
yourdomain.pstn.twilio.com) - Transport: UDP or TLS
- Username: Your Twilio trunk username
- Password: Your Twilio trunk password
-
Twilio Console Settings:
- Add your PBX IP to Termination IPs
- Configure Origination SIP URI
- Set up phone numbers
Twilio Docs
See Twilio's Elastic SIP Trunking documentation for detailed setup instructions.
Standard SIP Provider Setup:
Required information from your provider:
- ✅ SIP server address (host/domain)
- ✅ SIP username
- ✅ SIP password
- ✅ Auth ID (if different from username)
- ✅ Transport protocol (UDP/TCP/TLS)
- ✅ Supported codecs
- ✅ DTMF mode
Configuration Steps:
- Select trunk type (usually Register)
- Enter host/server address
- Enter credentials
- Select transport protocol
- Configure codecs (use provider's recommendations)
- Set DTMF mode (usually RFC2833)
- Save and verify registration
Provider Support
If you encounter issues, contact your provider's support team with your PBX's public IP address and error messages.
Using Multiple Trunks (Redundancy & Load Balancing):
Scenario 1: Failover
- Primary trunk: Main provider
- Backup trunk: Secondary provider
- In outbound routes, set primary trunk first, backup second
- Automatic failover if primary fails
Scenario 2: Load Distribution
- Trunk A: 10 channels
- Trunk B: 10 channels
- Total capacity: 20 concurrent calls
- Distribute calls across trunks
Scenario 3: Geo-Specific
- Trunk A: US numbers and calling
- Trunk B: European numbers and calling
- Route calls based on destination
Best Practice
Always configure at least one backup trunk for business continuity. Test failover regularly to ensure it works when needed.
Troubleshooting
Trunk won't register?
Common Causes:
- Incorrect credentials: Double-check username, password, auth ID
- Wrong host address: Verify provider's SIP server address
- Network connectivity: Ping the SIP server from PBX
- Firewall blocking: Check firewall allows SIP traffic (port 5060/5061)
- Provider-side issue: Contact provider to verify account status
Diagnostic Steps:
- Review trunk settings for typos
- Check network connectivity to provider
- Verify provider account is active
- Review SIP logs for error messages
- Contact provider support with error details
Account Suspension
Some providers suspend accounts for non-payment or suspicious activity. Verify your account status with the provider.
Can hear caller but they can't hear you (or vice versa)?
Common Causes:
- NAT issues: Enable NAT settings in trunk configuration
- Firewall blocking RTP: Open RTP ports (10000-20000 UDP)
- Incorrect external IP: Verify external IP address setting
- Codec mismatch: Ensure matching codecs with provider
Solutions:
- Enable NAT in trunk settings
- Configure external IP (auto-detect or manual)
- Open firewall ports:
- SIP: 5060-5061 UDP/TCP
- RTP: 10000-20000 UDP
- Set local network range (e.g., 192.168.1.0/24)
- Test with STUN server if issues persist
Quick Test
If one-way audio occurs inconsistently, it's usually a NAT/firewall issue. Enable NAT and configure external IP as first troubleshooting step.
Poor audio quality, choppy calls, or dropouts?
Common Causes:
- Bandwidth limitations: Insufficient internet speed
- Network congestion: Too much traffic on network
- Wrong codec: Using compressed codec with packet loss
- Jitter/latency: Network delay or inconsistency
Solutions:
- Check bandwidth:
- G.711: ~90 Kbps per call
- G.729: ~30 Kbps per call
- Ensure 2x required bandwidth available
- Implement QoS (Quality of Service):
- Prioritize VoIP traffic on router
- Set DSCP marking to EF (46)
- Use better codec:
- G.711 for LAN/high bandwidth
- Opus for adaptive quality
- Test network:
- Run speed test
- Check ping to SIP server (<50ms ideal)
- Test for packet loss (<1% acceptable)
QoS Best Practice
Always implement QoS on your router to prioritize VoIP traffic. This dramatically improves call quality, especially during peak network usage.
Can't make outbound calls?
Common Causes:
- No outbound route configured: Need to create outbound route
- Extension lacks permission: User not assigned to route
- Trunk not selected in route: Route doesn't include trunk
- Invalid dial pattern: Number doesn't match route pattern
- Trunk capacity exceeded: All channels in use
Diagnostic Steps:
- Verify outbound route exists: Settings > Outbound Routes
- Check dial pattern: Ensure number matches pattern
- Verify trunk selection: Route includes the trunk
- Check extension permissions: User allowed on route
- Test with different number: Try local, long distance, mobile
- Review call logs: Check for error messages
Quick Fix
Most "no outbound" issues are routing problems, not trunk issues. Verify outbound route configuration first before troubleshooting the trunk.
Best Practices
Trunk Management Recommendations
Follow these best practices for reliable, secure trunk operation.
Security
- Use strong passwords: Random 16+ character passwords for SIP credentials
- IP restrictions: Limit trunk access to known IP addresses when possible
- Enable TLS: Use encrypted transport for sensitive industries
- Monitor usage: Set up alerts for unusual call patterns
- Call limits: Configure max concurrent calls to prevent fraud
Reliability
- Multiple trunks: Always configure backup trunk for failover
- Capacity planning: Size trunks for peak usage + 20% buffer
- Regular testing: Test failover monthly
- Monitor status: Set up alerts for trunk registration failures
- Provider diversity: Use different providers for primary/backup
Performance
- Codec selection: Use G.711 for best quality, G.729 for bandwidth savings
- QoS configuration: Implement network QoS for consistent quality
- Local optimization: Choose geographically close SIP servers
- Bandwidth planning: Allocate sufficient bandwidth (100 Kbps per G.711 call)
- Network monitoring: Track jitter, latency, packet loss
Documentation
- Document credentials: Store trunk credentials in secure password manager
- Provider contacts: Keep provider support contacts handy
- Configuration backup: Export trunk configurations regularly
- Incident log: Document trunk issues and resolutions
- Change tracking: Note all trunk configuration changes