Query Outbound Calls
Get detailed information like caller, callee, call status, etc. of all calls dialing out via the trunks of the PBX.
Endpoint
POST /api/v0.0.1/outbound/query?token={token}&type={type}
Request Parameters
- With parameters in request, developers could query specific information. Separate them with ,.
Name | Importance | Type | Description |
outboundid | Required | Int | Query all outbound calls.
Note: Obtain the ouboundid value from CDR. |
Response Parameters
Name | Type | Description |
outbound | Object | Outbound calls: calls to external numbers. |
outboundid | String | The outbound ID. With this parameter, operations like forwarding, query, and hangup can be performed on the outbound call. |
from | String | The caller’s number. |
to | String | The callee’s number. |
trunk | String | The name of the trunk that passes the outbound call. |
status | String | Call status.
|
Examples
Request Example
POST /api/v0.0.1/outbound/query?token=1e3b3ebb6a974cb42ed31de5413df52d&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
"outboundid": "1495705009.316"
}
POST /api/v0.0.1/outbound/query?token=1e3b3ebb6a974cb42ed31de5413df52d&type=xml HTTP/1.1
Content-Type:application/xml; charset=utf-8
Host: 192.168.5.150
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<outboundid>1495705009.316</outboundid>
</xml>
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success",
"outbound": [
{
"outboundid": "1589881535.982",
"from": "66666",
"to": "103",
"trunk": "to-18-16-2",
"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>
<outbound>
<outboundid>1589881535.982</outboundid>
<from>66666</from>
<to>103</to>
<trunk>to-18-16-2</trunk>
<status>Talking</status>
</outbound>
</xml>