Get Trunk#
Description
Returns trunks owned by the account. Several type of trunks can be retrieved: SIP, PSTN.
Request#
HTTP Method: GET
URI Path: /v3/trunks/
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
id |
|
Yes |
Unique ID identifier of the Trunk. |
include |
|
Optional |
Includes:
Value |
Description |
|---|---|
trunk_group |
|
pop |
Examples#
http
1GET /v3/trunks/df78e081-b7d1-4769-80ce-f349af4f612e 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/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
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "df78e081-b7d1-4769-80ce-f349af4f612e",
7 "type": "trunks",
8 "attributes": {
9 "priority": 1,
10 "capacity_limit": 10,
11 "weight": 2,
12 "name": "Office",
13 "cli_format": "e164",
14 "cli_prefix": "+",
15 "description": null,
16 "ringing_timeout": 30,
17 "created_at": "2017-06-25T08:21:41.795Z",
18 "configuration": {
19 "type": "sip_configurations",
20 "attributes": {
21 "username": "username",
22 "host": "example.com",
23 "port": null,
24 "codec_ids": [
25 9,
26 7
27 ],
28 "rx_dtmf_format_id": 1,
29 "tx_dtmf_format_id": 1,
30 "resolve_ruri": true,
31 "auth_enabled": true,
32 "auth_user": "username",
33 "auth_password": "password",
34 "auth_from_user": "Office",
35 "auth_from_domain": "example.com",
36 "sst_enabled": false,
37 "sst_min_timer": 600,
38 "sst_max_timer": 900,
39 "sst_accept_501": true,
40 "sip_timer_b": 8000,
41 "dns_srv_failover_timer": 2000,
42 "rtp_ping": false,
43 "rtp_timeout": 30,
44 "force_symmetric_rtp": false,
45 "symmetric_rtp_ignore_rtcp": false,
46 "rerouting_disconnect_code_ids": [
47 58,
48 59,
49 1505
50 ],
51 "sst_session_expires": null,
52 "sst_refresh_method_id": 1,
53 "transport_protocol_id": 1,
54 "max_transfers": 5,
55 "max_30x_redirects": 0
56 }
57 }
58 },
59 "relationships": {
60 "trunk_group": {
61 "links": {
62 "self": "https://api.didww.com/v3/trunks/df78e081-b7d1-4769-80ce-f349af4f612e/relationships/trunk_group",
63 "related": "https://api.didww.com/v3/trunks/df78e081-b7d1-4769-80ce-f349af4f612e/trunk_group"
64 }
65 },
66 "pop": {
67 "links": {
68 "self": "https://api.didww.com/v3/trunks/df78e081-b7d1-4769-80ce-f349af4f612e/relationships/pop",
69 "related": "https://api.didww.com/v3/trunks/df78e081-b7d1-4769-80ce-f349af4f612e/pop"
70 }
71 }
72 }
73 }
74}
http
1GET /v3/trunks/84746865-b1c0-414d-86c7-62c85c22fd69 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/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
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "84746865-b1c0-414d-86c7-62c85c22fd69",
7 "type": "trunks",
8 "attributes": {
9 "priority": 1,
10 "capacity_limit": 5,
11 "weight": 65535,
12 "name": "Office Mobile",
13 "cli_format": "e164",
14 "cli_prefix": null,
15 "description": null,
16 "ringing_timeout": null,
17 "created_at": "2017-06-25T08:21:41.795Z",
18 "configuration": {
19 "type": "pstn_configurations",
20 "attributes": {
21 "dst": "1xxxxxxxxx"
22 }
23 }
24 },
25 "relationships": {
26 "trunk_group": {
27 "links": {
28 "self": "https://api.didww.com/v3/trunks/84746865-b1c0-414d-86c7-62c85c22fd69/relationships/trunk_group",
29 "related": "https://api.didww.com/v3/trunks/84746865-b1c0-414d-86c7-62c85c22fd69/trunk_group"
30 }
31 },
32 "pop": {
33 "links": {
34 "self": "https://api.didww.com/v3/trunks/84746865-b1c0-414d-86c7-62c85c22fd69/relationships/pop",
35 "related": "https://api.didww.com/v3/trunks/84746865-b1c0-414d-86c7-62c85c22fd69/pop"
36 }
37 }
38 }
39 }
40}
Other Responses#
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
401 |
No |