Overview
Dograh AI’s telephony integration system provides a unified interface for connecting with various telephony providers. This abstraction layer allows you to easily switch between providers without changing your application logic.Supported Providers
Twilio
Industry-leading cloud communications platform with global reach
Vonage
High-quality voice with 16kHz audio and excellent international coverage
Custom Provider
Build your own telephony provider integration
Architecture
The telephony integration system uses a provider abstraction pattern that ensures consistency across different services:Configuration
Dograh AI uses database configuration for all telephony providers. Configure providers through the web interface:- Navigate to Workflow → Phone Call → Configure Telephony
- Select your provider (Twilio or Vonage)
- Watch the provider-specific video tutorial for setup guidance
- Enter your credentials
- Save configuration
- Test with a phone call
Common Features
The telephony integration in Dograh AI supports:- Outbound Calls: Initiate calls to any phone number
- Call Status Tracking: Monitor call lifecycle events (initiated, ringing, answered, completed, failed)
- WebSocket Streaming: Real-time audio streaming for voice agents
- Webhook Authentication: Secure webhook signature verification
Code Usage
Here’s how to use the telephony provider in your code:API Endpoints
The telephony system exposes these unified endpoints:| Endpoint | Method | Description |
|---|---|---|
/api/v1/telephony/initiate-call | POST | Start an outbound call |
/api/v1/telephony/twilio/status-callback/{id} | POST | Receive Twilio status updates |
/api/v1/telephony/vonage/events/{id} | POST | Receive Vonage event updates |
/api/v1/telephony/twiml | POST | Handle Twilio webhook (TwiML) |
/api/v1/telephony/ncco | GET | Handle Vonage webhook (NCCO) |
/api/v1/telephony/ws/{workflow_id}/{user_id}/{workflow_run_id} | WebSocket | Real-time audio streaming |
Implementation Status
- Twilio: ✅ Fully implemented and tested
- Vonage: ✅ Fully implemented with 16kHz audio support
- Custom Providers: The abstraction layer supports adding new providers by implementing the
TelephonyProviderinterface
Troubleshooting
Calls not connecting
Calls not connecting
- Verify credentials are correctly configured
- Check phone number format (must include country code)
- Ensure webhook URLs are publicly accessible
- Review provider-specific error logs
Audio quality issues
Audio quality issues
- Check network bandwidth and latency
- Verify audio codec compatibility
- Review WebSocket connection stability
- Ensure proper audio format:
- Twilio: 8kHz μ-law (MULAW)
- Vonage: 16kHz Linear PCM
Webhook signature validation failing
Webhook signature validation failing
- Confirm auth tokens match between provider and configuration
- Verify webhook URL matches exactly (including parameters)
- Check for proxy or load balancer modifications