Update Outbound Trunk
Updates an outbound trunk.
In version 2026-04-16, customers can update outbound trunks through the API even if the Outbound feature is not enabled on the account.
Request
HTTP Method: PATCH
URI Path: /v3/voice_out_trunks/{id}
URI Query Parameters
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
id |
|
Yes |
Unique identifier of the outbound trunk. |
Data Attributes
Name |
Type |
Nullable |
Is Required? |
Description |
|---|---|---|---|---|
name |
|
No |
No |
The outbound trunk name. |
external_reference_id |
|
Yes |
No |
Optional identifier for the outbound trunk in the customer’s external system. Maximum length is 100 characters. |
allowed_rtp_ips |
Array of |
Yes |
No |
Allowed RTP IP addresses for media traffic. Required when changing |
authentication_method |
|
No |
No |
Authentication method object. Supported PATCH target types are |
on_cli_mismatch_action |
|
No |
No |
Possible values: |
capacity_limit |
|
Yes |
No |
The capacity limit of the outbound trunk. Allowed values from 0 to 32767. |
allow_any_did_as_cli |
|
No |
No |
When set to |
status |
|
No |
No |
Possible values: |
threshold_amount |
|
Yes |
No |
The outbound trunk 24-hour threshold limit. Can be from 0.0 to 100000.0. |
default_dst_action |
|
No |
No |
Possible values: |
dst_prefixes |
Array of |
Yes |
No |
The destination prefixes allowed or rejected based on |
emergency_enable_all |
|
No |
No |
Allows all eligible DIDs to be used for emergency calling on the trunk. |
media_encryption_mode |
|
No |
No |
Media encryption mode. Possible values: |
callback_url |
|
Yes |
No |
Can be |
force_symmetric_rtp |
|
No |
No |
Enables symmetric RTP / COMEDIA mode. |
rtp_ping |
|
No |
No |
Enables RTP ping after the call is connected. |
rtp_timeout |
|
Yes |
No |
Disconnects the call if RTP packets do not arrive within the specified time. Supported values are from 30 to 600 seconds. |
Request Body Object Relationships
Title |
Type |
Description |
|---|---|---|
dids |
The DID numbers explicitly allowed as CLI when |
|
emergency_dids |
The DID numbers explicitly enabled for emergency calling when |
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 byGETendpoints, butPATCHdoes not allow changingauthentication_method.typetoip_only.
Note
After changing the authentication type, the previous authentication attributes are cleared.
Authentication Method Attributes by Type
Name |
Type |
Nullable |
Is Required? |
Description |
|---|---|---|---|---|
allowed_sip_ips |
Array of |
No |
Yes |
The allowed originating SIP IPs. |
tech_prefix |
|
Yes |
No |
An optional technical prefix added before the destination number. The maximum length is 8 characters and only digits and |
Name |
Type |
Nullable |
Is Required? |
Description |
|---|---|---|---|---|
twilio_account_sid |
|
No |
Yes |
The Twilio Account SID. It is a 34-character identifier of the Twilio account. |
Examples
http
PATCH /v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
"type": "voice_out_trunks",
"attributes": {
"authentication_method": {
"type": "twilio",
"attributes": {
"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
}
},
"allowed_rtp_ips": null
}
}
}
curl
curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": null, "authentication_method": {"attributes": {"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"}, "type": "twilio"}}, "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f", "type": "voice_out_trunks"}}'
response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
"type": "voice_out_trunks",
"attributes": {
"name": "Outbound trunk Name",
"allowed_rtp_ips": null,
"authentication_method": {
"type": "twilio",
"attributes": {
"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
}
},
"on_cli_mismatch_action": "send_original_cli",
"capacity_limit": 300,
"allow_any_did_as_cli": false,
"status": "blocked",
"threshold_reached": false,
"threshold_amount": "1000.0",
"default_dst_action": "allow_all",
"dst_prefixes": ["23", "45"],
"emergency_enable_all": false,
"media_encryption_mode": "disabled",
"force_symmetric_rtp": true,
"rtp_ping": true,
"rtp_timeout": 30,
"callback_url": null,
"created_at": "2025-04-02T10:00:00.000Z",
"external_reference_id": null
},
"relationships": {
"dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
"related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
}
},
"emergency_dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
"related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
}
}
}
},
"meta": {
"api_version": "2026-04-16"
}
}
http
PATCH /v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
"type": "voice_out_trunks",
"attributes": {
"allowed_rtp_ips": [
"0.0.0.0/0"
],
"authentication_method": {
"type": "credentials_and_ip",
"attributes": {
"allowed_sip_ips": [
"0.0.0.0/0"
],
"tech_prefix": null
}
}
}
}
}
curl
curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": ["0.0.0.0/0"], "authentication_method": {"attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix": null}, "type": "credentials_and_ip"}}, "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42", "type": "voice_out_trunks"}}'
response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
"type": "voice_out_trunks",
"attributes": {
"name": "Outbound trunk Name",
"allowed_rtp_ips": [
"0.0.0.0/0"
],
"authentication_method": {
"type": "credentials_and_ip",
"attributes": {
"allowed_sip_ips": [
"0.0.0.0/0"
],
"tech_prefix": null,
"username": "554******",
"password": "fqe******"
}
},
"on_cli_mismatch_action": "send_original_cli",
"capacity_limit": 100,
"allow_any_did_as_cli": true,
"status": "active",
"threshold_reached": false,
"threshold_amount": "10000.0",
"default_dst_action": "allow_all",
"dst_prefixes": [],
"emergency_enable_all": false,
"media_encryption_mode": "disabled",
"force_symmetric_rtp": false,
"rtp_ping": false,
"rtp_timeout": 30,
"callback_url": null,
"created_at": "2025-04-02T10:00:00.000Z",
"external_reference_id": null
},
"relationships": {
"dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/dids",
"related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/dids"
}
},
"emergency_dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/emergency_dids",
"related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/emergency_dids"
}
}
}
},
"meta": {
"api_version": "2026-04-16"
}
}
http
PATCH /v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
"type": "voice_out_trunks",
"attributes": {
"authentication_method": {
"type": "twilio",
"attributes": {
"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
}
},
"allowed_rtp_ips": null
}
}
}
curl
curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": null, "authentication_method": {"attributes": {"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"}, "type": "twilio"}}, "id": "03813615-da15-4e3b-8e0a-3ea64b2585de", "type": "voice_out_trunks"}}'
response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
"type": "voice_out_trunks",
"attributes": {
"name": "Outbound trunk Name",
"allowed_rtp_ips": null,
"authentication_method": {
"type": "twilio",
"attributes": {
"twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
}
},
"on_cli_mismatch_action": "send_original_cli",
"capacity_limit": 100,
"allow_any_did_as_cli": true,
"status": "active",
"threshold_reached": false,
"threshold_amount": "10000.0",
"default_dst_action": "allow_all",
"dst_prefixes": [],
"emergency_enable_all": false,
"media_encryption_mode": "disabled",
"force_symmetric_rtp": false,
"rtp_ping": false,
"rtp_timeout": 30,
"callback_url": null,
"created_at": "2025-04-02T10:00:00.000Z",
"external_reference_id": null
},
"relationships": {
"dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/dids",
"related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/dids"
}
},
"emergency_dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/emergency_dids",
"related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/emergency_dids"
}
}
}
},
"meta": {
"api_version": "2026-04-16"
}
}
http
PATCH /v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
"type": "voice_out_trunks",
"attributes": {
"allowed_rtp_ips": [
"0.0.0.0/0"
],
"authentication_method": {
"type": "credentials_and_ip",
"attributes": {
"allowed_sip_ips": [
"0.0.0.0/0"
],
"tech_prefix": null
}
}
}
}
}
curl
curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": ["0.0.0.0/0"], "authentication_method": {"attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix": null}, "type": "credentials_and_ip"}}, "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f", "type": "voice_out_trunks"}}'
response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
"type": "voice_out_trunks",
"attributes": {
"name": "Outbound trunk Name",
"allowed_rtp_ips": [
"0.0.0.0/0"
],
"authentication_method": {
"type": "credentials_and_ip",
"attributes": {
"allowed_sip_ips": [
"0.0.0.0/0"
],
"tech_prefix": null,
"username": "554******",
"password": "fqe******"
}
},
"on_cli_mismatch_action": "send_original_cli",
"capacity_limit": 100,
"allow_any_did_as_cli": true,
"status": "active",
"threshold_reached": false,
"threshold_amount": "10000.0",
"default_dst_action": "allow_all",
"dst_prefixes": [],
"emergency_enable_all": true,
"media_encryption_mode": "disabled",
"force_symmetric_rtp": false,
"rtp_ping": false,
"rtp_timeout": 30,
"callback_url": null,
"created_at": "2025-04-02T10:00:00.000Z",
"external_reference_id": null
},
"relationships": {
"dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
"related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
}
},
"emergency_dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
"related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
}
}
}
},
"meta": {
"api_version": "2026-04-16"
}
}
http
PATCH /v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "9c91f03e-8796-4e6a-8c12-00e4f334f9b2",
"type": "voice_out_trunks",
"attributes": {
"emergency_enable_all": false
},
"relationships": {
"emergency_dids": {
"data": [
{
"id": "7158ac26-392f-47d1-89ab-c8b3f5ec05d9",
"type": "dids"
},
{
"id": "67a90c09-1bff-4bc3-a35e-116fda2b0d22",
"type": "dids"
}
]
}
}
}
}
curl
curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"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
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "9c91f03e-8796-4e6a-8c12-00e4f334f9b2",
"type": "voice_out_trunks",
"attributes": {
"name": "Outbound trunk for emergency DIDs",
"allowed_rtp_ips": [
"0.0.0.0/0"
],
"authentication_method": {
"type": "credentials_and_ip",
"attributes": {
"allowed_sip_ips": [
"0.0.0.0/0"
],
"tech_prefix": null,
"username": "554******",
"password": "fqe******"
}
},
"on_cli_mismatch_action": "send_original_cli",
"capacity_limit": 100,
"allow_any_did_as_cli": true,
"status": "active",
"threshold_reached": false,
"threshold_amount": "10000.0",
"default_dst_action": "allow_calls",
"dst_prefixes": [],
"emergency_enable_all": false,
"media_encryption_mode": "disable",
"force_symmetric_rtp": false,
"rtp_ping": false,
"rtp_timeout": 30,
"callback_url": null,
"created_at": "2025-04-02T10:00:00.000Z",
"external_reference_id": null
},
"relationships": {
"dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/relationships/dids",
"related": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/dids"
}
},
"emergency_dids": {
"links": {
"self": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/relationships/emergency_dids",
"related": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/emergency_dids"
}
}
}
},
"meta": {
"api_version": "2026-04-16"
}
}
http
PATCH /v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
"type": "voice_out_trunks",
"attributes": {
"authentication_method": {
"type": "ip_only",
"attributes": {
"allowed_sip_ips": [
"11.0.0.0/32"
],
"tech_prefix": null
}
},
"allowed_rtp_ips": [
"11.0.0.0/32"
]
}
}
}
curl
curl -i -X PATCH https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allowed_rtp_ips": ["11.0.0.0/32"], "authentication_method": {"attributes": {"allowed_sip_ips": ["11.0.0.0/32"], "tech_prefix": null}, "type": "ip_only"}}, "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42", "type": "voice_out_trunks"}}'
response
HTTP/1.1 422 Unprocessable Content
Content-Type: application/vnd.api+json
{
"errors": [
{
"title": "is not allowed for update",
"detail": "type - is not allowed for update",
"code": "100",
"source": {
"pointer": "/data/attributes/authentication_method/type"
},
"status": "422"
}
]
}
Other Responses
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
422 |
No |
|
400 |
No |
|
401 |
No |