This guide will help you set up SIP trunking between Twilio and Voxia. Follow these steps to establish the connection and configure your phone numbers.

Prerequisites

Before you begin, ensure you have:

  • A Twilio account with SIP Trunking enabled
  • Access to the Twilio Console
  • Your Voxia account credentials

Step 1: Configure SIP in Voxia

  1. Log in to your Voxia dashboard
  2. Navigate to Settings > SIP Configuration
  3. Add a new SIP trunk with the following details:
    • Name: Twilio SIP
    • SIP URL: Choose the appropriate regional endpoint based on your location:
      • US/Canada: us1.sip.twilio.com
      • Europe: ie1.sip.twilio.com
      • Asia-Pacific: sg1.sip.twilio.com
    • Authentication: Username and password from your Twilio SIP trunk credentials
    • Save the configuration

Step 2: Create a SIP Trunk in Twilio

  1. Go to the Twilio Console
  2. Navigate to Voice > SIP Trunking > Trunks
  3. Click “Create new SIP Trunk”
  4. Configure the following settings:
    • Friendly Name: Voxia SIP
    • Termination:
      • Enable Termination: Yes
      • Termination URI: Your Voxia SIP endpoint
      • IP Access Control: Create a new list for Voxia’s IP addresses
    • Origination:
      • Enable Origination: Yes
      • Configure allowed destinations

Step 3: Configure IP Access Control

  1. In the Twilio Console, go to SIP Trunking > IP Access Control Lists
  2. Create a new IP Access Control List
  3. Add Voxia’s IP addresses to the allowed list
  4. Associate this IP Access Control List with your SIP trunk

Step 4: Purchase and Configure Twilio Numbers

  1. Buy phone numbers from Twilio’s inventory
  2. For each number:
    • Go to the number’s configuration
    • Set the voice configuration to “SIP Trunk”
    • Select the SIP trunk you created
    • Configure the regional routing if needed

Step 5: Configure Numbers in Voxia

  1. In Voxia, go to Phone Numbers
  2. Add your Twilio numbers
  3. Set the connection type to “SIP”
  4. Associate them with the Twilio SIP trunk you created

Important Notes

  • Regional Configuration: Twilio processes and stores call data in the region where the SIP trunk is configured. Choose the region closest to your infrastructure for optimal performance.
  • NAT Configuration: If deploying behind NAT:
    • For UDP: Send periodic SIP OPTIONS to keep NAT bindings open
    • For TCP/TLS: Use either SIP OPTIONS or CR-LF keep-alives
  • Firewall Settings: Allow ALL of Twilio’s IP ranges for both signaling and media traffic
  • SIP Headers: Ensure your infrastructure sends a value of 70 for the Max-Forwards header
  • Phone Numbers: Always use E.164 format for phone numbers sent via SIP

Testing

  1. Make test calls in both directions to verify the connection
  2. Monitor call quality and latency
  3. Check Twilio’s Voice Insights for detailed call analytics

Troubleshooting

If you encounter issues:

  1. Verify IP access control lists are correctly configured
  2. Check SIP credentials and authentication
  3. Ensure firewall rules allow Twilio’s IP ranges
  4. Review Twilio’s Voice Insights for detailed diagnostics

For additional help, consult Twilio’s SIP Trunking documentation or contact Voxia support.