# Bland AI

Use [Bland AI voice agents](https://www.bland.ai/) with **DIDWW SIP Trunking** to handle inbound and outbound calling
over standard phone lines.
Connect your DIDWW SIP trunks with Bland AI to route incoming calls to Bland AI pathways, place outbound calls through
DIDWW, and transfer active calls to live agents with SIP REFER.

- Route incoming calls from DIDWW numbers to Bland AI pathways.
- Connect callers to AI agents for real-time conversations.
- Attach existing DIDWW numbers to a Bland AI SIP trunk.

- Place outbound calls through DIDWW Outbound Trunks.
- Transfer active calls to external phone numbers through DIDWW.
- Encrypt signaling and media with TLS and SRTP.

---

## 1. Route Incoming Calls to Bland AI

Configure an **Inbound SIP Trunk** in the DIDWW User Panel to send incoming calls from your DIDWW numbers to Bland AI.
This trunk delivers calls to the Bland AI SIP endpoint over TLS with SRTP, and it can be configured to support SIP REFER
call transfers.

### Before You Begin

- An active DIDWW account is required. [Sign in to DIDWW](https://my.didww.com/users/sign_in) or [Create DIDWW account](https://my.didww.com/users/sign_up#/users/sign_up).
- At least one active **DID number** with capacity to receive incoming calls is required. [Buy Numbers](https://my.didww.com/users/sign_up#/coverage).
- A **Bland AI account** with SIP trunking enabled is required. Bland AI enables SIP trunking per organization. Contact Bland AI support if **SIP trunks** is not available in your dashboard.

### Step 1: Create New SIP Trunk

1. In the [DIDWW User Panel](https://my.didww.com/#/trunks), go to **Voice > Inbound Trunks**.
2. Click **Create New > SIP Trunk**.

![Create New menu on the Inbound Trunks page with SIP Trunk listed](../../_images/inbound1.webp)


**Fig. 1.** Creating a new inbound SIP trunk

### Step 2: Configure General SIP Trunk Settings

In the **General** tab, configure the endpoint and network settings used to deliver calls from DIDWW to Bland AI.

Important

**TLS** transport on port `5061` is mandatory. Bland AI rejects SIP over UDP or TCP on port `5060`.

1. Enter a descriptive **Name** for the trunk (e.g., `Bland AI`).
2. Select **Static Endpoint**.
3. In **User Part of R-URI**, enter `+{DID}` to send the called number in E.164 format with the `+` symbol.
4. In **Host**, enter the Bland AI SIP endpoint for the region where your Bland AI organization is hosted:

   - US: `us2.sip.bland.ai`
   - Canada: `ca2.sip.bland.ai`
   - Europe: `eu2.sip.bland.ai`
   - Asia-Pacific: `asia2.sip.bland.ai`
5. In **Port**, enter `5061`.
6. Set **Network Protocol** to **IPv4 only**.
7. In **Transport**, select **TLS**.

![General tab of the inbound SIP trunk configured for Bland AI](../../_images/generalsettings.webp)


**Fig. 2.** SIP trunk configured for Bland AI

### Step 3: Configure Media Encryption

Important

Bland AI requires **SRTP SDES** media encryption to establish calls.

1. Open the **Media & DTMF** tab.
2. In **Codecs**, keep **PCMU**, **PCMA**, and **telephone-event**, and remove the other codecs.
3. In **SRTP Mode**, select **SRTP SDES**.
4. Keep **RFC 2833** as the **DTMF Send Mode** and **DTMF Receive Mode**.

![Media and DTMF tab with PCMU, PCMA, telephone-event, and SRTP SDES selected](../../_images/inbound_media.webp)


**Fig. 3.** Configuring codecs and SRTP for Bland AI

### Step 4: Enable Call Transfer Signaling (Optional)

To support call transfers, configure the inbound trunk to allow in-dialog SIP REFER requests. Skip this step if you do
not need call transfers.

1. Open the **Signalling** tab.
2. Set **Max Transfers** to `1` or higher.

![Signalling tab with Max Transfers set to 1](../../_images/inbound_signalling.webp)


**Fig. 4.** Enabling call transfer signaling

### Step 5: Save the Inbound SIP Trunk

When all required fields in the Create Inbound SIP Trunk form are filled, click **Create** to save your inbound SIP
trunk.

Note

For advanced SIP trunk configuration, see [Advanced Inbound SIP Trunk
documentation](../../voice/inbound-trunks/sip-trunks/sip-trunk-settings-reference.html#user-panel-sipin-trunk-advanced-configuration).

![Create button on the Create Inbound SIP Trunk form](../../_images/inbound2.webp)


**Fig. 5.** Creating the inbound SIP trunk

### Step 6: Locate Your DID Numbers

After creating the Inbound SIP Trunk for Bland AI, locate the DID number(s) that will deliver incoming calls to Bland
AI.

1. In the DIDWW User Panel, go to **Phone Numbers > My Numbers**.
2. Find the DID number(s) you want to connect to Bland AI.

![DID number on the My Numbers page](../../_images/inbound3.webp)


**Fig. 6.** Locating your DID numbers

### Step 7: Assign Inbound SIP Trunk to Your DID Numbers

1. Select the DID number(s) you located in the previous step.
2. At the bottom of the page, click **Batch Actions > Update Trunks**.

![Batch Actions menu with Update Trunks selected for one DID number](../../_images/inbound3.5.webp)


**Fig. 7.** Selecting **Update Trunks** from the Batch Actions menu

3. In **Voice IN trunk**, select the **Bland AI** SIP trunk you created earlier.
4. Click **Confirm** to apply the changes.

![Update Voice IN Trunk window with the Bland AI trunk selected](../../_images/inbound4.webp)


**Fig. 8.** Assigning the Bland AI SIP trunk to the selected DID(s)



---

## 2. Enable Outbound Calling from Bland AI through DIDWW

Configure an Outbound SIP Trunk in the DIDWW User Panel to allow Bland AI to place outbound calls through DIDWW.
This trunk also provides the SIP credentials used for call transfers to external phone numbers.

### Before You Begin

Access to **DIDWW Outbound Trunks** is required for making outbound calls. See [Get Access to DIDWW Outbound
Termination](../../voice/outbound-trunks/get-access.html#user-panel-voice-out-get-access).

### Step 1: Create New Outbound Voice Trunk

1. In the [DIDWW User Panel](https://my.didww.com/#/trunks), go to **Voice > Outbound Trunks**.
2. Click **Create New**.

![Create New button on the Outbound Voice Trunks page](../../_images/outbound1.webp)


**Fig. 9.** Creating a new outbound SIP trunk

### Step 2: Configure Authentication

1. Update the **Friendly Name** (e.g., `Bland AI`).
2. Keep the default **Credentials & IP-Based** authentication method selected. The SIP digest credentials (username and password) will be provided after the trunk is created.
3. In **Allowed SIP IP addresses**, enter the Bland AI signaling and media IP addresses for the region where your Bland AI organization is hosted. For the US region, enter:

   - Signaling: `35.82.60.77/32` and `52.27.163.2/32`
   - Media: `52.13.231.129/32`, `35.160.144.213/32`, `44.234.13.26/32`, and `54.218.96.252/32`

   Bland AI can send outbound calls and call transfers from its media IP addresses, so add both groups. For other
regions, and for the latest IP addresses, see [Bland AI SIP
Integration](https://docs.bland.ai/enterprise-features/SIP-integration) or the **Firewall** step of the Bland AI trunk
setup.

   Then add the DIDWW inbound SIP addresses used for call transfers:

   - New York: `46.19.209.14`
   - Frankfurt: `46.19.210.14`
   - Los Angeles: `46.19.212.14`
   - Miami: `46.19.213.14`
   - Singapore: `46.19.214.14`
   - Hong Kong: `46.19.215.14`
   - Amsterdam: `185.238.173.14`

Warning

You can allow all traffic by adding `0.0.0.0/0`, which removes all IP restrictions.
Although SIP Digest Authentication will still verify requests using valid credentials, this setup is not recommended.
Restrict access to known Bland AI IP addresses whenever possible.

![Create Outbound Trunk form with the Bland AI and DIDWW IP addresses entered](../../_images/outbound2.webp)


**Fig. 10.** Entering allowed SIP IP addresses for outbound authentication

### Step 3: Configure Media Encryption

Important

Bland AI requires **SRTP SDES** media encryption for outbound calls. Configure the trunk to accept SRTP to establish
calls successfully.

1. Expand the **Media** section.
2. In **Media encryption mode**, select **SRTP SDES**.

![Media section with SRTP SDES selected as the media encryption mode](../../_images/outbound_media.webp)


**Fig. 11.** Selecting SRTP SDES media encryption

### Step 4: Save the Outbound SIP Trunk

When all required fields in the Create Outbound Trunk form are filled, click **Create** to save your outbound SIP trunk.

Note

For advanced outbound SIP trunk configuration, see [Outbound SIP Trunk
Guide](../../voice/outbound-trunks/how-to-guides/index.html#outbound-trunk-create).

![Create button on the Create Outbound Trunk form](../../_images/outbound3.webp)


**Fig. 12.** Creating the outbound SIP trunk

### Step 5: Copy Outbound Trunk Credentials

When the outbound trunk is created, you can view its credentials by selecting the key icon in the Credentials column on
the Outbound Trunks page.

1. Go to **Voice > Outbound Trunks**.
2. Locate your outbound trunk and click the **key icon** in the **Credentials** column.
3. The trunk credentials will appear, showing the **Username** and **Password** (click the **eye icon** to reveal the password).
4. Copy and securely store these credentials. You will need them in [Step 6: Add Outbound Credentials to the Inbound Trunk (Optional)](#bland-ai-inbound-authorization) and in [Step 5: Configure Authentication and Outbound Routing](#bland-ai-trunk-authentication).

![Key icon in the Credentials column of the Bland AI outbound trunk](../../_images/outbound4.webp)


**Fig. 13.** Opening the outbound trunk credentials view

### Step 6: Add Outbound Credentials to the Inbound Trunk (Optional)

To support call transfers, configure the inbound trunk with the DIDWW outbound trunk credentials. Skip this step if you
do not need call transfers.

1. Go to **Voice > Inbound Trunks** and locate the Bland AI inbound trunk.
2. Click the **Actions (⋯)** icon, then select **Edit**.
3. Open the **Authorization** tab.
4. Turn on **Enable Authorization**.
5. In **Auth User**, paste the outbound trunk **Username**.
6. In **Auth Password**, paste the outbound trunk **Password**.
7. Click **Submit**.

![Authorization tab of the inbound trunk with Enable Authorization turned on](../../_images/inbound_auth.webp)


**Fig. 14.** Adding outbound trunk credentials to the inbound trunk



---

## 3. Connect DIDWW SIP Trunks in Bland AI

Create a SIP trunk in Bland AI that sends outbound calls directly to DIDWW, then attach your DIDWW number to it.
The same trunk also accepts incoming calls from DIDWW for the attached number.

### Before You Begin

- A **Bland AI account** with SIP trunking enabled is required. [Sign in to Bland AI](https://app.bland.ai/).
- The DIDWW outbound trunk **Username** and **Password** from [Step 5: Copy Outbound Trunk Credentials](#bland-ai-copy-credentials) are required.

### Step 1: Add a New SIP Trunk

1. In the Bland AI dashboard, go to **Deploy > SIP trunks**.
2. Click **Add trunk**.

![Add trunk button on the Bland AI SIP trunks page](../../_images/bland_add_trunk.webp)


**Fig. 15.** Opening the SIP trunk setup wizard

3. Select **Connect a trunk**.
4. Click **Continue**.

![Connect a trunk option in the Bland AI SIP Configuration wizard](../../_images/bland_trunk1.webp)


**Fig. 16.** Selecting the trunk setup

### Step 2: Enter the DIDWW Endpoint

Important

The endpoint must use **TLS** on port `5061`. Include `:5061;transport=tls` in the address so that Bland AI connects to
DIDWW over TLS.

1. In **Which provider are you using?**, select **Other**.
2. In **SIP server address**, enter a DIDWW [outbound signaling endpoint](../../voice/outbound-trunks/outbound-sip-information.html#voice-out-signaling-endpoints) with TLS on port `5061`, for example `sip:lac.us.out.didww.com:5061;transport=tls`. Use the endpoint closest to your Bland AI region.
3. Check that the **Parsed result** shows the DIDWW host, port `5061`, and transport **TLS**.
4. Click **Continue**.

![Provider step with Other selected and the DIDWW TLS endpoint entered](../../_images/bland_trunk2.webp)


**Fig. 17.** Entering the DIDWW signaling endpoint

### Step 3: Confirm Endpoint Discovery

Bland AI probes the DIDWW endpoint and detects the port and transport.

1. Check that the connection attempt to the DIDWW endpoint on `5061/TLS` succeeds and **Endpoint detected** shows port `5061` and transport **TLS**.
2. Click **Continue**.

![Discovery step showing a successful TLS connection to the DIDWW endpoint](../../_images/bland_trunk3.webp)


**Fig. 18.** Confirming the detected DIDWW endpoint

### Step 4: Review the Firewall Settings

The **Firewall** step lists the Bland AI IP addresses and ports. These addresses are already allowed on the DIDWW
outbound trunk from [Step 2: Configure Authentication](#bland-ai-outbound).

1. Select **I've updated my firewall to allow traffic from the IP addresses above**.
2. Click **Continue**.

![Firewall step with the Bland AI IP addresses and the confirmation checkbox selected](../../_images/bland_trunk4.webp)


**Fig. 19.** Confirming the firewall settings

### Step 5: Configure Authentication and Outbound Routing

1. In **Authentication mode**, keep **IP-based (recommended)** selected.
2. In **Outbound call credentials**, enter the DIDWW outbound trunk **Username** in **SIP Username** and the **Password** in **SIP Password**. Bland AI uses these credentials to answer the DIDWW digest authentication challenge.
3. In **Outbound routing**, select **Direct to your carrier (BYOC)**. With this option, Bland AI sends outbound calls directly to DIDWW.
4. Click **Save trunk**.

![Authentication step with IP-based mode, outbound call credentials, and BYOC routing
selected](../../_images/bland_trunk5.webp)


**Fig. 20.** Configuring authentication and outbound routing

### Step 6: Attach Your DIDWW Number

After the trunk is saved, attach your DIDWW number to it.

1. On the **Trunk saved** screen, click **Add numbers to this trunk**.
2. In **Numbers**, enter your DIDWW number in E.164 format with the `+` symbol (e.g., `+18648301018`) and click **Add to list**.
3. Click **Continue**.

![Add numbers step with a DIDWW number added to the list](../../_images/bland_number1.webp)


**Fig. 21.** Adding the DIDWW number

4. In **Set direction**, keep **Both** selected so the number can receive inbound calls and place outbound calls.
5. Click **Continue**.

![Set direction step with Both selected for the DIDWW number](../../_images/bland_number2.webp)


**Fig. 22.** Setting the number direction

6. In **Route via a trunk**, keep **Attach to an existing trunk** selected and select the DIDWW trunk you created. Bland AI names the trunk after its endpoint, for example **Other (lac.us.out.didww.com)**.
7. Click **Save & finish**.

![Route via a trunk step with the DIDWW trunk selected](../../_images/bland_number3.webp)


**Fig. 23.** Attaching the number to the DIDWW trunk

### Step 7: Verify the Trunk Status

Go to **Deploy > SIP trunks** and check that the DIDWW trunk shows **Healthy** and lists your number.

![SIP trunks page showing the DIDWW trunk as Healthy with one number attached](../../_images/bland_sip_trunks.webp)


**Fig. 24.** DIDWW trunk connected in Bland AI



---

## 4. Assign an Agent and Configure Call Transfers

Assign a Bland AI pathway to your DIDWW number to handle incoming calls. Optionally, add a **Transfer Call** node that
uses SIP REFER to transfer calls to a live agent through DIDWW.

### Before You Begin

A Bland AI **pathway** is required. See the [Bland AI Conversational Pathways
documentation](https://docs.bland.ai/tutorials/pathways) for guidance on creating a pathway.

### Step 1: Assign the Pathway to Your DIDWW Number

1. In the Bland AI dashboard, go to **Deploy > Phone numbers**.
2. Locate your DIDWW number and click **Configure**.

![Configure button next to the DIDWW number on the Bland AI Phone Numbers page](../../_images/bland_numbers_list.webp)


**Fig. 25.** Opening the number configuration

3. In the **Basic** section, select **Pathway**.
4. Select the pathway that will handle incoming calls, and set **Pathway Version** to **Production**.
5. Click **Save Inbound Call Changes**.

![Inbound number settings with a pathway and the Production version selected](../../_images/bland_number_config.webp)


**Fig. 26.** Assigning the pathway to the DIDWW number

### Step 2: Add a SIP REFER Transfer Node (Optional)

Add a transfer node only if callers should be able to reach a live agent. Inbound and outbound calling work without it.

1. In the Bland AI dashboard, go to **Build > Pathways** and open the pathway that will handle your DIDWW calls.
2. Add a node and connect it to the node where the transfer should start. Give the connecting edge a label that describes when to transfer, for example `user asks to be transferred`.

![Pathway with an edge labeled user asks to be transferred leading to a Transfer Call
node](../../_images/bland_pathway1.webp)


**Fig. 27.** Adding a transfer node to the pathway

3. Open the node, enter a **Title** (e.g., `Transfer to agent`), and set **Type** to **Transfer Call**.
4. In **Transfer Type**, select **DID / SIP target**.
5. In **Transfer Target**, enter the destination number in E.164 format with the `+` symbol (e.g., `+447700900123`).
6. Turn on **SIP REFER transfer**. Bland AI then hands the call back to DIDWW with a SIP REFER request, and DIDWW connects the caller to the destination through your outbound trunk.
7. Keep **Cold Transfer** selected.
8. Click **Sync now** to save the node, then click **Deploy** to publish the pathway to production.

![Transfer Call node with DID or SIP target, the destination number, SIP REFER transfer, and Cold Transfer
selected](../../_images/bland_pathway2.webp)


**Fig. 28.** Configuring the SIP REFER transfer

Note

SIP REFER transfers work only for calls that arrive at Bland AI over SIP, such as inbound calls from your DIDWW number.
The DIDWW inbound trunk must allow transfers ([Step 4: Enable Call Transfer Signaling
(Optional)](#bland-ai-create-inbound-trunk)) and use the outbound trunk credentials ([Step 6: Add Outbound Credentials
to the Inbound Trunk (Optional)](#bland-ai-inbound-authorization)).

---

## 5. Test the Configuration

Verify that inbound calling, outbound calling, and call transfers are working as expected.

1. Place a test call to your **DIDWW DID number** to confirm that the call is routed to Bland AI and handled by the assigned pathway.
2. If you configured call transfers, trigger the transfer condition, for example by asking to speak with a live person, and confirm that the call is connected to the transfer destination through DIDWW.
3. To test outbound calling, in the Bland AI dashboard, go to **Deploy > Send call**.
4. In **Phone Number**, enter the destination number.
5. Select **Pathway** and choose the pathway, or select **Prompt** and enter a prompt for the call.
6. In **Dispatch Settings**, select your DIDWW number as the **From Number**.
7. Click **Send Call**.

![Send call page with the DIDWW number selected as the From Number](../../_images/bland_send_call.webp)


**Fig. 29.** Placing a test outbound call from the DIDWW number

Ensure that calls are successfully established in both directions, that the correct pathway handles the interaction, and
that transferred calls connect with two-way audio.

Note

You can review call activity and verify call status or error codes in the DIDWW **Inbound** and **Outbound Call Logs**.
See [Inbound Call Logs](../../logs-analytics/call-logs/inbound-logs.html#inbound-cdr-logs) and [Outbound Call
Logs](../../logs-analytics/call-logs/outbound-logs.html#outbound-cdr-logs) for more details.

## Troubleshooting

Inbound calls do not reach Bland AI

Check that the DIDWW inbound trunk uses **TLS** on port `5061`, **SRTP SDES**, and the Bland AI SIP endpoint for your
region.
Bland AI does not accept unencrypted SIP or RTP.

**488 Not Acceptable Here**

A possible cause is a media encryption mismatch. Check that **SRTP Mode** is set to **SRTP SDES** on the DIDWW inbound
trunk and that **Media encryption mode** is set to **SRTP SDES** on the DIDWW outbound trunk.
Also check that both trunks offer a codec that Bland AI supports, such as **PCMU** or **PCMA**.

**403 Forbidden** on outbound calls or transfers

If the **403** arrives immediately, without a preceding authentication challenge, a possible cause is that the request
comes from an IP address that the DIDWW outbound trunk does not allow.
Check that all Bland AI signaling and media IP addresses for your region are listed in **Allowed SIP IP addresses** on
the DIDWW outbound trunk.
If the **403** follows an authentication challenge, check that the **SIP Username** and **SIP Password** in Bland AI
match the DIDWW outbound trunk credentials.

Calls to a destination country are blocked

Bland AI may block calls to some destination countries before the call reaches DIDWW. If Bland AI reports that calls to
a country are not available, contact Bland AI support.

Call transfers fail

Check that the DIDWW inbound trunk has **Max Transfers** set to `1` or higher and that **Enable Authorization** uses the
outbound trunk **Username** and **Password**.
Also check that the DIDWW inbound SIP addresses are listed in **Allowed SIP IP addresses** on the outbound trunk and
that **SIP REFER transfer** is turned on in the Transfer Call node.

For Bland AI diagnostics, see the [Bland AI SIP Integration
documentation](https://docs.bland.ai/enterprise-features/SIP-integration).

## Related resources

- [Outbound SIP information](../../voice/outbound-trunks/outbound-sip-information.html#voice-out-signaling-endpoints) - Look up DIDWW outbound signaling endpoints, transport ports, and the digest realm.
- [SIP connectivity reference](../../voice/inbound-trunks/sip-trunks/sip-connectivity-reference.html#service-did-sip) - Look up the DIDWW SIP IP addresses used for inbound calls.
- [Inbound Call Logs](../../logs-analytics/call-logs/inbound-logs.html#inbound-cdr-logs) - Review inbound call status and error codes.
- [Outbound Call Logs](../../logs-analytics/call-logs/outbound-logs.html#outbound-cdr-logs) - Review outbound call status and error codes.
