Get Voice OUT Trunks

Description

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>]

integer

Optional

Filtering

sort

string

Optional

Sorting

pagination

string

Optional

Pagination

Filters:

Filter Name

Type

Allow Blank

Allow Array

Filters by:

name

string

Yes

Yes

The voice out trunk name exact.

name_contains

string

Yes

Yes

The voice out trunk name contains.

on_cli_mismatch_action

string

Yes

Yes

The cli mismatch action. This filter accepts one or more “reject_call”, “replace_cli” or “send_original_cli”. Any other value produce 400 response

allow_any_did_as_cli

boolean

No

No

Allow any did as CLI field. Can be true or false.

status

string

No

No

The status field. Can be “active” or “blocked”.

threshold_reached

boolean

No

No

The threshold reached field. Can be true or false.

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 following values: “srtp_sdes”, “srtp_dtls”, “zrtp”, “disabled”

default_did.id

string

No

Yes

The default_did.id field.

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

GET /v3/voice_out_trunks HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

curl

curl -i 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

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
    "data": [
        {
            "id": "457bf47d-446d-41cd-91c3-dfbda7bf0753",
            "type": "voice_out_trunks",
            "attributes": {
                "allowed_sip_ips": [
                    "0.0.0.0/0"
                ],
                "allowed_rtp_ips": [
                    "0.0.0.0/0"
                ],
                "allow_any_did_as_cli": true,
                "status": "active",
                "on_cli_mismatch_action": "replace_cli",
                "name": "Outbound trunk 1",
                "capacity_limit": 100,
                "username": "****ff1onm",
                "password": "****b4m55h",
                "created_at": "2021-12-15T18:59:28.875Z",
                "threshold_reached": false,
                "threshold_amount": "10000.0",
                "media_encryption_mode": "disabled",
                "default_dst_action": "allow_all",
                "dst_prefixes": [],
                "force_symmetric_rtp": false,
                "rtp_ping": false,
                "callback_url": null
            },
            "relationships": {
                "default_did": {
                    "links": {
                        "self": "https://api.didww.com/v3/voice_out_trunks/457bf47d-446d-41cd-91c3-dfbda7bf0753/relationships/default_did",
                        "related": "https://api.didww.com/v3/voice_out_trunks/457bf47d-446d-41cd-91c3-dfbda7bf0753/default_did"
                    }
                },
                "dids": {
                    "links": {
                        "self": "https://api.didww.com/v3/voice_out_trunks/457bf47d-446d-41cd-91c3-dfbda7bf0753/relationships/dids",
                        "related": "https://api.didww.com/v3/voice_out_trunks/457bf47d-446d-41cd-91c3-dfbda7bf0753/dids"
                    }
                }
            },
            "meta": {
                "spent_amount": "0.0"
            }
        },
        {
            "id": "d471975a-c6ee-4f84-80f0-fad67c5e22b1",
            "type": "voice_out_trunks",
            "attributes": {
                "allowed_sip_ips": [
                    "192.168.1.1/32"
                ],
                "allowed_rtp_ips": [
                    "192.168.1.1/32"
                ],
                "allow_any_did_as_cli": false,
                "status": "active",
                "on_cli_mismatch_action": "send_original_cli",
                "name": "Outbound trunk 11",
                "capacity_limit": 100,
                "username": "****rh5vb",
                "password": "****kmgnda",
                "created_at": "2021-12-02T07:17:40.125Z",
                "threshold_reached": false,
                "threshold_amount": "9999.0",
                "media_encryption_mode": "disabled",
                "default_dst_action": "allow_all",
                "dst_prefixes": [
                    "23"
                ],
                "force_symmetric_rtp": false,
                "rtp_ping": false,
                "callback_url": null
            },
            "relationships": {
                "default_did": {
                    "links": {
                        "self": "https://api.didww.com/v3/voice_out_trunks/d471975a-c6ee-4f84-80f0-fad67c5e22b1/relationships/default_did",
                        "related": "https://api.didww.com/v3/voice_out_trunks/d471975a-c6ee-4f84-80f0-fad67c5e22b1/default_did"
                    }
                },
                "dids": {
                    "links": {
                        "self": "https://api.didww.com/v3/voice_out_trunks/d471975a-c6ee-4f84-80f0-fad67c5e22b1/relationships/dids",
                        "related": "https://api.didww.com/v3/voice_out_trunks/d471975a-c6ee-4f84-80f0-fad67c5e22b1/dids"
                    }
                }
            },
            "meta": {
                "spent_amount": "0.0"
            }
        }
    ],
    "meta": {
        "total_records": 2,
        "api_version": "2021-12-15"
    },
    "links": {
        "first": "https://api.didww.com/v3/voice_out_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "last": "https://api.didww.com/v3/voice_out_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50"
    }
}