Query Inbound Calls
Get detailed information like caller, callee, call status, etc. of the active inbound calls of the PBX.
Endpoint
POST /api/v0.0.1/inbound/query?token={token}&type={type}
Request Parameters
- Sending no parameter means query all information.
- With parameters in request, developers could query specific information. Separate them with ,.
Name | Importance | Type | Description |
inboundid | Required | Int | Query all inbound calls.
Note: Obtain the inboundid value from Inbound Call Report. |
Response Parameters
Name | Type | Description |
inbound | Object | Inbound calls: calls from external numbers through the trunks. |
inboundid | Int | The inbound ID. With this parameter, operations like forwarding, query, and hangup can be performed on this inbound call. |
from | String | The caller’s number. |
to | String | The callee’s number. |
callee | Object | The called party of an inbound call, could be an extension, IVR, or an outbound ID. |
trunk | String | The name of the trunk that passes the inbound call. |
status | String | Call status.
|
Examples
Request Example
POST /api/v0.0.1/inbound/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
"inboundid":"1589879501.901"
}
POST /api/v0.0.1/inbound/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1
Content-Type:application/xml; charset=utf-8
Host: 172.16.6.150
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<inboundid>1589879501.901</inboundid>
</xml>
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success",
"inbound": [
{
"inboundid": "1589881290.963",
"from": "103",
"to": "101",
"trunk": "to-18-16-2",
"callee": {
"extid": "101"
},
"status": "Talking"
}
]
}
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>
<inbound>
<inboundid>1589881290.963</inboundid>
<from>103</from>
<to>101</to>
<trunk>to-18-16-2</trunk>
<callee>
<extid>101</extid>
</callee>
<status>Talking</status>
</inbound>
</xml>