Query Trunk List
Endpoint
POST /api/v0.0.1/trunklist/query?token={token}&type={type}
Request Parameters
No parameter. Only need to send the request.
Response Parameters
Name | Type | Description |
trunklist | Object | Object. |
trunkname | Int | The trunk name. |
type | String | The trunk type:
|
status | String | SIP/IAX trunk status:
|
FXO trunk status:
|
||
port | String | The trunk port. |
Examples
Request Example
POST /api/v0.0.1/trunklist/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
POST /api/v0.0.1/trunklist/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”,
“trunkname”: [
{
“trunkname”: “to-108-16”,
“status”: “Registered”,
“type”: “SIP”
},
{
“trunkname”: “to-18-16-2”,
“status”: “Registered”,
“type”: “SIP”
}
]
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<status>Success</status>
<trunkname>
<item id=”0″>
<trunkname>to-18-16-2</trunkname>
<status>Registered</status>
<type>SIP</type>
</item>
</trunkname>
</xml>