# Twilio

> Connect a number hosted on your own Twilio account to a UiPath voice agent.

If your number lives on Twilio, connect your Twilio account directly. UiPath sets the number's voice webhook for you, so there is no Session Initiation Protocol (SIP) trunk to build and no inbound access to authorize.

:::note
Do not point a Twilio Elastic SIP Trunk at your UiPath SIP domain. UiPath's own SIP endpoint is hosted on Twilio, and Twilio does not route SIP between two of its own domains. Connect the Twilio account instead.
:::

## How a call reaches your agent

Twilio Programmable Voice holds the number and streams the call's audio to UiPath. The Conversational Service runs the agent — chat history, agent loop, and call control — and reaches the models through the LLM Gateway, which applies AI Trust Layer governance, monitoring, and audit. The Flow you publish supplies the design, and tool calls execute in the Unified Runtime.

![High-level voice agent diagram for a bring-your-own Twilio subscription. The caller dials a Twilio Programmable Voice number, which exchanges real-time audio with the UiPath conversational service; the service reaches Azure OpenAI and Google Vertex AI through the LLM Gateway, runs the published Maestro Flow, and executes tools in the Unified Runtime.](https://dev-assets.cms.uipath.com/assets/images/agents/voice-twilio-architecture-b5292733.webp)

There is no carrier ahead of Twilio on this path, and no trunk between Twilio and UiPath.

## Before you start

* The prerequisites — see [Deployment](./conversational-agents-voice-deployment.md).
* A number bought or ported into your own Twilio account.
* Your Twilio **Account SID** and **Auth token**, from your [Twilio console](https://console.twilio.com).
* For incoming calls — a Flow with an **Incoming call** trigger, published to Orchestrator.

## Connect the number

1. In the **Agents** page, go to **Phone numbers**.
2. Select **Connect number**, then select **Twilio** in the left rail.
3. Enter a **Label** and the **Phone number** in E.164 format.
4. Select a **Direction** — **Incoming**, **Outgoing**, or **Both**.
5. Under **Twilio account**, enter your **Account SID** and **Auth token**.
6. For an incoming flow, select the published Flow **Process** and its **Incoming call trigger (entry point)** under **Inbound binding**.
7. Select **Connect**.

![The Connect number dialog with Twilio selected, showing Label, Phone number, Direction, a connected Twilio account, and the Inbound binding fields](https://dev-assets.cms.uipath.com/assets/images/agents/voice-connect-number-twilio-aeeb79c1.webp)

There is no **Outgoing configuration** on this path, and no SIP domain to copy. Once the number is connected, **Twilio account** shows the connected SID with a **Disconnect** action, and later Twilio numbers reuse that account without asking again.

:::note
One Twilio account is stored per tenant, shared by every Twilio number on it, so you enter the credentials only once.
:::

## Check the webhook in Twilio

Nothing needs configuring on the Twilio side. For verification purposes only, open the number in your [Twilio console](https://console.twilio.com) under **Phone Numbers > Manage > Active numbers**, then look at **Voice Configuration**:

| Field | Expected value |
| --- | --- |
| **Configure with** | **Webhook, TwiML Bin, Function, Studio Flow, Proxy Service** |
| **A call comes in** | **Webhook**, with a `uipath.com` URL and **HTTP POST** |

![Voice Configuration for the number in the Twilio console, with Configure with set to the webhook option and a uipath.com URL in A call comes in](https://dev-assets.cms.uipath.com/assets/images/agents/voice-twilio-voice-configuration-413c27f0.webp)

If **Configure with** is set to **SIP Trunk**, the number routes to a trunk and UiPath's webhook never fires. Set it back to the webhook option.

:::note
Connecting a number overwrites its **Voice Configuration**, including any existing webhook URL or TwiML application. Note the current settings first.
:::

## How your Twilio credentials are stored

Your auth token is encrypted at rest and is never shown again after you save it — the dialog only lets you replace it.

Encryption follows your tenant's own key configuration. If your organization uses customer-managed keys, the token is encrypted under your key rather than a UiPath-managed one, which is the default. See [customer-managed keys](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/customer-managed-keys) for enabling them on your tenant.

## Related

* [Voice](./conversational-agents-voice.md) — overview, limitations, and which providers work.
* [Deployment](./conversational-agents-voice-deployment.md) — prerequisites and the inbound app registration.
* [Any SIP provider](./conversational-agents-voice-sip.md) — the **SIP Trunk** option, for a number held anywhere else.
