> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# DIDWW SIP integration

> Set up DIDWW SIP trunking with Vapi. Create inbound and outbound trunks, allowlist signaling IPs, and configure authenticated SIP REFER call transfers.

## Before you begin

* An active DIDWW account is required. [Sign in](https://my.didww.com/users/sign_in) or [create an account](https://my.didww.com/users/sign_up#/users/sign_up).
* Access to [DIDWW Outbound Trunks](https://doc.didww.com/voice/outbound-trunks/get-access.html) is required.
* A Vapi account and assistant is required.

## 1. Route incoming calls to Vapi

Create a DIDWW inbound SIP trunk that sends calls from your DIDWW numbers to Vapi.

#### Create an inbound SIP trunk

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

#### Configure the required trunk fields

In the **General** tab, configure every field below:

| Field                | Value                                                                                                                                     |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**             | A descriptive name, such as `Vapi`                                                                                                        |
| **Endpoint type**    | **Static Endpoint**                                                                                                                       |
| **Host**             | `sip.vapi.ai` for US organizations or `sip.eu.vapi.ai` for EU organizations                                                               |
| **Transport**        | **UDP**, **TCP**, or **TLS**                                                                                                              |
| **Port**             | `5060` for UDP/TCP or `5061` for TLS                                                                                                      |
| **Network Protocol** | Match the IP version allowed on the DIDWW outbound trunk; use **Prefer IPv4 over IPv6** or **IPv4 only** when allowlisting IPv4 addresses |

![DIDWW inbound SIP trunk General tab with host, endpoint type, transport, and port fields configured for Vapi](/_fern-img/5cad081681aa8f1fcee215ec58c5da4ec2011cda392e9d5759149e0e82ed0b98.webp)

#### Enable call transfer signaling

In the **Signalling** tab, set **Max transfers** to `1` or higher. This permits the in-dialog SIP REFER requests used for call transfers.

![DIDWW inbound trunk Signalling tab with Max transfers set to 1](/_fern-img/cf8d9d2db9460dfee3dac5c4338bcf290a73bdbb46edee39016546561a4ee5f8.webp)

#### Save the inbound trunk

Click **Create**. For additional DIDWW options, see the [inbound SIP trunk guide](https://doc.didww.com/voice/inbound-trunks/creating-a-new-sip-trunk.html).

## 2. Enable outbound calling through DIDWW

Create a DIDWW outbound trunk for Vapi calls and for authenticated SIP REFER transfers.

#### Create an outbound voice trunk

In the DIDWW User Panel, go to **Voice → Outbound Trunks** and click **Create New**.

#### Configure authentication and allowed IPs

Set a **Friendly Name**, such as `Vapi`, and keep **Credentials & IP-based** authentication selected.

Under **Allowed SIP IP addresses**, add the signaling addresses for your Vapi region:

| Region | Vapi signaling IPs                       |
| ------ | ---------------------------------------- |
| US     | `44.229.228.186/32`, `44.238.177.138/32` |
| EU     | `63.182.83.170/32`                       |

To support call transfers, also add all DIDWW inbound signaling addresses:

```text
46.19.209.14
46.19.210.14
46.19.212.14
46.19.213.14
46.19.214.14
46.19.215.14
185.238.173.14
```

![DIDWW outbound trunk Allowed SIP IP addresses list containing the Vapi and DIDWW signaling addresses](/_fern-img/03f52ad49634d8362b588089a883c7c01f0338e9d9670f9114f440abd1969652.webp)

> **Warning**
>
> Do not use `0.0.0.0/0` in production. Restrict the trunk to the current [Vapi signaling IPs](/advanced/sip/sip-networking#sip-signalling) and [DIDWW SIP servers](https://doc.didww.com/voice/inbound-trunks/technical-data/sip.html#service-did-sip).

#### Save the outbound trunk

Click **Create** to save it.

#### Copy the outbound credentials

On **Voice → Outbound Trunks**, click the key icon in the trunk's **Credentials** column. Copy the **Username** and **Password**; you will use both in DIDWW and Vapi.

![DIDWW outbound trunk credentials dialog showing the username and password fields](/_fern-img/7e1af66b46af83b5666729db95feab833a6b0710b52abb08c8f6bbbca9298982.webp)

#### Authorize transfers on the inbound trunk

Edit the Vapi inbound trunk and open **Authorization**. Turn on **Enable Authorization**, paste the outbound trunk **Username** and **Password** into **Auth User** and **Auth Password**, then click **Submit**.

![DIDWW inbound trunk Authorization tab with Enable Authorization turned on and the Auth User and Auth Password fields filled](/_fern-img/5b4fd3c468c31eae474cd94655c2942bdd450ae9349630b1937f90606ea254f1.webp)

For more detail, see [Add outbound credentials to the inbound trunk](https://doc.didww.com/integrations/vapi/index.html#step-5-add-outbound-credentials-to-the-inbound-trunk).

## 3. Connect the SIP trunks in Vapi

Use the same transport and port on both sides. In API examples, use `https://api.vapi.ai` for US organizations or replace it with `https://api.eu.vapi.ai` for EU organizations.

### Step 1: Create the outbound trunk

#### Dashboard

In the [Vapi dashboard](https://dashboard.vapi.ai), select your organization name in the top left, then click **Settings**. Under organization settings, go to **Integrations → SIP Trunk** and click **Configure New SIP Trunk**.

1. Set **Name** to `DIDWW Outbound Trunk`.
2. Set **IP Address / Domain** to a [DIDWW outbound endpoint](https://doc.didww.com/voice/outbound-trunks/technical-data/sip-details.html#voice-out-signaling-endpoints), such as `fra.eu.out.didww.com`.
3. Select the transport and port: `5060` for UDP/TCP or `5061` for TLS.
4. Turn off **Allow inbound calls** and leave **Allow outbound calls** on.

![Vapi SIP trunk configuration with the DIDWW outbound endpoint, transport, port, and outbound calls enabled](/_fern-img/6a2a23f3104fa1840a115dc30c209b1f33754eca2a4b69903d4bb3cee5fe56f8.webp)

5. Under **Authentication**, enter the DIDWW outbound username and password. Leave SIP registration off and save the trunk.

![Vapi SIP trunk Authentication section with the DIDWW outbound username and password entered](/_fern-img/6f16d1fe15806a7565c960a9799d64f9caf48d8d5caaa219b6ee0faef53f6ec0.webp)

#### cURL

```bash
curl -X POST https://api.vapi.ai/credential \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "DIDWW Outbound Trunk",
    "gateways": [
      {
        "ip": "YOUR_DIDWW_OUTBOUND_ENDPOINT",
        "port": 5060,
        "inboundEnabled": false,
        "outboundEnabled": true,
        "outboundProtocol": "udp"
      }
    ],
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_DIDWW_TRUNK_USERNAME",
      "authPassword": "YOUR_DIDWW_TRUNK_PASSWORD"
    }
  }'
```

Replace the endpoint with the DIDWW signaling endpoint selected for your deployment.

### Step 2: Create the inbound trunk

#### Dashboard

Create another Vapi SIP trunk named `DIDWW Inbound Trunk`.

1. Add one gateway for each DIDWW IP below, using netmask `32` and the same port as the DIDWW inbound trunk.
2. For every gateway, turn on **Allow inbound calls** and turn off **Allow outbound calls**.

![Vapi SIP trunk with one inbound gateway per DIDWW signaling IP address](/_fern-img/efb716a3056e5f592a5e18bcd96658afa0709a72deab84e41e66c44c229c13e7.webp)

3. Under **Authentication**, enter the DIDWW outbound username and password, then save the trunk.

```text
46.19.209.14
46.19.210.14
46.19.212.14
46.19.213.14
46.19.214.14
46.19.215.14
185.238.173.14
```

![Vapi inbound SIP trunk Authentication section with the DIDWW credentials entered](/_fern-img/36606bbee2264271b28b318b08b2ff75976a25096f1b5de3416d33af51a1de2a.webp)

#### cURL

```bash
curl -X POST https://api.vapi.ai/credential \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "DIDWW Inbound Trunk",
    "gateways": [
      { "ip": "46.19.209.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false },
      { "ip": "46.19.210.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false },
      { "ip": "46.19.212.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false },
      { "ip": "46.19.213.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false },
      { "ip": "46.19.214.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false },
      { "ip": "46.19.215.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false },
      { "ip": "185.238.173.14", "port": 5060, "netmask": 32, "inboundEnabled": true, "outboundEnabled": false }
    ],
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_DIDWW_TRUNK_USERNAME",
      "authPassword": "YOUR_DIDWW_TRUNK_PASSWORD"
    }
  }'
```

Save the returned credential `id`; it is required when you [import the DIDWW number](/phone-numbers/didww).

### Step 3: Create a call transfer tool

#### Dashboard

In Vapi, go to **Tools → Create Tool → Transfer Call**.

1. Enter a tool name and describe when the assistant should transfer the caller.
2. Add a **SIP** destination.
3. Set **SIP URI** to `sip:+E164_NUMBER@OUTBOUND_ENDPOINT`, for example `sip:+447700900123@fra.eu.out.didww.com`.
4. Add the customer message and destination description, keep **Blind Transfer**, and save.

![Vapi Transfer Call tool with a SIP destination whose URI points to a DIDWW outbound endpoint](/_fern-img/8ca43ac779d7ad60d00da63fb41d3809d082b84db2a3a9e5859b34aca3f55c75.webp)

#### cURL

```bash
curl -X POST https://api.vapi.ai/tool \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "transferCall",
    "destinations": [
      {
        "type": "sip",
        "sipUri": "sip:+447700900123@YOUR_DIDWW_OUTBOUND_ENDPOINT",
        "message": "Please wait while I transfer your call.",
        "description": "Use when the caller asks to speak with a live person.",
        "transferPlan": {
          "mode": "blind-transfer",
          "sipVerb": "refer"
        }
      }
    ]
  }'
```

Save the returned tool `id` for the next step.

### Step 4: Add the transfer tool to your assistant

#### Dashboard

Open the assistant, go to **Tools → Add tool**, and select the transfer tool. Click **Publish**, then confirm the publication.

![Vapi assistant Tools section with the DIDWW transfer tool added](/_fern-img/77cd1aac02080c95730e0306de46a7cc7c5a527107a6be6705e3e83cca12fe09.webp)

#### cURL

Retrieve the assistant, add the transfer tool ID to `model.toolIds`, and PATCH the complete model back. The example uses `jq` to preserve the existing model configuration and tool IDs.

```bash
VAPI_API_BASE="https://api.vapi.ai"
ASSISTANT_ID="YOUR_ASSISTANT_ID"
TRANSFER_TOOL_ID="YOUR_TRANSFER_TOOL_ID"

CURRENT_MODEL=$(curl -s "$VAPI_API_BASE/assistant/$ASSISTANT_ID" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" | jq '.model')

UPDATED_MODEL=$(printf '%s' "$CURRENT_MODEL" | jq \
  --arg toolId "$TRANSFER_TOOL_ID" \
  '.toolIds = (((.toolIds // []) + [$toolId]) | unique)')

jq -n --argjson model "$UPDATED_MODEL" '{model: $model}' | \
  curl -X PATCH "$VAPI_API_BASE/assistant/$ASSISTANT_ID" \
    -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @-
```

## Next step

**[Import a number from DIDWW](/phone-numbers/didww):** Purchase or select a DIDWW number, assign the inbound trunk, and import the number into Vapi.