Get Outbound Trunks#

Returns the collection of outbound trunks.

Request#

HTTP Method: GET

URI Path: /v3/voice_out_trunks

Note

For all returned data attributes, see Outbound Trunk Object.

URI Query Parameters#

Name

Type

Is Required?

Description

include

string

No

Inclusion

filter[<filter_name>]

string, boolean

No

Filtering

fields[voice_out_trunks]

string

No

Sparse fieldsets

sort

string

No

Sorting

page[number]

integer

No

Page number.

page[size]

integer

No

Page size. Pagination defaults to 50 records per page. The maximum is 1000.

Filters#

Filter Name

Type

Allow Blank

Allow Array

Filters by:

id

string

No

Yes

The trunk id field.

name

string

Yes

No

The trunk name field.

name_contains

string

Yes

No

The name_contains field.

external_reference_id

string

No

No

The external_reference_id field.

on_cli_mismatch_action

string

Yes

No

The on_cli_mismatch_action field. Possible values: reject_call, replace_cli, send_original_cli, randomize_cli. An action the account does not have the feature for is rejected.

allow_any_did_as_cli

boolean

No

No

The allow_any_did_as_cli field.

status

string

No

No

The status field. Possible values: active, blocked.

threshold_reached

boolean

No

No

The threshold_reached field.

default_dst_action

string

No

No

The default_dst_action field. Possible values: allow_all, reject_all.

media_encryption_mode

string

No

No

The media_encryption_mode field. Possible values: disabled, srtp_sdes, srtp_dtls, zrtp.

authentication_method.type

string

No

Yes

The authentication_method.type field. Possible values: credentials_and_ip, ip_only, twilio.

default_did.id

string

No

No

Trunks whose default caller ID is this DID. A DID the account does not own is rejected rather than matching nothing.

Sorting#

Value

Sorts by:

name

The name field.

created_at

The created_at field.

external_reference_id

The external_reference_id field.

allow_any_did_as_cli

The allow_any_did_as_cli field.

threshold_reached

The threshold_reached field.

Includes#

Value

Description

dids

DID Object

emergency_dids

Emergency DID relationship data.

Object Relationships#

Value

Description

dids

DID Object

emergency_dids

Emergency DID relationship data.

Example#

http

1GET /v3/voice_out_trunks HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]

curl

1curl -i -X GET https://api.didww.com/v3/voice_out_trunks -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]"

response

  1HTTP/1.1 200 OK
  2Content-Type: application/vnd.api+json
  3
  4{
  5  "data": [
  6    {
  7      "id": "03813615-da15-4e3b-8e0a-3ea64b2585de",
  8      "type": "voice_out_trunks",
  9      "attributes": {
 10        "name": "Outbound trunk Name",
 11        "allowed_rtp_ips": [
 12          "203.0.113.0/24"
 13        ],
 14        "authentication_method": {
 15          "type": "credentials_and_ip",
 16          "attributes": {
 17            "allowed_sip_ips": [
 18              "0.0.0.0/0"
 19            ],
 20            "tech_prefix": null,
 21            "username": "554******",
 22            "password": "fqe******"
 23          }
 24        },
 25        "allow_any_did_as_cli": true,
 26        "status": "active",
 27        "on_cli_mismatch_action": "send_original_cli",
 28        "capacity_limit": 100,
 29        "threshold_reached": false,
 30        "threshold_amount": "10000.0",
 31        "media_encryption_mode": "disabled",
 32        "ice_mode": "accept",
 33        "rtcp_mux_mode": "accept",
 34        "rtcp_feedback_mode": "accept",
 35        "codecs": [
 36          "pcma",
 37          "pcmu",
 38          "g729",
 39          "g723",
 40          "gsm",
 41          "telephone_event"
 42        ],
 43        "default_dst_action": "allow_all",
 44        "dst_prefixes": [],
 45        "emergency_enable_all": false,
 46        "force_symmetric_rtp": false,
 47        "rtp_ping": false,
 48        "rtp_timeout": 30,
 49        "callback_url": null,
 50        "created_at": "2025-04-02T10:00:00.000Z",
 51        "external_reference_id": null
 52      },
 53      "relationships": {
 54        "dids": {
 55          "links": {
 56            "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/dids",
 57            "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/dids"
 58          }
 59        },
 60        "emergency_dids": {
 61          "links": {
 62            "self": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/relationships/emergency_dids",
 63            "related": "https://api.didww.com/v3/voice_out_trunks/03813615-da15-4e3b-8e0a-3ea64b2585de/emergency_dids"
 64          }
 65        }
 66      },
 67      "meta": {
 68        "spent_amount": "12.34"
 69      }
 70    },
 71    {
 72      "id": "cf2e6377-fcaa-4416-8c8e-acd5f31a427f",
 73      "type": "voice_out_trunks",
 74      "attributes": {
 75        "name": "Outbound trunk Name",
 76        "allowed_rtp_ips": [
 77          "198.51.100.1/32"
 78        ],
 79        "authentication_method": {
 80          "type": "ip_only",
 81          "attributes": {
 82            "allowed_sip_ips": [
 83              "198.51.100.1/32"
 84            ],
 85            "tech_prefix": null
 86          }
 87        },
 88        "allow_any_did_as_cli": true,
 89        "status": "active",
 90        "on_cli_mismatch_action": "send_original_cli",
 91        "capacity_limit": 100,
 92        "threshold_reached": false,
 93        "threshold_amount": "10000.0",
 94        "media_encryption_mode": "disabled",
 95        "ice_mode": "accept",
 96        "rtcp_mux_mode": "accept",
 97        "rtcp_feedback_mode": "accept",
 98        "codecs": [
 99          "pcma",
100          "pcmu",
101          "g729",
102          "g723",
103          "gsm",
104          "telephone_event"
105        ],
106        "default_dst_action": "allow_all",
107        "dst_prefixes": [],
108        "emergency_enable_all": true,
109        "force_symmetric_rtp": false,
110        "rtp_ping": false,
111        "rtp_timeout": 30,
112        "callback_url": null,
113        "created_at": "2025-04-02T10:00:00.000Z",
114        "external_reference_id": null
115      },
116      "relationships": {
117        "dids": {
118          "links": {
119            "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/dids",
120            "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/dids"
121          }
122        },
123        "emergency_dids": {
124          "links": {
125            "self": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/relationships/emergency_dids",
126            "related": "https://api.didww.com/v3/voice_out_trunks/cf2e6377-fcaa-4416-8c8e-acd5f31a427f/emergency_dids"
127          }
128        }
129      },
130      "meta": {
131        "spent_amount": "12.34"
132      }
133    },
134    {
135      "id": "14a0b7fb-845a-44d9-a7dc-ac1620f21e42",
136      "type": "voice_out_trunks",
137      "attributes": {
138        "name": "Outbound trunk Name",
139        "allowed_rtp_ips": null,
140        "authentication_method": {
141          "type": "twilio",
142          "attributes": {
143            "twilio_account_sid": "AC39347AF064AF97E1682C3B7332DAAEE6"
144          }
145        },
146        "allow_any_did_as_cli": true,
147        "status": "active",
148        "on_cli_mismatch_action": "send_original_cli",
149        "capacity_limit": 100,
150        "threshold_reached": false,
151        "threshold_amount": "10000.0",
152        "media_encryption_mode": "disabled",
153        "ice_mode": "accept",
154        "rtcp_mux_mode": "accept",
155        "rtcp_feedback_mode": "accept",
156        "codecs": [
157          "pcma",
158          "pcmu",
159          "g729",
160          "g723",
161          "gsm",
162          "telephone_event"
163        ],
164        "default_dst_action": "allow_all",
165        "dst_prefixes": [],
166        "emergency_enable_all": false,
167        "force_symmetric_rtp": false,
168        "rtp_ping": false,
169        "rtp_timeout": 30,
170        "callback_url": null,
171        "created_at": "2025-04-02T10:00:00.000Z",
172        "external_reference_id": null
173      },
174      "relationships": {
175        "dids": {
176          "links": {
177            "self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/dids",
178            "related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/dids"
179          }
180        },
181        "emergency_dids": {
182          "links": {
183            "self": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/relationships/emergency_dids",
184            "related": "https://api.didww.com/v3/voice_out_trunks/14a0b7fb-845a-44d9-a7dc-ac1620f21e42/emergency_dids"
185          }
186        }
187      },
188      "meta": {
189        "spent_amount": "12.34"
190      }
191    }
192  ],
193  "meta": {
194    "total_records": 3,
195    "api_version": "2026-11-19"
196  },
197  "links": {
198    "first": "https://api.didww.com/v3/voice_out_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50",
199    "last": "https://api.didww.com/v3/voice_out_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50"
200  }
201}

Other Responses#

Code

Success

Description

400

No

Bad Request. Malformed request: unknown filter, bad pagination or bad sort field.

401

No

Unauthorized

403

No

The Outbound API is not enabled for the account.

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.