Query Information of a Trunk
Query detailed information of a SIP trunk.
Restriction
This interface can only query the detailed information of a SIP trunk.
Request URL
GET {base_url}/{api_path}/trunk/get?access_token={access_token}
Request parameters
Parameter | Required | Type | Description |
---|---|---|---|
id | Yes | Integer | The unique ID of a trunk. Note: You can query trunk's ID using Search Specific Trunks.
|
Response parameters
- Register Trunk
-
Table 2. Parameter Type Description errcode Integer Returned error code. 0
: Succeed.- Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.errmsg String Returned message. SUCCESS
: Succeed.FAILURE
: Failed.
data Array <Trunk_Info> The detailed information of the trunk. - Peer Trunk
-
Parameter Type Description errcode Integer Returned error code. 0
: Succeed.- Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.errmsg String Returned message. SUCCESS
: Succeed.FAILURE
: Failed.
data Array <Trunk_Info> The detailed information of the trunk.
- Account Trunk
-
Table 11. Parameter Type Description errcode Integer Returned error code. 0
: Succeed.- Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.errmsg String Returned message. SUCCESS
: Succeed.FAILURE
: Failed.
data Array <Trunk_Info> The detailed information of the trunk.
Examples
Request example
Query the information of a trunk (ID: "8").
GET /openapi/v1.0/trunk/get?id=8&access_token=lLWhMzGKmWFQ4gNztelxaRq9voCj9PaU& HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"data": {
"id": 8,
"name": "Local_Calls",
"enable": 1,
"country": "general",
"type": "register",
"transport": "udp",
"hostname": "abc.provider.com",
"port": 5060,
"domain": "abc.provider.com",
"username": "6701",
"password": "0T9crrZ0gx",
"auth_name": "mubJwYEWs9",
"enb_outbound_proxy": 0,
"outbound_proxy_server": "",
"outbound_proxy_port": 0,
"codec_sel": "ulaw,alaw,g729",
"def_outbound_cid": "",
"def_outbound_cid_name": "",
"outbound_cid_list": [
{
"id": 11,
"outbound_cid_option": "shared",
"outbound_cid": "5503302",
"outbound_cid_name": "Yeastar Sales",
"ext_list": [
{
"ext_number": "Yeastar Sales",
"ext_name": "Yeastar Sales",
"type": "ext_group",
"id": 7
}
]
}
],
"did_list": [
{
"id": 8,
"did": "5503300",
"did_name": "Yeastar"
}
]
}
}