TheVoĉoTheVoĉo

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

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

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:

  1. Ensure your PBX has a static public IP address
  2. Provide your IP to the SIP provider for whitelisting
  3. Confirm provider has whitelisted your IP

Multiple IP Addresses: If your provider uses multiple servers, add each IP address:

  • 192.168.1.10
  • 192.168.1.11
  • 192.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:

  1. Double-check username/password
  2. Verify host/server address
  3. Check network connectivity
  4. Confirm transport protocol matches provider
  5. Review provider-specific requirements

Test Calling

Verify the trunk is working:

Outbound Test:

  1. Configure an outbound route (if not already done)
  2. Make a test call from an extension
  3. Verify call connects and audio is clear

Inbound Test:

  1. Configure an inbound route
  2. Call your DID/phone number from external phone
  3. 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:

  1. Create Trunk in Twilio Console:

    • Go to Elastic SIP Trunking
    • Create new trunk
    • Note the SIP URI
  2. 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
  3. 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:

  1. Select trunk type (usually Register)
  2. Enter host/server address
  3. Enter credentials
  4. Select transport protocol
  5. Configure codecs (use provider's recommendations)
  6. Set DTMF mode (usually RFC2833)
  7. 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:

  1. Incorrect credentials: Double-check username, password, auth ID
  2. Wrong host address: Verify provider's SIP server address
  3. Network connectivity: Ping the SIP server from PBX
  4. Firewall blocking: Check firewall allows SIP traffic (port 5060/5061)
  5. Provider-side issue: Contact provider to verify account status

Diagnostic Steps:

  1. Review trunk settings for typos
  2. Check network connectivity to provider
  3. Verify provider account is active
  4. Review SIP logs for error messages
  5. 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:

  1. NAT issues: Enable NAT settings in trunk configuration
  2. Firewall blocking RTP: Open RTP ports (10000-20000 UDP)
  3. Incorrect external IP: Verify external IP address setting
  4. Codec mismatch: Ensure matching codecs with provider

Solutions:

  1. Enable NAT in trunk settings
  2. Configure external IP (auto-detect or manual)
  3. Open firewall ports:
    • SIP: 5060-5061 UDP/TCP
    • RTP: 10000-20000 UDP
  4. Set local network range (e.g., 192.168.1.0/24)
  5. 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:

  1. Bandwidth limitations: Insufficient internet speed
  2. Network congestion: Too much traffic on network
  3. Wrong codec: Using compressed codec with packet loss
  4. Jitter/latency: Network delay or inconsistency

Solutions:

  1. Check bandwidth:
    • G.711: ~90 Kbps per call
    • G.729: ~30 Kbps per call
    • Ensure 2x required bandwidth available
  2. Implement QoS (Quality of Service):
    • Prioritize VoIP traffic on router
    • Set DSCP marking to EF (46)
  3. Use better codec:
    • G.711 for LAN/high bandwidth
    • Opus for adaptive quality
  4. 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:

  1. No outbound route configured: Need to create outbound route
  2. Extension lacks permission: User not assigned to route
  3. Trunk not selected in route: Route doesn't include trunk
  4. Invalid dial pattern: Number doesn't match route pattern
  5. Trunk capacity exceeded: All channels in use

Diagnostic Steps:

  1. Verify outbound route exists: Settings > Outbound Routes
  2. Check dial pattern: Ensure number matches pattern
  3. Verify trunk selection: Route includes the trunk
  4. Check extension permissions: User allowed on route
  5. Test with different number: Try local, long distance, mobile
  6. 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

  1. Use strong passwords: Random 16+ character passwords for SIP credentials
  2. IP restrictions: Limit trunk access to known IP addresses when possible
  3. Enable TLS: Use encrypted transport for sensitive industries
  4. Monitor usage: Set up alerts for unusual call patterns
  5. Call limits: Configure max concurrent calls to prevent fraud

Reliability

  1. Multiple trunks: Always configure backup trunk for failover
  2. Capacity planning: Size trunks for peak usage + 20% buffer
  3. Regular testing: Test failover monthly
  4. Monitor status: Set up alerts for trunk registration failures
  5. Provider diversity: Use different providers for primary/backup

Performance

  1. Codec selection: Use G.711 for best quality, G.729 for bandwidth savings
  2. QoS configuration: Implement network QoS for consistent quality
  3. Local optimization: Choose geographically close SIP servers
  4. Bandwidth planning: Allocate sufficient bandwidth (100 Kbps per G.711 call)
  5. Network monitoring: Track jitter, latency, packet loss

Documentation

  1. Document credentials: Store trunk credentials in secure password manager
  2. Provider contacts: Keep provider support contacts handy
  3. Configuration backup: Export trunk configurations regularly
  4. Incident log: Document trunk issues and resolutions
  5. Change tracking: Note all trunk configuration changes

Next Steps