Provider Comparison
π’ Twilio
Traditional Leader
- Mature, feature-rich platform
- Global presence and reliability
- Extensive documentation and community
- Higher pricing on calls
- Media Streams for real-time audio
- SMS/MMS messaging support
β‘ Telnyx
Modern Alternative
- Competitive pricing (often 50%+ savings)
- Call Control API for advanced features
- Developer-friendly modern APIs
- SMS/MMS messaging support
- Global carrier-grade network
- WebRTC and SIP support
Provider Selection Logic
The system automatically determines which provider to use based on this priority:1
Assistant-Level Credentials
Check if the assistant has
telnyx_config
or twilio_config
configuredPriority: Telnyx > Twilio if both are present2
Organization-Level Credentials
Fallback to organization-level telephony credentialsPriority: Telnyx > Twilio if both are present
3
Environment Variables
Use system-wide environment variables as last resortPriority: Telnyx > Twilio if both are present
Twilio Setup
Twilio Configuration
Twilio Configuration
1. Account Setup
- Sign up at Twilio Console
- Purchase a phone number
- Enable Media Streams on your account
2. Webhook Configuration
Set your Twilio webhook URL to:3. Credentials
Environment Variables (Global):4. Features
- β Inbound/Outbound calls
- β Call recording
- β Call transfer
- β Real-time audio streaming
- β SMS capabilities
- β Global phone numbers
Telnyx Setup
Telnyx Configuration
Telnyx Configuration
1. Account Setup
- Sign up at Telnyx Portal
- Purchase a phone number
- Create a Call Control Application
2. Call Control Application
- Go to Call Control > Applications
- Create a new application
- Set webhook URL to:
- Enable Answering Machine Detection (optional)
- Save and note the Connection ID
3. Credentials
Environment Variables (Global):4. Features
- β Inbound/Outbound calls
- β Call recording
- β Call transfer
- β WebRTC support
- β SMS capabilities
- β Competitive pricing
- β οΈ WebSocket audio streaming (planned)
Mixed Environment Examples
Use Case 1: Cost Optimization
Use Case 2: Geographic Optimization
Provider Migration
Gradual Migration
You can migrate assistants from one provider to another without downtime:Bulk Migration
Use the API to migrate multiple assistants:Troubleshooting
Call Not Connecting
Call Not Connecting
Check:
- Webhook URLs are correct and accessible
- Credentials are valid and have proper permissions
- Phone number is assigned to correct assistant
- Provider account has sufficient balance
Poor Audio Quality
Poor Audio Quality
Twilio: Ensure Media Streams are enabledTelnyx: Check Call Control Application settingsBoth: Verify network connectivity and bandwidth
Provider Detection Issues
Provider Detection Issues
Check priority order:
- Assistant-level config
- Organization-level config
- Environment variables
Best Practices
- Start with one provider and add the second for specific use cases
- Test thoroughly when switching providers for existing assistants
- Monitor costs and usage patterns to optimize provider selection
- Keep credentials secure and rotate them regularly
- Use environment variables for global defaults, per-assistant config for exceptions