Get Voice IN Trunk

Description

Returns trunks owned by the account. Several type of trunks can be retrieved: SIP, PSTN, H323, IAX2

Request

HTTP Method: GET

URI Path: /v3/voice_in_trunks/

URI Query Parameters:

Name

Type

Is Required?

Description

id

string

Yes

Unique ID identifier of the Trunk.

includes

string

Optional

Inclusion.

Includes:

Value

Description

voice_in_trunk_group

Trunk Group Object

pop

POP Object

Examples

http

GET /v3/voice_in_trunks/df78e081-b7d1-4769-80ce-f349af4f612e 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_in_trunks/df78e081-b7d1-4769-80ce-f349af4f612e -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": "df78e081-b7d1-4769-80ce-f349af4f612e",
    "type": "voice_in_trunks",
    "attributes": {
      "priority": 1,
      "capacity_limit": 10,
      "weight": 2,
      "name": "Office",
      "cli_format": "e164",
      "cli_prefix": "+",
      "description": null,
      "ringing_timeout": 30,
      "created_at": "2017-06-25T08:21:41.795Z",
      "configuration": {
        "type": "sip_configurations",
        "attributes": {
          "username": "username",
          "host": "example.com",
          "port": null,
          "codec_ids": [
            9,
            7
          ],
          "rx_dtmf_format_id": 1,
          "tx_dtmf_format_id": 1,
          "resolve_ruri": true,
          "auth_enabled": true,
          "auth_user": "username",
          "auth_password": "password",
          "auth_from_user": "Office",
          "auth_from_domain": "example.com",
          "sst_enabled": false,
          "sst_min_timer": 600,
          "sst_max_timer": 900,
          "sst_accept_501": true,
          "sip_timer_b": 8000,
          "dns_srv_failover_timer": 2000,
          "rtp_ping": false,
          "rtp_timeout": 30,
          "force_symmetric_rtp": false,
          "symmetric_rtp_ignore_rtcp": false,
          "rerouting_disconnect_code_ids": [
            58,
            59,
            1505
          ],
          "sst_session_expires": null,
          "sst_refresh_method_id": 1,
          "transport_protocol_id": 1,
          "max_transfers": 5,
          "max_30x_redirects": 0,
          "media_encryption_mode": "disabled",
          "stir_shaken_mode": "disabled",
          "allowed_rtp_ips": null
        }
      }
    },
    "relationships": {
      "voice_in_trunk_group": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/df78e081-b7d1-4769-80ce-f349af4f612e/relationships/voice_in_trunk_group",
          "related": "https://api.didww.com/v3/voice_in_trunks/df78e081-b7d1-4769-80ce-f349af4f612e/voice_in_trunk_group"
        }
      },
      "pop": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/df78e081-b7d1-4769-80ce-f349af4f612e/relationships/pop",
          "related": "https://api.didww.com/v3/voice_in_trunks/df78e081-b7d1-4769-80ce-f349af4f612e/pop"
        }
      }
    }
  },
  "meta": {
    "api_version": "2021-12-15"
  }
}

http

GET /v3/voice_in_trunks/84746865-b1c0-414d-86c7-62c85c22fd69 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_in_trunks/84746865-b1c0-414d-86c7-62c85c22fd69 -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": "84746865-b1c0-414d-86c7-62c85c22fd69",
    "type": "voice_in_trunks",
    "attributes": {
      "priority": 1,
      "capacity_limit": 5,
      "weight": 65535,
      "name": "Office Mobile",
      "cli_format": "e164",
      "cli_prefix": null,
      "description": null,
      "ringing_timeout": null,
      "created_at": "2017-06-25T08:21:41.795Z",
      "configuration": {
        "type": "pstn_configurations",
        "attributes": {
          "dst": "1xxxxxxxxx"
        }
      }
    },
    "relationships": {
      "voice_in_trunk_group": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/84746865-b1c0-414d-86c7-62c85c22fd69/relationships/voice_in_trunk_group",
          "related": "https://api.didww.com/v3/voice_in_trunks/84746865-b1c0-414d-86c7-62c85c22fd69/voice_in_trunk_group"
        }
      },
      "pop": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/84746865-b1c0-414d-86c7-62c85c22fd69/relationships/pop",
          "related": "https://api.didww.com/v3/voice_in_trunks/84746865-b1c0-414d-86c7-62c85c22fd69/pop"
        }
      }
    }
  },
  "meta": {
    "api_version": "2021-12-15"
  }
}

http

GET /v3/voice_in_trunks/a393cbf8-a63c-42d4-8f64-93559f00fe38 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_in_trunks/a393cbf8-a63c-42d4-8f64-93559f00fe38 -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": "a393cbf8-a63c-42d4-8f64-93559f00fe38",
    "type": "voice_in_trunks",
    "attributes": {
      "priority": 1,
      "capacity_limit": 9,
      "weight": 65535,
      "name": "Office IAX2",
      "cli_format": "e164",
      "cli_prefix": "+1",
      "description": null,
      "ringing_timeout": null,
      "configuration": {
        "type": "iax2_configurations",
        "attributes": {
          "dst": "1xxxxxxxxx",
          "host": "example.com",
          "port": null,
          "auth_user": "username",
          "auth_password": "password",
          "codec_ids": [
            9,
            6
          ]
        }
      }
    },
    "relationships": {
      "voice_in_trunk_group": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/a393cbf8-a63c-42d4-8f64-93559f00fe38/relationships/voice_in_trunk_group",
          "related": "https://api.didww.com/v3/voice_in_trunks/a393cbf8-a63c-42d4-8f64-93559f00fe38/voice_in_trunk_group"
        }
      },
      "pop": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/a393cbf8-a63c-42d4-8f64-93559f00fe38/relationships/pop",
          "related": "https://api.didww.com/v3/voice_in_trunks/a393cbf8-a63c-42d4-8f64-93559f00fe38/pop"
        }
      }
    }
  },
  "meta": {
    "api_version": "2021-12-15"
  }
}

http

GET /v3/voice_in_trunks/f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b 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_in_trunks/f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b -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": "f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b",
    "type": "voice_in_trunks",
    "attributes": {
      "priority": 1,
      "capacity_limit": 18,
      "weight": 65535,
      "name": "Office H323",
      "cli_format": "e164",
      "cli_prefix": "+1",
      "description": null,
      "ringing_timeout": null,
      "created_at": "2017-06-25T08:21:41.795Z",
      "configuration": {
        "type": "h323_configurations",
        "attributes": {
          "dst": "1xxxxxxxxx",
          "host": "example.com",
          "port": null,
          "codec_ids": [
            9,
            6
          ]
        }
      }
    },
    "relationships": {
      "voice_in_trunk_group": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b/relationships/voice_in_trunk_group",
          "related": "https://api.didww.com/v3/voice_in_trunks/f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b/voice_in_trunk_group"
        }
      },
      "pop": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunks/f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b/relationships/pop",
          "related": "https://api.didww.com/v3/voice_in_trunks/f9bf1d5c-bbd4-4739-9fd3-8ae162f2bc2b/pop"
        }
      }
    }
  },
  "meta": {
    "api_version": "2021-12-15"
  }
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized