Twilio is the telephony provider used in the majority of Agni deployments. It offers Indian DID numbers, reliable SIP infrastructure, pay-as-you-go pricing, and clean API integration with Agni's platform. This guide walks through every step of a Twilio + Agni setup, from account creation to your first live call.
Step 1: Create and Verify Your Twilio Account
Go to twilio.com and create a new account. You'll need to verify with a mobile number and complete identity verification for Indian number provisioning (Twilio requires KYC for regulatory compliance).
For Indian business use, you'll need to submit:
- Company PAN and GST number
- Director's Aadhaar or passport
- Business registration certificate
- Proof of business address
Twilio's India verification typically takes 3–5 business days. Start this process on Day 1 of your Agni deployment — it's the longest lead time item.
Step 2: Provision an Indian Phone Number
In the Twilio console, navigate to Phone Numbers → Buy a Number. Filter by country: India. You'll see options for:
- Local numbers (+91): Standard Indian mobile or geographic numbers. Best for outbound campaigns where you want callers to see a familiar number
- Toll-free numbers (1800-): Best for inbound customer support lines. Callers pay nothing; you pay ₹2–4/min for received calls
Caller ID and TRAI compliance: For outbound campaigns, the number you display must be registered in the DLT system. Provision your Twilio number first, then register it as a principal entity header in the TRAI DLT portal before going live.
Step 3: Configure the SIP Trunk in Agni
In your Agni dashboard, go to Phone Providers → Add Provider → Twilio. You'll need:
- Your Twilio Account SID (found on the Twilio console homepage)
- Your Twilio Auth Token
- The phone number you provisioned (in E.164 format: +91XXXXXXXXXX)
Agni generates a webhook URL that you paste into your Twilio number's Voice configuration field (under Phone Numbers → Manage → Active Numbers → [your number] → Voice & Fax). Set the webhook to POST.
Step 4: Test the Connection
Use Agni's built-in test call feature (Agent → Test Call → Enter your mobile number) to verify the end-to-end connection. The call should connect within 3–5 seconds. If it fails, the most common causes are:
- Webhook URL not saved in Twilio (check the phone number configuration)
- Twilio account not verified for Indian numbers (check account status in Twilio console)
- Firewall blocking Twilio IP ranges (if you're on a corporate network)
Step 5: Configure Outbound Caller ID
For outbound campaigns, Agni needs to be authorised to use your Twilio number as caller ID. In Agni dashboard → Phone Providers → [your Twilio account] → Outbound Numbers → Add your provisioned number. This links the number to your agent configuration.
Twilio Pricing for Indian Calls
Twilio bills per minute for Indian calls, separately from Agni's platform fee. Current Twilio rates for India (approximate):
- Outbound to Indian mobile: ~₹1.08/min
- Outbound to Indian landline: ~₹0.54/min
- Inbound from Indian mobile: ~₹0.71/min
- Inbound toll-free: ~₹2.16/min
These are Twilio list rates. At higher volumes (10,000+ minutes/month), contact Twilio sales for volume pricing — discounts of 20–30% are typical for committed volume.
Cost Optimisation Tips
To reduce Twilio costs for Indian deployments:
- Use local numbers for outbound: Local Indian numbers have better answer rates than international numbers and cost less per minute than toll-free
- Enable answering machine detection: AMD terminates calls to voicemail within 3–5 seconds instead of billing for the full call duration
- Set max call duration: A 30-minute cap prevents runaway costs from calls that stay connected accidentally
- Configure ring timeout: Default Twilio ring timeout is 60 seconds — set to 25–30 seconds for outbound campaigns to reduce unanswered call costs
Alternative: Airtel Business SIP
For businesses with existing Airtel Business accounts, Agni also supports Airtel SIP trunk integration. Airtel typically offers better rates for high-volume Indian traffic and may be preferred for BFSI deployments requiring domestic-only infrastructure. The configuration process is similar — contact Agni support for an Airtel-specific setup guide.