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 50 to 100000. |
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. |
See Outbound Trunk callback details for
information about callback_url and the JSON callback payload.
Request Body Object Relationships#
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
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
5Api-Key: [API 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 }
20 }
21}
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 "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
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 "force_symmetric_rtp": true,
28 "rtp_ping": true,
29 "rtp_timeout": 30,
30 "callback_url": null,
31 "created_at": "2025-04-02T10:00:00.000Z",
32 "external_reference_id": null
33 },
34 "relationships": {
35 "dids": {
36 "links": {
37 "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
38 "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
39 }
40 },
41 "emergency_dids": {
42 "links": {
43 "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
44 "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
45 }
46 }
47 }
48 },
49 "meta": {
50 "api_version": "2026-04-16"
51 }
52}
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
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
10 "type": "voice_out_trunks",
11 "attributes": {
12 "allowed_rtp_ips": [
13 "0.0.0.0/0"
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 }
25 }
26}
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 "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
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 "0.0.0.0/0"
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 "force_symmetric_rtp": false,
35 "rtp_ping": false,
36 "rtp_timeout": 30,
37 "callback_url": null,
38 "created_at": "2025-04-02T10:00:00.000Z",
39 "external_reference_id": null
40 },
41 "relationships": {
42 "dids": {
43 "links": {
44 "self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/dids",
45 "related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/dids"
46 }
47 },
48 "emergency_dids": {
49 "links": {
50 "self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/emergency_dids",
51 "related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/emergency_dids"
52 }
53 }
54 }
55 },
56 "meta": {
57 "api_version": "2026-04-16"
58 }
59}
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
5Api-Key: [API 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 }
20 }
21}
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 "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
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 "force_symmetric_rtp": false,
28 "rtp_ping": false,
29 "rtp_timeout": 30,
30 "callback_url": null,
31 "created_at": "2025-04-02T10:00:00.000Z",
32 "external_reference_id": null
33 },
34 "relationships": {
35 "dids": {
36 "links": {
37 "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/dids",
38 "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/dids"
39 }
40 },
41 "emergency_dids": {
42 "links": {
43 "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/emergency_dids",
44 "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/emergency_dids"
45 }
46 }
47 }
48 },
49 "meta": {
50 "api_version": "2026-04-16"
51 }
52}
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
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
10 "type": "voice_out_trunks",
11 "attributes": {
12 "allowed_rtp_ips": [
13 "0.0.0.0/0"
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 }
25 }
26}
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 "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
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 "0.0.0.0/0"
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 "force_symmetric_rtp": false,
35 "rtp_ping": false,
36 "rtp_timeout": 30,
37 "callback_url": null,
38 "created_at": "2025-04-02T10:00:00.000Z",
39 "external_reference_id": null
40 },
41 "relationships": {
42 "dids": {
43 "links": {
44 "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
45 "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
46 }
47 },
48 "emergency_dids": {
49 "links": {
50 "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
51 "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
52 }
53 }
54 }
55 },
56 "meta": {
57 "api_version": "2026-04-16"
58 }
59}
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
5Api-Key: [API 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 },
14 "relationships": {
15 "emergency_dids": {
16 "data": [
17 {
18 "id": "7158ac26-392f-47d1-89ab-c8b3f5ec05d9",
19 "type": "dids"
20 },
21 {
22 "id": "67a90c09-1bff-4bc3-a35e-116fda2b0d22",
23 "type": "dids"
24 }
25 ]
26 }
27 }
28 }
29}
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 "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
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 "0.0.0.0/0"
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_calls",
31 "dst_prefixes": [],
32 "emergency_enable_all": false,
33 "media_encryption_mode": "disable",
34 "force_symmetric_rtp": false,
35 "rtp_ping": false,
36 "rtp_timeout": 30,
37 "callback_url": null,
38 "created_at": "2025-04-02T10:00:00.000Z",
39 "external_reference_id": null
40 },
41 "relationships": {
42 "dids": {
43 "links": {
44 "self": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/relationships/dids",
45 "related": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/dids"
46 }
47 },
48 "emergency_dids": {
49 "links": {
50 "self": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/relationships/emergency_dids",
51 "related": "https://api.didww.com/v3/voice_out_trunks/9c91f03e-8796-4e6a-8c12-00e4f334f9b2/emergency_dids"
52 }
53 }
54 }
55 },
56 "meta": {
57 "api_version": "2026-04-16"
58 }
59}
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
5Api-Key: [API 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 }
25 }
26}
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 "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --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"}}, "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}
Other Responses#
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
422 |
No |
|
400 |
No |
|
401 |
No |