Query Trunk List

Query basic information like trunk name, trunk status, trunk type, etc. of all trunks.

Endpoint

POST /api/v1.1.0/trunklist/query?token={token}

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:
  • IAX: VoIP trunk based on IAX protocol.
  • SIP: VoIP trunk based on SIP protocol.
  • FXO: FXO analog trunk.
  • GSM: GSM/3G/4G wireless trunk.
  • BRI: BRI digital trunk.
  • E1: E1/T1/J1 digital trunk.
status String SIP/IAX trunk status:
  • Registering
  • Failure
  • Registered (Unmonitored)
  • Disable
  • Unknown
FXO trunk status:
  • Fault
  • Idle
  • Busy
BRI/E1/T1/J1 trunk status:
  • Fault
  • Alarm
  • Down
  • Up
GSM/3G/4G trunk status:
  • Power Off
  • Alarm
  • No SIM
  • No Signal
  • Pin Error
  • Unregister
  • Busy
  • Idle
port String The trunk port.

Examples

Request Example

POST /api/v1.1.0/trunklist/query?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success",
    "trunklist": [
        {
            "trunkname": "voip123",
            "status": "failure",
            "type": "SIP"
        },
        {
            "trunkname": "siptrunk8",
            "status": "failure",
            "type": "SIP"
        }
    ]
}