Back to Documentation

Voice AI Integration

Available

Let your chatbot answer and place phone calls through Twilio

How it works

A caller dials your Twilio number. Twilio streams the audio to AgentPro, Deepgram turns it into text, your chatbot generates the reply, and ElevenLabs speaks it back, all in real time. The assistant stops talking when the caller interrupts, can hand the call to a human, and enforces a maximum call length.

Speech-to-Text

Deepgram streaming recognition with endpointing, so the assistant replies as soon as the caller pauses.

Text-to-Speech

ElevenLabs (or OpenAI) streaming voices. Callers can interrupt the assistant mid-sentence.

Inbound and Outbound

Answer calls to your Twilio number 24/7, or place consent-confirmed outbound calls from the API.

Transcripts and Recording

Every call lands in the Inbox with a transcript and AI summary. Recording is optional and consent-first.

Setup

  1. 1

    Buy a voice-capable number in Twilio

    In the Twilio Console, buy a number with the Voice capability. Note your Account SID (starts with AC) and Auth Token from the console home page. Trial accounts can only call verified numbers and play a trial notice.
  2. 2

    Get speech API keys

    Create a Deepgram API key for speech recognition and an ElevenLabs API key for the voice. OpenAI TTS is supported as an alternative voice provider. If your workspace administrator has set platform-level keys you can leave these blank.
  3. 3

    Connect the channel in the dashboard

    Open Dashboard → Channels → Voice AI, pick the chatbot that should answer calls (required), enter the Twilio credentials and phone number in E.164 format (for example +14155551234 or +919876543210), add your speech keys, choose a voice and language, and click Configure Voice Channel.
  4. 4

    Webhooks are set automatically

    We verify the number belongs to your Twilio account and set its Voice URL and status callback for you. You do not need to edit anything in Twilio. If you ever reset them, the URLs are:
    • POST {API_URL}/api/v1/webhooks/voice/{channelId}/incoming
    • POST {API_URL}/api/v1/webhooks/voice/{channelId}/status
    • POST {API_URL}/api/v1/webhooks/voice/{channelId}/recording-status
    • WSS  {API_URL}/api/v1/webhooks/voice/{channelId}/stream/{callSid}
    All HTTP webhooks are verified with your Twilio signature; the media stream is only accepted for calls we started in the last 10 minutes.
  5. 5

    Call your number

    Dial the number. The assistant speaks the greeting, listens, and replies using the chatbot's knowledge base and instructions. Say “I want to speak to a human” to trigger a transfer (when a transfer number is configured) or “goodbye” to end the call. Transcripts appear in the Inbox under the Voice channel within seconds.

Languages and voices

Pick a language in the channel settings: English (US / India), Hindi, Tamil, Telugu, Kannada, Malayalam, Marathi or Bengali. The same setting drives speech recognition and the spoken voice. Organizations based in India default to English (India). ElevenLabs voices can be chosen by name (Rachel, Drew, Charlotte, ...) or by pasting any voice id from your ElevenLabs library, including cloned voices.

Recording and consent

  • Recording is off by default.
  • When enabled, a consent notice (editable, default “This call may be recorded for quality and training purposes.”) is spoken before recording starts. Recordings are stored in your Twilio account and linked from the call record.
  • Transcripts are always stored so the conversation shows in the Inbox alongside your other channels.
  • You are responsible for complying with local law: two-party consent states in the US, GDPR in the EU and the DPDP Act in India.

Outbound calls

Place a call from the dashboard or via the API. The assistant speaks your opening message and then converses normally.

POST /api/v1/channels/{channelId}/voice/call
Authorization: Bearer <token>

{
  "to": "+919876543210",
  "message": "Hi, this is Acme calling about your appointment tomorrow.",
  "consentConfirmed": true
}

consentConfirmed is mandatory: you must only call people who have opted in. Each organization can have at most 5 outbound calls in progress at a time.

Note for India

  • Twilio Indian numbers require a regulatory bundle (business registration and address proof) before they can be purchased, and inbound-only numbers are common. Allow a few days for approval.
  • Outbound calls to Indian mobiles are subject to TRAI DND rules: do not call numbers registered on the National Customer Preference Register, and promotional calls are restricted to registered telemarketer headers. Transactional and consent-based service calls are allowed.
  • Many Indian businesses instead use a US or UK Twilio number for inbound AI calls, or a provider such as Exotel or Plivo for local numbers; those providers are listed in the catalogue but are not yet connected to the voice pipeline.

Troubleshooting

  • “This number is not configured”: no chatbot is linked to the voice channel. Select one in Voice Settings.
  • “This number is not fully configured yet”: a Deepgram or voice API key is missing. Check the Speech readiness badges on the channel page.
  • Twilio shows a 403 on the webhook: the public API_URL of the server must match the URL Twilio calls (https, no proxy rewrites), otherwise the signature check fails.
  • The assistant answers but cannot hear me: the Media Streams WebSocket must reach the API over wss://; make sure your reverse proxy forwards WebSocket upgrades.