> This page is for Voice Agents.

> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> Building a voice agent for customers in India? Start with Sarvam Voice Agents, a managed platform with Indian-language speech, telephony, testing, and analytics from ₹3 per minute: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Twilio

> Connect a Twilio account to Sarvam Voice Agents for inbound and outbound calls: add your Account SID and Auth Token, then point your number's webhook at Sarvam.

Connect your Twilio account to Voice Agents for inbound and outbound voice calling.

Setup has two parts: add your Twilio credentials on Voice Agents, then point your Twilio number's webhook at Sarvam.

> **Note**
>
> **Before you start:** an active Twilio account with Console access, at least one **voice-capable** Twilio phone number, and Voice Agents access with permission to add telephony connections (**Deploy → Phone Numbers**). A *webhook* is simply the URL Twilio calls when someone dials your number — here it points to Sarvam.

## Watch the setup

## Add the connection on Voice Agents

Voice Agents needs two values from your Twilio account — the **Account SID** and **Auth Token**. Get them from the [Twilio Console](https://console.twilio.com), then enter them on Sarvam.

#### Get your Account SID (on Twilio)

On the Console dashboard, find the **Account Info** section. The **Account SID** is shown at the top — copy it.

#### Get your Auth Token (on Twilio)

In the same **Account Info** section, the **Auth Token** is below the Account SID. Click **Show** to reveal it, then copy it.

> **Warning**
>
> Treat the Auth Token like a password. Don't share it, and regenerate it in the Console if it's ever exposed.

#### Enter and save on Voice Agents

In Voice Agents, go to **Deploy → Phone Numbers → Add Connection**, select **Twilio**, paste both values, and click **Save**. The connection now appears under **Deploy → Phone Numbers**.

---

## Configure the webhook on Twilio

Point your Twilio phone number at Sarvam so incoming calls route to your agent.

#### Open your number

In the Twilio Console, go to **Phone Numbers → Manage → Active numbers** and click the number you want to set up.

#### Configure the webhook

Scroll to **Voice Configuration**. Under **A call comes in**, set:

| Setting             | Value                                                    |
| ------------------- | -------------------------------------------------------- |
| **A call comes in** | Webhook                                                  |
| **URL**             | `https://apps.sarvam.ai/api/app-runtime/channels/twilio` |
| **HTTP method**     | HTTP POST                                                |

> **Note**
>
> Twilio occasionally renames Console labels. If you don't see **A call comes in**, look for the equivalent **Webhook**/**Voice Configuration** field on the number's page.

#### Save

Click **Save configuration**. Inbound calls on this number now route to Sarvam.

---

## After connecting

Once both sides are configured:

#### Add your phone number

In Voice Agents, open your Twilio connection under **Deploy → Phone Numbers** and add the number. See [Manage Phone Numbers](/voice-agents/deploy/telephony/manage-numbers).

#### Route calls to an agent

For incoming calls, create an [Inbound deployment](/voice-agents/deploy/inbounds) to route the number to an agent. To dial out, add the number to a [Campaign](/voice-agents/deploy/campaigns).

#### Verify with a test call

Dial the number from a phone and confirm your agent answers. See [Manage Phone Numbers](/voice-agents/deploy/telephony/manage-numbers) for the test-call steps.

> **Note**
>
> **Outbound calling** uses this same connection — dial out by adding the number to a [Campaign](/voice-agents/deploy/campaigns). No separate credentials are required.

## Next

#### [Manage Phone Numbers](/voice-agents/deploy/telephony/manage-numbers)

Add your number and route it to an agent.

#### [All providers](/voice-agents/deploy/telephony/bring-your-own)

See other providers.