# ElevenLabs Integration

This guide walks you through connecting your Bandwidth phone numbers to an [ElevenLabs](https://elevenlabs.io/) hosted voice agent. This integration conforms to a bring-your-own-carrier (BYOC) architecture where SIP trunking is used to connect Bandwidth and ElevenLabs on your behalf. Once you're set up, your ElevenLabs agent can place outbound calls and answer inbound calls using your Bandwidth numbers and network.

info

This is a **verified integration** meaning that Bandwidth has built and tested the integration conformant to the documentation provided herein. This integration is enabled via configuration. No development is required.

This **verified integration** is only supported for accounts on the Bandwidth Universal Platform. Integrations on the legacy platform are not verified and supported best effort only.

## Before you start[​](#before-you-start "Direct link to Before you start")

* A Bandwidth **Universal Platform** account with:

  <!-- -->

  * SIP trunking and SIP authentication (sip-auth) enabled on your account
  * At least one phone number
  * Administrator access to the Bandwidth App (to create Voice Configuration Packages and SIP credentials)

* An [ElevenLabs](https://elevenlabs.io/) account with an Agent you want to answer calls

## Calling Features Supported[​](#calling-features-supported "Direct link to Calling Features Supported")

* Inbound calls to your agent
* Outbound calls from your agent
* Calls redirected from your agent

## Configure Bandwidth[​](#configure-bandwidth "Direct link to Configure Bandwidth")

### Configure inbound calls[​](#configure-inbound-calls "Direct link to Configure inbound calls")

To send inbound calls to your ElevenLabs agent, create a Voice Configuration Package (VCP) in Bandwidth that routes your number to ElevenLabs' SIP domain.

For full details on VCPs, see [Managing Voice Configuration Packages](https://www.bandwidth.com/support/en/articles/12823404). Otherwise, follow the steps below.

#### Create the VCP[​](#create-the-vcp "Direct link to Create the VCP")

1. In the Bandwidth App, go to **Service Management → Voice Configuration** and click **Add Package**.
2. Enter a **Package name** (for example, `ElevenLabs`) and an optional description.
3. Under **Routing**, create the **Primary route** and click **Add endpoint**.
4. Set the endpoint type to **Route to domain name** and enter ElevenLabs' domain: `sip.rtc.elevenlabs.io`
5. Click **Create Package**.

note

`sip.rtc.elevenlabs.io` is ElevenLabs' default SIP endpoint. If ElevenLabs has assigned you a regional or static SIP endpoint, use that FQDN instead — confirm the correct value in the [ElevenLabs Bandwidth guide](https://elevenlabs.io/docs/eleven-agents/phone-numbers/telephony/bandwidth) for your account.

note

If your account has more than one trunk, click **+ Optional attributes** on the **Primary route** and set **Trunk group** to your ElevenLabs trunk.

When you're done, your routing should look like this:

![Voice Configuration Package with a primary route set to Route to domain name, pointing to sip.rtc.elevenlabs.io](/assets/images/voice-configuration-package-EL-8e1466d9a44e439720b7902426edb7e3.png#center)

#### Assign your number to the VCP[​](#assign-your-number-to-the-vcp "Direct link to Assign your number to the VCP")

1. In the Bandwidth App, open the phone number you want your ElevenLabs agent to answer.
2. In the **Voice configuration package** drop-down menu, select the VCP you just created, and click **Save**.

Inbound calls to that number now route to your ElevenLabs agent.

![Phone number Voice settings with the ElevenLabs voice configuration package selected and a primary route to sip.rtc.elevenlabs.io](/assets/images/phone-number-voice-settings-EL-2581877899520513ce46ebfaf0106b6d.png#center)

note

You may add multiple numbers to your VCP and calls to those numbers will route to ElevenLabs. Within ElevenLabs you can assign those numbers to the same agent or different agents.

### Configure outbound calls[​](#configure-outbound-calls "Direct link to Configure outbound calls")

ElevenLabs authenticates outbound calls using credentials you define on your SIP realm. Complete this section if you plan to place outbound calls.

#### Create your Bandwidth SIP Endpoint[​](#create-your-bandwidth-sip-endpoint "Direct link to Create your Bandwidth SIP Endpoint")

The Bandwidth SIP Endpoint is the address ElevenLabs sends outbound calls to: a fully qualified domain name (FQDN) plus a port.

```
<hostname>.auth.bandwidth.com:port
```

The FQDN hostname is actually comprised of two parts: 1) a realm name you create, and 2) a Bandwidth supplied part:

```
<your realm name>-<bandwidthpart>.auth.bandwidth.com
```

Bandwidth creates the FQDN when you define a SIP realm.

1. In the Bandwidth App, go to **Account → SIP Credentials → Manage Realms** and click **Add** to create a realm.

   * If your account has more than one trunk, select your ElevenLabs trunk in **Trunk group**.
   * Give the realm a name (e.g. `elevenlabs`) and an optional description.
   * Bandwidth creates the FQDN for the realm. **Copy the FQDN exactly as it appears in the Bandwidth App.** You'll combine it with the port from the next step to form your SIP Endpoint.
   * For example, if your realm name is `elevenlabs`, the FQDN will look like `elevenlabs-b3cde1.auth.bandwidth.com`.

   ![Add realm dialog with trunk group ElevenLabs - Default, realm elevenlabs, and the generated FQDN elevenlabs-b3cde1.auth.bandwidth.com](/assets/images/add-realm-EL-593dd421f1dfc837358c3f1f54f8b157.png#center)

2. In order to complete the SIP Endpoint definition you will need to discover the port number assigned. Go to **Trunk Group Configurations** in the Bandwidth App and note the **port** assigned to your trunk group. You'll combine this with the FQDN when completing setup in ElevenLabs.

   ![Trunk Group Configurations page listing the default and ElevenLabs trunk groups, with the port number in the Signaling IP column circled in red](/assets/images/trunk-group-configurations-EL-4fbee94f96f062bbe6ee4e47f52bbd43.png#center)

For example, a complete SIP Endpoint looks like `elevenlabs-b3cde1.auth.bandwidth.com:5833`.

#### Create your SIP credentials[​](#create-your-sip-credentials "Direct link to Create your SIP credentials")

1. Go to **Account → SIP Credentials** and click **Add** to create a credential.

   <!-- -->

   * Enter a **Username** and **Password**.
   * Select the realm you created when you created your SIP Endpoint.
   * Save. ElevenLabs uses these credentials to authenticate your outbound calls.

## Configure ElevenLabs[​](#configure-elevenlabs "Direct link to Configure ElevenLabs")

With Bandwidth configured, import the number into ElevenLabs using its SIP trunking flow. Follow the [ElevenLabs Bandwidth guide](https://elevenlabs.io/docs/eleven-agents/phone-numbers/telephony/bandwidth) and supply:

* **Phone number** in **E.164 format**, with a leading `+` (e.g. `+19195551234`).
* **Port**: the port assigned to your trunk group. This is the same port you noted from the **Trunk Group Configurations** page in [Create your Bandwidth SIP Endpoint](#create-your-bandwidth-sip-endpoint) — for example, `elevenlabs-b3cde1.auth.bandwidth.com:5833`.
* **Transport Type**: **TLS**.
* **Media Encryption**: **Allowed**.
* **From Header Domain**: `default`.
* **Enabled Codecs**: **PCMU**.
* **Authentication**: enable the toggle.
* **SIP Trunk Username**: the username you created in [Configure outbound calls](#configure-outbound-calls).
* **SIP Trunk Password**: the password you created in [Configure outbound calls](#configure-outbound-calls).

When you're done, your trunk configuration should look like this:

![ElevenLabs Outbound SIP Trunk Configuration showing the Bandwidth address elevenlabs-b3cde1.auth.bandwidth.com:5833, Transport Protocol TLS (Secure), Media Encryption Allowed (Default), Authentication with username and password configured, and Enabled Codecs PCMU](/assets/images/outbound-sip-trunk-configuration-bfbaa9036c26964c75281724b1f501c8.png#center)

Once the number is imported, **assign your Agent** to it in the ElevenLabs dashboard. Inbound calls to the number will now be answered by your agent, and the agent can place outbound calls through Bandwidth.

note

If ElevenLabs assigned your account a regional or static SIP endpoint, use that FQDN in your Bandwidth Voice Configuration Package instead of the default `sip.rtc.elevenlabs.io`, and make sure the two sides agree.

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

| Symptom                                          | Likely cause                                         | What to check                                                                                                                                                                                                        |
| ------------------------------------------------ | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Inbound calls don't reach the agent              | Voice Configuration Package misrouted                | Confirm the package uses **Route to Domain Name** with FQDN `sip.rtc.elevenlabs.io` (or your assigned regional endpoint), and that the number is assigned to that package.                                           |
| Outbound calls rejected with `403`/`407`         | SIP credential or realm mismatch                     | Verify the ElevenLabs **Address** matches your Bandwidth realm hostname and trunk group port exactly, and that the username and password match the credential you created against that realm.                        |
| Address not accepted by ElevenLabs               | Wrong address format                                 | Enter the realm hostname followed by your trunk group port — for example `elevenlabs-b3cde1.auth.bandwidth.com:5833`. No `sip:` prefix and no other reformatting; copy the hostname verbatim from the Bandwidth App. |
| Call connects but no audio (one-way or dead air) | Transport, port, codec, or media-encryption mismatch | Confirm **Transport Protocol** is **TLS**, that the port in the **Address** matches the port assigned to your trunk group, that **Media Encryption** is **Allowed**, and that **Enabled Codecs** includes **PCMU**.  |
| Intermittent routing failures                    | Using the wrong SIP endpoint                         | If ElevenLabs assigned you a regional or static endpoint, use that FQDN rather than the default `sip.rtc.elevenlabs.io`.                                                                                             |

## Resources[​](#resources "Direct link to Resources")

* [Create a Voice Configuration Package](https://dev.bandwidth.com/docs/universal-platform/create-a-vcp) — Bandwidth
* [How to set up SIP Registration](/docs/account/sipRegistrar.md) — Bandwidth SIP credentials and realms
* [ElevenLabs Bandwidth SIP trunking guide](https://elevenlabs.io/docs/eleven-agents/phone-numbers/telephony/bandwidth) — ElevenLabs
