# Update Outbound Trunk

Updates an outbound trunk.

In version `2026-11-19`, customers with the Outbound API enabled can update outbound trunks even if the Outbound feature
is not enabled on the account. Without the Outbound API, the request returns `403 Forbidden`.

## Request

HTTP Method: `PATCH`

URI Path: `/v3/voice_out_trunks/{id}`

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| id | `string` | Yes | Unique identifier of the outbound trunk. |

### Data Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| name | `string` | No | No | The outbound trunk name. |
| external\_reference\_id | `string` | Yes | No | Optional identifier for the outbound trunk in the customer's external system. Maximum length is 100 characters. |
| allowed\_rtp\_ips | Array of `strings` | Yes | No | Allowed RTP IP addresses for media traffic. Null means no restriction. An empty list is rejected. `0.0.0.0/0` and `::/0` are rejected. |
| authentication\_method | `object` | No | No | Authentication method object. Supported PATCH target types are `credentials_and_ip` and `twilio`. `ip_only` may be returned by `GET` endpoints but cannot be set through `PATCH`. |
| on\_cli\_mismatch\_action | `string` | No | No | Possible values: `send_original_cli` - pass the original `From` header value from your system to the destination without modification. `reject_call` - reject the call if the `From` header value does not match any DID allowed on the trunk. `replace_cli` - replace the CLI with one of the DIDs allowed on the trunk. `randomize_cli` - replace the CLI with a random DID allowed on the trunk. An action the account does not have the feature for is rejected. |
| capacity\_limit | `integer` | Yes | No | The capacity limit of the outbound trunk. Allowed values from 1 to 32767. |
| allow\_any\_did\_as\_cli | `boolean` | No | No | When set to `true`, all eligible DIDs can be used as CLI and the `dids` relationship must not contain explicit DIDs. |
| status | `string` | No | No | Possible values: `active` - the trunk can be used for outbound traffic. `blocked` - outbound traffic on the trunk is blocked. |
| threshold\_amount | `string` | No | No | The outbound trunk 24-hour threshold limit. The accepted range depends on the account. |
| default\_dst\_action | `string` | No | No | Possible values: `allow_all` - allow calls to all destinations except the prefixes listed in `dst_prefixes`. `reject_all` - reject calls to all destinations except the prefixes listed in `dst_prefixes`. |
| dst\_prefixes | Array of `strings` | No | No | The destination prefixes allowed or rejected based on `default_dst_action`. Each prefix is digits only, without a leading `+` or separators; any other value returns `422 Unprocessable Entity`. Repeated prefixes are stored once. |
| emergency\_enable\_all | `boolean` | No | No | Allows all eligible DIDs to be used for emergency calling on the trunk. |
| media\_encryption\_mode | `string` | No | No | Media encryption mode. Possible values: `disabled` - media encryption is turned off. `srtp_sdes` - use SRTP encryption with SDES key exchange. `srtp_dtls` - use SRTP encryption with DTLS key exchange. `zrtp` - use SRTP encryption with ZRTP key exchange. |
| ice\_mode | `string` | No | No | ICE (Interactive Connectivity Establishment) for calls from the trunk: not used, accepted when the trunk offers it, or initiated by DIDWW. Possible values: `disabled`, `accept`, `initiate`. |
| rtcp\_mux\_mode | `string` | No | No | RTP and RTCP multiplexed on one port: not used, accepted when the trunk offers it, or initiated by DIDWW. Possible values: `disabled`, `accept`, `initiate`. |
| rtcp\_feedback\_mode | `string` | No | No | RTCP feedback (AVPF): not used, accepted when the trunk offers it, or initiated by DIDWW. Possible values: `disabled`, `accept`, `initiate`. With `disabled`, a call whose SDP offer uses a feedback profile (`RTP/AVPF` or `UDP/TLS/RTP/SAVPF`) is rejected with SIP `500 No suitable media`. WebRTC clients always offer such a profile, so use `accept` or `initiate` for them. |
| codecs | Array of `strings` | No | No | Codecs offered on calls from the trunk, in priority order: the first has the highest priority. Send at least one value, without repeats. Possible values: `telephone_event`, `g723`, `g729`, `pcmu`, `pcma`, `gsm`, `g722`, `opus`, `amr`, `amr_wb`. |
| callback\_url | `string` | Yes | No | Can be `null` or a valid HTTP(S) URL. |
| force\_symmetric\_rtp | `boolean` | No | No | Enables symmetric RTP / COMEDIA mode. |
| rtp\_ping | `boolean` | No | No | Enables RTP ping after the call is connected. |
| rtp\_timeout | `integer` | No | No | Disconnects the call if RTP packets do not arrive within the specified time. Supported values are from 30 to 600 seconds. |

See [Outbound Trunk callback details](../../callbacks-details.html#callbacks-voice-out-trunk-v35) for
information about `callback_url` and the JSON callback payload.

### Request Body Object Relationships

| Title | Type | Description |
| --- | --- | --- |
| default\_did | [DID Object](../did/did-object.html#did-object-v35) | The DID used as the caller ID. Required while `on_cli_mismatch_action` is `replace_cli`, and rejected otherwise. Only accepted on accounts with the `replace_cli` feature. Send `data: null` to clear it. |
| dids | [DIDs](../did/index.html#dids-v35) | The DID numbers explicitly allowed as CLI when `allow_any_did_as_cli` is `false`. A DID that is awaiting registration (`awaiting_registration` is `true`) cannot be used as an allowed CLI: the request returns `422 Unprocessable Entity` with one error per such DID. |
| emergency\_dids | [DIDs](../did/index.html#dids-v35) | The DID numbers explicitly enabled for emergency calling when `emergency_enable_all` is `false`. |

### Authentication Method

Supported authentication method types:

- `credentials_and_ip` - uses SIP credentials together with allowed IP addresses.
- `twilio` - uses a Twilio Account SID for authentication.
- `ip_only` - may be returned by `GET` endpoints, but `PATCH` does not allow changing `authentication_method.type` to `ip_only`.

Note

After changing the authentication type, the previous authentication attributes are cleared.

#### Authentication Method Attributes by Type

credentials\_and\_iptwilio

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| allowed\_sip\_ips | Array of `strings` | No | Yes | The allowed originating SIP IPs. |
| tech\_prefix | `string` | Yes | No | Prefix stripped from the dialled number before routing. The maximum length is 8 characters and only digits and `#` are supported. |

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| twilio\_account\_sid | `string` | No | Yes | The Twilio Account SID. It is a 34-character identifier of the Twilio account. |

## Examples

Switch ip\_only to twilioSwitch twilio to credentials\_and\_ipSwitch credentials\_and\_ip to twilioSwitch ip\_only to
credentials\_and\_ipUpdate selected emergency DIDsUpdate ICE and RTCP modesInvalid change to ip\_only422 DID awaiting
registration

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "authentication_method": {
13        "type": "twilio",
14        "attributes": {
15          "twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
16        }
17      },
18      "allowed_rtp_ips": null,
19      "codecs": [
20        "pcma",
21        "pcmu",
22        "g729",
23        "g723",
24        "gsm",
25        "telephone_event"
26      ]
27    }
28  }
29}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": null, "authentication_method": {"attributes": {"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"}, "type": "twilio"}, "codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"]}, "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f", "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
 7    "type": "voice_out_trunks",
 8    "attributes": {
 9      "name": "Outbound trunk Name",
10      "allowed_rtp_ips": null,
11      "authentication_method": {
12        "type": "twilio",
13        "attributes": {
14          "twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
15        }
16      },
17      "on_cli_mismatch_action": "send_original_cli",
18      "capacity_limit": 300,
19      "allow_any_did_as_cli": false,
20      "status": "blocked",
21      "threshold_reached": false,
22      "threshold_amount": "1000.0",
23      "default_dst_action": "allow_all",
24      "dst_prefixes": ["23", "45"],
25      "emergency_enable_all": false,
26      "media_encryption_mode": "disabled",
27      "ice_mode": "accept",
28      "rtcp_mux_mode": "accept",
29      "rtcp_feedback_mode": "accept",
30      "codecs": [
31        "pcma",
32        "pcmu",
33        "g729",
34        "g723",
35        "gsm",
36        "telephone_event"
37      ],
38      "force_symmetric_rtp": true,
39      "rtp_ping": true,
40      "rtp_timeout": 30,
41      "callback_url": null,
42      "created_at": "2025-04-02T10:00:00.000Z",
43      "external_reference_id": null
44    },
45    "relationships": {
46      "dids": {
47        "links": {
48          "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
49          "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
50        }
51      },
52      "emergency_dids": {
53        "links": {
54          "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
55          "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
56        }
57      }
58    },
59    "meta": {
60      "spent_amount": "12.34"
61    }
62  },
63  "meta": {
64    "api_version": "2026-11-19"
65  }
66}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "allowed_rtp_ips": [
13        "203.0.113.0/24"
14      ],
15      "authentication_method": {
16        "type": "credentials_and_ip",
17        "attributes": {
18          "allowed_sip_ips": [
19            "0.0.0.0/0"
20          ],
21          "tech_prefix": null
22        }
23      },
24      "codecs": [
25        "pcma",
26        "pcmu",
27        "g729",
28        "g723",
29        "gsm",
30        "telephone_event"
31      ]
32    }
33  }
34}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": ["203.0.113.0/24"], "authentication_method": {"attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix": null}, "type": "credentials_and_ip"}, "codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"]}, "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42", "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
 7    "type": "voice_out_trunks",
 8    "attributes": {
 9      "name": "Outbound trunk Name",
10      "allowed_rtp_ips": [
11        "203.0.113.0/24"
12      ],
13      "authentication_method": {
14        "type": "credentials_and_ip",
15        "attributes": {
16          "allowed_sip_ips": [
17            "0.0.0.0/0"
18          ],
19          "tech_prefix": null,
20          "username": "554******",
21          "password": "fqe******"
22        }
23      },
24      "on_cli_mismatch_action": "send_original_cli",
25      "capacity_limit": 100,
26      "allow_any_did_as_cli": true,
27      "status": "active",
28      "threshold_reached": false,
29      "threshold_amount": "10000.0",
30      "default_dst_action": "allow_all",
31      "dst_prefixes": [],
32      "emergency_enable_all": false,
33      "media_encryption_mode": "disabled",
34      "ice_mode": "accept",
35      "rtcp_mux_mode": "accept",
36      "rtcp_feedback_mode": "accept",
37      "codecs": [
38        "pcma",
39        "pcmu",
40        "g729",
41        "g723",
42        "gsm",
43        "telephone_event"
44      ],
45      "force_symmetric_rtp": false,
46      "rtp_ping": false,
47      "rtp_timeout": 30,
48      "callback_url": null,
49      "created_at": "2025-04-02T10:00:00.000Z",
50      "external_reference_id": null
51    },
52    "relationships": {
53      "dids": {
54        "links": {
55          "self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/dids",
56          "related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/dids"
57        }
58      },
59      "emergency_dids": {
60        "links": {
61          "self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/emergency_dids",
62          "related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/emergency_dids"
63        }
64      }
65    },
66    "meta": {
67      "spent_amount": "12.34"
68    }
69  },
70  "meta": {
71    "api_version": "2026-11-19"
72  }
73}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "authentication_method": {
13        "type": "twilio",
14        "attributes": {
15          "twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
16        }
17      },
18      "allowed_rtp_ips": null,
19      "codecs": [
20        "pcma",
21        "pcmu",
22        "g729",
23        "g723",
24        "gsm",
25        "telephone_event"
26      ]
27    }
28  }
29}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": null, "authentication_method": {"attributes": {"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"}, "type": "twilio"}, "codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"]}, "id": "03813615-da15-4e3b-8e0a-3ea64b2585de", "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
 7    "type": "voice_out_trunks",
 8    "attributes": {
 9      "name": "Outbound trunk Name",
10      "allowed_rtp_ips": null,
11      "authentication_method": {
12        "type": "twilio",
13        "attributes": {
14          "twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
15        }
16      },
17      "on_cli_mismatch_action": "send_original_cli",
18      "capacity_limit": 100,
19      "allow_any_did_as_cli": true,
20      "status": "active",
21      "threshold_reached": false,
22      "threshold_amount": "10000.0",
23      "default_dst_action": "allow_all",
24      "dst_prefixes": [],
25      "emergency_enable_all": false,
26      "media_encryption_mode": "disabled",
27      "ice_mode": "accept",
28      "rtcp_mux_mode": "accept",
29      "rtcp_feedback_mode": "accept",
30      "codecs": [
31        "pcma",
32        "pcmu",
33        "g729",
34        "g723",
35        "gsm",
36        "telephone_event"
37      ],
38      "force_symmetric_rtp": false,
39      "rtp_ping": false,
40      "rtp_timeout": 30,
41      "callback_url": null,
42      "created_at": "2025-04-02T10:00:00.000Z",
43      "external_reference_id": null
44    },
45    "relationships": {
46      "dids": {
47        "links": {
48          "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/dids",
49          "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/dids"
50        }
51      },
52      "emergency_dids": {
53        "links": {
54          "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/emergency_dids",
55          "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/emergency_dids"
56        }
57      }
58    },
59    "meta": {
60      "spent_amount": "12.34"
61    }
62  },
63  "meta": {
64    "api_version": "2026-11-19"
65  }
66}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "allowed_rtp_ips": [
13        "203.0.113.0/24"
14      ],
15      "authentication_method": {
16        "type": "credentials_and_ip",
17        "attributes": {
18          "allowed_sip_ips": [
19            "0.0.0.0/0"
20          ],
21          "tech_prefix": null
22        }
23      },
24      "codecs": [
25        "pcma",
26        "pcmu",
27        "g729",
28        "g723",
29        "gsm",
30        "telephone_event"
31      ]
32    }
33  }
34}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": ["203.0.113.0/24"], "authentication_method": {"attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix": null}, "type": "credentials_and_ip"}, "codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"]}, "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f", "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
 7    "type": "voice_out_trunks",
 8    "attributes": {
 9      "name": "Outbound trunk Name",
10      "allowed_rtp_ips": [
11        "203.0.113.0/24"
12      ],
13      "authentication_method": {
14        "type": "credentials_and_ip",
15        "attributes": {
16          "allowed_sip_ips": [
17            "0.0.0.0/0"
18          ],
19          "tech_prefix": null,
20          "username": "554******",
21          "password": "fqe******"
22        }
23      },
24      "on_cli_mismatch_action": "send_original_cli",
25      "capacity_limit": 100,
26      "allow_any_did_as_cli": true,
27      "status": "active",
28      "threshold_reached": false,
29      "threshold_amount": "10000.0",
30      "default_dst_action": "allow_all",
31      "dst_prefixes": [],
32      "emergency_enable_all": true,
33      "media_encryption_mode": "disabled",
34      "ice_mode": "accept",
35      "rtcp_mux_mode": "accept",
36      "rtcp_feedback_mode": "accept",
37      "codecs": [
38        "pcma",
39        "pcmu",
40        "g729",
41        "g723",
42        "gsm",
43        "telephone_event"
44      ],
45      "force_symmetric_rtp": false,
46      "rtp_ping": false,
47      "rtp_timeout": 30,
48      "callback_url": null,
49      "created_at": "2025-04-02T10:00:00.000Z",
50      "external_reference_id": null
51    },
52    "relationships": {
53      "dids": {
54        "links": {
55          "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
56          "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
57        }
58      },
59      "emergency_dids": {
60        "links": {
61          "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
62          "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
63        }
64      }
65    },
66    "meta": {
67      "spent_amount": "12.34"
68    }
69  },
70  "meta": {
71    "api_version": "2026-11-19"
72  }
73}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2 HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "9c91f03e-8796-4e6a-8c12-00e4f334f9b2",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "emergency_enable_all": false,
13      "codecs": [
14        "pcma",
15        "pcmu",
16        "g729",
17        "g723",
18        "gsm",
19        "telephone_event"
20      ]
21    },
22    "relationships": {
23      "emergency_dids": {
24        "data": [
25          {
26            "id": "7158ac26-392f-47d1-89ab-c8b3f5ec05d9",
27            "type": "dids"
28          },
29          {
30            "id": "67a90c09-1bff-4bc3-a35e-116fda2b0d22",
31            "type": "dids"
32          }
33        ]
34      }
35    }
36  }
37}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"], "emergency_enable_all": false}, "id": "9c91f03e-8796-4e6a-8c12-00e4f334f9b2", "relationships": {"emergency_dids": {"data": [{"id": "7158ac26-392f-47d1-89ab-c8b3f5ec05d9", "type": "dids"}, {"id": "67a90c09-1bff-4bc3-a35e-116fda2b0d22", "type": "dids"}]}}, "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "9c91f03e-8796-4e6a-8c12-00e4f334f9b2",
 7    "type": "voice_out_trunks",
 8    "attributes": {
 9      "name": "Outbound trunk for emergency DIDs",
10      "allowed_rtp_ips": [
11        "203.0.113.0/24"
12      ],
13      "authentication_method": {
14        "type": "credentials_and_ip",
15        "attributes": {
16          "allowed_sip_ips": [
17            "0.0.0.0/0"
18          ],
19          "tech_prefix": null,
20          "username": "554******",
21          "password": "fqe******"
22        }
23      },
24      "on_cli_mismatch_action": "send_original_cli",
25      "capacity_limit": 100,
26      "allow_any_did_as_cli": true,
27      "status": "active",
28      "threshold_reached": false,
29      "threshold_amount": "10000.0",
30      "default_dst_action": "allow_all",
31      "dst_prefixes": [],
32      "emergency_enable_all": false,
33      "media_encryption_mode": "disabled",
34      "ice_mode": "accept",
35      "rtcp_mux_mode": "accept",
36      "rtcp_feedback_mode": "accept",
37      "codecs": [
38        "pcma",
39        "pcmu",
40        "g729",
41        "g723",
42        "gsm",
43        "telephone_event"
44      ],
45      "force_symmetric_rtp": false,
46      "rtp_ping": false,
47      "rtp_timeout": 30,
48      "callback_url": null,
49      "created_at": "2025-04-02T10:00:00.000Z",
50      "external_reference_id": null
51    },
52    "relationships": {
53      "dids": {
54        "links": {
55          "self": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/relationships/dids",
56          "related": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/dids"
57        }
58      },
59      "emergency_dids": {
60        "links": {
61          "self": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/relationships/emergency_dids",
62          "related": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/emergency_dids"
63        }
64      }
65    },
66    "meta": {
67      "spent_amount": "12.34"
68    }
69  },
70  "meta": {
71    "api_version": "2026-11-19"
72  }
73}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "ice_mode": "initiate",
13      "rtcp_mux_mode": "initiate",
14      "rtcp_feedback_mode": "initiate",
15      "codecs": [
16        "pcma",
17        "pcmu",
18        "g729",
19        "g723",
20        "gsm",
21        "telephone_event"
22      ]
23    }
24  }
25}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"], "ice_mode": "initiate", "rtcp_feedback_mode": "initiate", "rtcp_mux_mode": "initiate"}, "id": "03813615-da15-4e3b-8e0a-3ea64b2585de", "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
 7    "type": "voice_out_trunks",
 8    "attributes": {
 9      "name": "Outbound trunk Name",
10      "allowed_rtp_ips": [
11        "203.0.113.0/24"
12      ],
13      "authentication_method": {
14        "type": "credentials_and_ip",
15        "attributes": {
16          "allowed_sip_ips": [
17            "0.0.0.0/0"
18          ],
19          "tech_prefix": null,
20          "username": "554******",
21          "password": "fqe******"
22        }
23      },
24      "allow_any_did_as_cli": true,
25      "status": "active",
26      "on_cli_mismatch_action": "send_original_cli",
27      "capacity_limit": 100,
28      "threshold_reached": false,
29      "threshold_amount": "10000.0",
30      "media_encryption_mode": "disabled",
31      "ice_mode": "initiate",
32      "rtcp_mux_mode": "initiate",
33      "rtcp_feedback_mode": "initiate",
34      "codecs": [
35        "pcma",
36        "pcmu",
37        "g729",
38        "g723",
39        "gsm",
40        "telephone_event"
41      ],
42      "default_dst_action": "allow_all",
43      "dst_prefixes": [],
44      "emergency_enable_all": false,
45      "force_symmetric_rtp": false,
46      "rtp_ping": false,
47      "rtp_timeout": 30,
48      "callback_url": null,
49      "created_at": "2025-04-02T10:00:00.000Z",
50      "external_reference_id": null
51    },
52    "relationships": {
53      "dids": {
54        "links": {
55          "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/dids",
56          "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/dids"
57        }
58      },
59      "emergency_dids": {
60        "links": {
61          "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/emergency_dids",
62          "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/emergency_dids"
63        }
64      }
65    },
66    "meta": {
67      "spent_amount": "12.34"
68    }
69  },
70  "meta": {
71    "api_version": "2026-11-19"
72  }
73}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "authentication_method": {
13        "type": "ip_only",
14        "attributes": {
15          "allowed_sip_ips": [
16            "198.51.100.1/32"
17          ],
18          "tech_prefix": null
19        }
20      },
21      "allowed_rtp_ips": [
22        "198.51.100.1/32"
23      ],
24      "codecs": [
25        "pcma",
26        "pcmu",
27        "g729",
28        "g723",
29        "gsm",
30        "telephone_event"
31      ]
32    }
33  }
34}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": ["198.51.100.1/32"], "authentication_method": {"attributes": {"allowed_sip_ips": ["198.51.100.1/32"], "tech_prefix": null}, "type": "ip_only"}, "codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"]}, "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42", "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 422 Unprocessable Content
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "errors": [
 6    {
 7      "title": "is not allowed for update",
 8      "detail": "type - is not allowed for update",
 9      "code": "100",
10      "source": {
11        "pointer": "/data/attributes/authentication_method/type"
12      },
13      "status": "422"
14    }
15  ]
16}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
10    "type": "voice_out_trunks",
11    "attributes": {
12      "codecs": [
13        "pcma",
14        "pcmu",
15        "g729",
16        "g723",
17        "gsm",
18        "telephone_event"
19      ]
20    },
21    "relationships": {
22      "dids": {
23        "data": [
24          {
25            "type": "dids",
26            "id": "7a1c1c55-5f4e-4c9b-9a8e-2d8f0c3b6e41"
27          }
28        ]
29      }
30    }
31  }
32}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"codecs": ["pcma", "pcmu", "g729", "g723", "gsm", "telephone_event"]}, "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f", "relationships": {"dids": {"data": [{"type": "dids", "id": "7a1c1c55-5f4e-4c9b-9a8e-2d8f0c3b6e41"}]}}, "type": "voice_out_trunks"}}'
```

response

```
 1HTTP/1.1 422 Unprocessable Entity
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "errors": [
 6    {
 7      "title": "cannot be assigned as an allowed CLI because it is awaiting registration",
 8      "detail": "dids/7a1c1c55-5f4e-4c9b-9a8e-2d8f0c3b6e41 - cannot be assigned as an allowed CLI because it is awaiting registration",
 9      "code": "100",
10      "source": {
11        "pointer": "/data/relationships/dids/7a1c1c55-5f4e-4c9b-9a8e-2d8f0c3b6e41"
12      },
13      "status": "422"
14    }
15  ]
16}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 404 | No | [Not Found](../../../specification/errors/index.html#api-not-found) |
| 422 | No | [Validation Error Object](../../../specification/errors/index.html#api-validation-error-object) |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-bad-request) |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 403 | No | The Outbound API is not enabled for the account. Also returned when the access token carries the `read` scope, which does not cover this method (title `Insufficient scope`, `WWW-Authenticate: Bearer error="insufficient_scope"`). See [Scopes](../../authentication.html#authentication-scopes-v35). |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
