Get Voice OUT Trunks#

Returns the collection of Voice Out Trunks.

Request#

HTTP Method: GET

URI Path: /v3/voice_out_trunks

URI Query Parameters#

Name

Type

Is Required?

Description

filter[<filter_name>]

string, boolean

No

Filtering

sort

string

No

Sorting

pagination

string

No

Pagination

Filters#

Filter Name

Type

Allow Blank

Allow Array

Filters by:

name

string

Yes

Yes

The trunk name field.

name_contains

string

Yes

Yes

The name_contains field.

on_cli_mismatch_action

string

Yes

Yes

The on_cli_mismatch_action field. This filter accepts one or more reject_call or send_original_cli.

allow_any_did_as_cli

boolean

No

No

The allow_any_did_as_cli field.

status

string

No

No

The status field. Can be active or blocked.

threshold_reached

boolean

No

No

The threshold_reached field.

default_dst_action

string

No

No

The default_dst_action field. Can be allow_all or reject_all.

media_encryption_mode

string

No

No

The media_encryption_mode field. This filter accepts the following values: srtp_sdes, srtp_dtls, zrtp, disabled.

Sorting#

Value

Sorts by:

name

The name field.

created_at

The created_at field.

allow_any_did_as_cli

The allow_any_did_as_cli field.

threshold_reached

The threshold_reached field.

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
5Api-Key: [API token]

curl

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

response

 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "data": [
 6        {
 7            "id": "457bf47d-446d-41cd-91c3-dfbda7bf0753",
 8            "type": "voice_out_trunks",
 9            "attributes": {
10                "allowed_sip_ips": [
11                    "0.0.0.0/0"
12                ],
13                "allowed_rtp_ips": [
14                    "0.0.0.0/0"
15                ],
16                "allow_any_did_as_cli": true,
17                "status": "active",
18                "on_cli_mismatch_action": "send_original_cli",
19                "name": "Outbound trunk 1",
20                "capacity_limit": 100,
21                "username": "****ff1onm",
22                "password": "****b4m55h",
23                "created_at": "2022-05-10T18:59:28.875Z",
24                "threshold_reached": false,
25                "threshold_amount": "10000.0",
26                "media_encryption_mode": "disabled",
27                "default_dst_action": "allow_all",
28                "dst_prefixes": [],
29                "force_symmetric_rtp": false,
30                "rtp_ping": false,
31                "callback_url": null
32            },
33            "relationships": {
34                "dids": {
35                    "links": {
36                        "self": "https://api.didww.com/v3/voice_out_trunks/457bf47d-446d-41cd-91c3-dfbda7bf0753/relationships/dids",
37                        "related": "https://api.didww.com/v3/voice_out_trunks/457bf47d-446d-41cd-91c3-dfbda7bf0753/dids"
38                    }
39                }
40            },
41            "meta": {
42                "spent_amount": "0.0"
43            }
44        },
45        {
46            "id": "d471975a-c6ee-4f84-80f0-fad67c5e22b1",
47            "type": "voice_out_trunks",
48            "attributes": {
49                "allowed_sip_ips": [
50                    "198.51.100.1/32"
51                ],
52                "allowed_rtp_ips": [
53                    "198.51.100.1/32"
54                ],
55                "allow_any_did_as_cli": false,
56                "status": "active",
57                "on_cli_mismatch_action": "send_original_cli",
58                "name": "Outbound trunk 11",
59                "capacity_limit": 100,
60                "username": "****rh5vb",
61                "password": "****kmgnda",
62                "created_at": "2021-12-02T07:17:40.125Z",
63                "threshold_reached": false,
64                "threshold_amount": "9999.0",
65                "media_encryption_mode": "disabled",
66                "default_dst_action": "allow_all",
67                "dst_prefixes": [
68                    "23"
69                ],
70                "force_symmetric_rtp": false,
71                "rtp_ping": false,
72                "callback_url": null
73            },
74            "relationships": {
75                "dids": {
76                    "links": {
77                        "self": "https://api.didww.com/v3/voice_out_trunks/d471975a-c6ee-4f84-80f0-fad67c5e22b1/relationships/dids",
78                        "related": "https://api.didww.com/v3/voice_out_trunks/d471975a-c6ee-4f84-80f0-fad67c5e22b1/dids"
79                    }
80                }
81            },
82            "meta": {
83                "spent_amount": "0.0"
84            }
85        }
86    ],
87    "meta": {
88        "total_records": 2,
89        "api_version": "2022-05-10"
90    },
91    "links": {
92        "first": "https://api.didww.com/v3/voice_out_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50",
93        "last": "https://api.didww.com/v3/voice_out_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50"
94    }
95}