Exotel integration
Integrate Exotel for India-focused telephony with applet-based call routing, native bridge transfers, and μ-law audio streaming.
Prerequisites
- Exotel account — Sign up at
exotel.comand obtain your API Key, API Token, and Account SID. - Exotel numbers — Purchase Indian virtual numbers with voice capability.
- Passthru applet — Create a passthru applet in your Exotel dashboard that forwards calls to your answer webhook.
- Register numbers — Add your Exotel numbers via the Numbers API with
provider: "exotel".
India-Focused Provider
Exotel is primarily designed for Indian telephony infrastructure. It offers excellent connectivity, local number support, and compliance with Indian telecom regulations (TRAI).
| Environment Variable | Description |
|---|---|
EXOTEL_API_KEY | Exotel API key for authentication |
EXOTEL_API_TOKEN | Exotel API token for authentication |
EXOTEL_SID | Exotel account SID |
EXOTEL_TEMPLATE_APPLET_APP_ID | Default applet ID for call routing |
Applet-Based routing
Unlike Twilio and Plivo which use URL-based webhooks directly, Exotel uses an applet-based routing model.
Passthru Applet Setup
- Log in to the Exotel dashboard and navigate to App Bazaar → My Apps
- Create a new Passthru Applet and configure the webhook URL to your server’s
/exotel/answerendpoint - Note the Applet App ID for the
EXOTEL_TEMPLATE_APPLET_APP_IDenvironment variable - For warm transfer, configure an additional passthru applet for the
/exotel/dial-upendpoint
Applet ID Configuration
| Source | Setting | Description |
|---|---|---|
| Environment | EXOTEL_TEMPLATE_APPLET_APP_ID | Default applet ID |
| Template | telephony_config.applet_app_id | Per-template override — takes precedence |
Audio encoding
| Parameter | Value |
|---|---|
| Encoding | μ-law (G.711) |
| Sample Rate | 8000 Hz |
| Channels | Mono |
| Frame format | Base64 in JSON |
Callbacks
/exotel/callback/status Simplified Callbacks
Exotel uses a single status callback endpoint. Recording URLs are retrieved via the Exotel API after the status callback confirms the call has ended.
Warm transfer
Exotel warm transfer follows a unique pattern where the AI disconnects first:
/exotel/dial-up AI Disconnects First
In the Exotel flow, the AI disconnects before the customer is bridged to the live agent. There is a brief hold period while the applet completes the bridge.
Regional considerations
| Consideration | Details |
|---|---|
| TRAI Compliance | Outbound calls must comply with DND regulations. Exotel handles DND filtering automatically. |
| Calling Hours | TRAI restricts promotional calls to 9 AM – 9 PM IST. |
| Number Formats | Indian numbers must include +91 and 10-digit mobile number. |
| Latency | Deploy your server in ap-south-1 (Mumbai) for optimal audio latency. |
| Language Support | Configure STT/TTS for Indian languages using compatible providers. |
Production Applet Configuration
Always verify your passthru applet webhook URLs point to the correct production endpoints before going live. An incorrectly configured applet will silently drop calls.