Purpose: This guide walks you through creating a SIP Trunk in Twilio that can route calls to Vodex AI agents. This is the foundation step before configuring inbound call routing.
π― What is a SIP Trunk?
SIP Trunk Overview
SIP Trunk Functionality
Communication BridgeA SIP Trunk is a virtual connection that enables Voice over IP (VoIP) communication between different systems. In our case, it connects:
- Twilioβs phone system β Vodex AI platform
- Your phone numbers β AI agents
- Incoming calls β Automated responses
Why You Need a SIP Trunk
π Call Routing
π Call Routing
Seamless Call Direction
- Routes incoming calls from Twilio to Vodex AI
- Enables automatic call answering by AI agents
- Provides reliable connection between platforms
- Ensures consistent call quality and delivery
βοΈ Configuration Control
βοΈ Configuration Control
Flexible Setup Options
- Configure multiple phone numbers to use one trunk
- Set up different trunks for different AI configurations
- Control call routing and failover options
- Manage authentication and security settings
π Monitoring & Analytics
π Monitoring & Analytics
Call Tracking
- Monitor call volumes and success rates
- Track connection quality and performance
- Generate reports on call routing efficiency
- Debug connection issues when they occur
π οΈ Step-by-Step SIP Trunk Creation
Step 1: Access Twilio Console
1
Login to Twilio
Navigate to SIP Trunking
- Go to Twilio Console
- Login with your Twilio account credentials
- Navigate to Develop β Elastic SIP Trunking
- Click on βTrunksβ in the sidebar menu
2
Initiate Trunk Creation
Start New Trunk
- Click the βCreate new SIP Trunkβ button
- Youβll be directed to the trunk configuration page
- Prepare to enter your trunk details
Step 2: Basic Trunk Configuration
1
Trunk Identification
Name and DescriptionFriendly Name: Domain Name: (Optional - can be left blank)Description:
Vodex-AI-Trunk
2
Authentication Settings
Security ConfigurationAuthentication: Secure Trunking: Enable if required by your organization
None
(Recommended for Vodex integration)Why No Authentication: Vodex AI servers are pre-configured to accept connections from Twilio. Using IP-based authentication simplifies the setup while maintaining security.
Step 3: Origination Configuration
1
Add Origination URI
Outbound Call Routing
- Click on the βOriginationβ tab
- Click βAdd Origination URIβ
- Configure the URI pointing to Vodex servers
2
Configure Vodex Endpoint
Origination URI SettingsURI:Priority:
10
Weight: 10
Important: Use exactly
34.27.110.155
as the IP address. This is the Vodex AI SIP gateway that will handle your calls.3
Advanced Origination Settings
Optional ConfigurationEnabled: β
Checked
Friendly Name:
Vodex-AI-Gateway
Additional Parameters:- Leave other settings at default values
- Ensure the URI is active and enabled
- Save the origination configuration
Step 4: Termination Configuration (Optional)
1
Termination Setup
Inbound Call HandlingIf Termination is Required:
For Vodex Integration: Termination configuration is typically not required for basic Vodex AI integration, as calls are primarily routed outbound to Vodex servers.
- Click on βTerminationβ tab
- Add termination URI if needed for your specific setup
- Use the same IP:
34.27.110.155:5080
βοΈ Advanced Configuration Options
Access Control Lists (ACLs)
π IP Whitelist Configuration
π IP Whitelist Configuration
Restrict Access by IPCreate ACL:Additional IPs: Contact Vodex support for complete IP whitelist if required
- Navigate to βAccess Controlβ section
- Create new ACL named
Vodex-Whitelist
- Add Vodex IP addresses to allowed list
π Geographic Restrictions
π Geographic Restrictions
Regional Access ControlGeo Permissions:
- Configure allowed countries/regions
- Restrict access based on geographic location
- Add specific country codes if needed
- Useful for compliance and security requirements
Recording and Monitoring
πΉ Call Recording
πΉ Call Recording
Enable Recording FeaturesRecording Options:
- Dual Channel: Separate channels for each party
- Single Channel: Mixed audio recording
- Trim Silence: Remove quiet periods
- Configure recording storage duration
- Set up automatic transcription if needed
- Define access permissions for recordings
π Analytics & Insights
π Analytics & Insights
Monitoring ConfigurationEnable Insights:
- Voice Insights for call quality analysis
- Call summary and analytics
- Real-time monitoring dashboards
- Custom alerts for issues or thresholds
π§ Testing Your SIP Trunk
Verification Steps
1
Configuration Review
Double-Check Settings
- Verify origination URI:
sip:34.27.110.155:5080;transport=tcp
- Confirm priority and weight values are set
- Check that the trunk is enabled and active
- Review authentication settings (should be βNoneβ)
2
Connection Test
Test Trunk Connectivity
- Use Twilioβs built-in SIP testing tools
- Send a test call through the trunk
- Monitor for any connection errors
- Verify the trunk shows as βActiveβ status
3
End-to-End Validation
Complete Integration Test
- Configure a phone number to use this trunk
- Set up inbound routing to Vodex (see Twilio Configuration guide)
- Make a test call to verify AI response
- Check call logs for successful routing
Troubleshooting Common Issues
π« Trunk Not Connecting
π« Trunk Not Connecting
Connection ProblemsSymptoms:
- Trunk shows as βInactiveβ or βFailedβ
- Calls not routing through the trunk
- Connection timeouts or errors
- Verify IP address is exactly
34.27.110.155
- Check port is set to
5080
- Ensure transport is specified as
tcp
- Confirm no typos in the URI format
- Check Twilio account has SIP Trunking enabled
π Calls Not Routing
π Calls Not Routing
Routing IssuesSymptoms:
- Trunk is active but calls fail
- Busy signals or disconnected calls
- Calls donβt reach Vodex AI
- Check origination URI is enabled
- Verify priority and weight settings
- Ensure phone number is configured to use this trunk
- Test with Twilioβs SIP testing tools
- Contact Vodex support to verify server status
π Audio Quality Issues
π Audio Quality Issues
Call Quality ProblemsSymptoms:
- Poor audio quality
- Choppy or delayed audio
- One-way audio problems
- Verify transport=tcp in URI
- Check network connectivity and latency
- Review Twilioβs call quality insights
- Test at different times to rule out network issues
- Consider enabling call recording for analysis
π Configuration Checklist
Pre-Creation Requirements
- Twilio account with SIP Trunking enabled
- Appropriate Twilio plan (SIP Trunking may require specific plans)
- Vodex AI project configured and ready
- Understanding of your intended call routing
Trunk Creation
- SIP Trunk created with descriptive name
- Origination URI configured:
sip:34.27.110.155:5080;transport=tcp
- Priority set to
10
- Weight set to
10
- Authentication set to βNoneβ
- Trunk enabled and active
Testing and Validation
- Trunk shows βActiveβ status in Twilio console
- Test connection successful
- No configuration errors or warnings
- Ready for phone number assignment
Next Steps
- Link phone numbers to the trunk
- Configure inbound routing to Vodex
- Set up specific AI agent routing
- Test complete call flow
π‘ Best Practices
Naming Conventions
Security Considerations
- Monitor Usage: Regularly check call volumes and patterns
- Access Control: Use ACLs if your organization requires IP restrictions
- Authentication: Use βNoneβ for Vodex integration unless specific security requirements exist
- Regular Audits: Periodically review trunk configurations and usage
Performance Optimization
- Multiple Trunks: Consider separate trunks for different purposes or traffic volumes
- Load Balancing: Use weight settings to distribute load across multiple URIs if needed
- Monitoring: Enable Twilio Insights for call quality monitoring
- Documentation: Keep detailed records of your trunk configurations
π Managing Multiple Trunks
Use Cases for Multiple Trunks
Multi-Trunk Scenarios
When to Create Multiple TrunksDifferent AI Configurations:
- Separate trunks for different Vodex AI agents
- Different business lines (Sales, Support, etc.)
- Testing vs. Production environments
- High-volume vs. low-volume call routing
- Geographic or regional routing
- Failover and redundancy planning
- Different access control needs
- Compliance-specific routing
- Department-specific restrictions
Trunk Management Best Practices
1
Organize by Purpose
Logical Grouping
- Name trunks clearly to indicate their purpose
- Group related trunks for easy management
- Document the intended use of each trunk
2
Monitor Performance
Regular Assessment
- Track call success rates per trunk
- Monitor quality metrics and issues
- Review usage patterns and optimization opportunities
3
Maintain Documentation
Configuration Records
- Keep detailed records of each trunkβs purpose
- Document any custom configurations or requirements
- Track which phone numbers use which trunks
π Next Steps
After creating your SIP Trunk:- Link Phone Numbers - Configure your Twilio phone numbers to use this trunk
- Set Up Inbound Routing - Follow the Twilio Configuration Guide
- Configure Vodex Integration - Set up your Dialer Config in Vodex
- Test Complete Flow - Verify end-to-end call routing works correctly
- Monitor and Optimize - Track performance and make adjustments as needed
SIP Trunk Created Successfully! Your Twilio SIP Trunk is now ready to route calls to Vodex AI. The next step is configuring inbound call routing to connect your phone numbers to AI agents.
Need help with SIP Trunk setup? Contact Twilio support for platform-specific issues or Vodex support for integration assistance.