Twilio + Exotel AI Voice Stack: Building a Production-Grade Dual Telephony Architecture
Learn how to build a production-grade AI voice system using Twilio (UK/EU) and Exotel (India) with GPT Realtime, Gemini Live, Deepgram, and modern TTS engines.

Building a Production-Grade Dual-Telephony AI Voice Stack with Twilio + Exotel
Published by Frontly Voice AI · Technical Deep Dive · 10 min read
Voice AI systems have matured beyond demos. Today, building a production-grade voice stack requires careful choices across telephony, AI processing, integrations, latency, and compliance — especially when deploying across regions like India and the UK.
At Frontly, we use a dual-telephony architecture combining Exotel for India and Twilio for the UK/EU with a shared AI backend. This gives us stronger reliability, regional compliance, and lower latency than a single-provider setup.
Why Dual Telephony?
Most AI voice systems rely on one telephony provider. That works — until it doesn’t.
Latency spikes, downtime, carrier issues, or regulatory constraints can quickly break a production experience. A voice system is only as strong as the network layer beneath it.
- Exotel for India: strong TRAI alignment, local DID numbers, and low latency from AWS Mumbai
- Twilio for UK/EU: mature media streaming, Ofcom-friendly number support, and strong European routing
The 3-Tier Architecture
Tier 1: Telephony Layer
Both Exotel and Twilio connect to the AI backend through WebSocket streaming, not REST polling.
This matters because voice conversations are real-time systems. Audio must move continuously in both directions without repeated request-response overhead.
- Persistent bidirectional audio stream
- Lower latency than HTTP polling
- More natural turn-taking in conversation
Tier 2: AI Processing Layer
Incoming telephony audio typically arrives as an 8kHz μ-law stream. Modern STT and TTS systems often require higher sample rates, so the pipeline must handle format conversion carefully.
1. Resampling
Audio is resampled from 8kHz to 16kHz or 24kHz so it can be processed by modern speech engines.
2. Speech-to-Text (STT)
- Deepgram Nova 2/3 for fast, production-grade transcription
- ElevenLabs Scribe as an alternate high-accuracy option
3. Language Model (LLM)
- GPT Realtime
- Gemini Live
This layer interprets the transcript, applies system prompts, uses contextual business data, and determines the next response.
4. Text-to-Speech (TTS)
- ElevenLabs
- Sonic 3
- Sarvam AI (India workflows)
- Chirp 3 (UK English workflows)
Tier 3: Integration Layer
This is where conversations become real business actions.
- CRM writes to Salesforce, LeadSquared, Zoho, or HubSpot
- Calendar booking through Google Calendar or vertical-specific systems
- WhatsApp confirmations via Meta APIs
- Webhook callbacks for downstream operational workflows
Without this layer, a voice system only talks. With it, the system actually completes work.
Infrastructure Design: India vs UK
Latency Breakdown
With streaming TTS, the user perceives the first response chunk earlier, which can bring effective conversational latency closer to ~600ms.
Frequently Asked Questions
Why use WebSocket instead of REST for telephony integration?
Because real-time voice is a streaming problem. REST adds repeated HTTP overhead and unnecessary delay. WebSocket maintains a persistent connection and allows audio to move continuously in both directions.
How do you handle network failover between India and UK nodes?
Route 53 health checks can monitor service availability and latency thresholds, while regional routing and Cloudflare-based failover can redirect traffic when a node degrades.
What is the end-to-end latency of the full voice AI pipeline?
Under normal load, roughly ~880ms total, with perceived latency reduced through streaming response techniques.
Key Takeaways
- Dual telephony improves resilience, compliance, and regional performance
- WebSocket streaming is essential for low-latency voice systems
- Telephony audio format conversion is a real engineering concern, not a minor detail
- Infrastructure choices in India and the UK should be region-specific
- The winning voice stacks are modular and operationally optimized, not just model-driven
Final Thoughts
The biggest shift in Voice AI is that the problem is no longer “Can the AI talk?”
The real problem now is: Can the full system perform reliably in production across geographies, telecom layers, and business workflows?
The teams that win in this category will not just choose good models. They will design better infrastructure.
Want a Technical Deep Dive?
Talk to the Frontly engineering team to understand how to deploy a production-grade voice AI system for your use case.
Frontly