POST /api/v0.0.1/outbound/query?token={token}&type={type}
名称 | 是否必需 | 类型 | 描述 |
outboundid | 否 | Int | 外线去电编号。注: 从 PBX 发送的通话报告 中获取 outboundid 的值。 |
名称 | 类型 | 描述 |
outbound | Object | 去电,为呼出到外线的外部通话。 |
outboundid | String | 外线去电编号,通过该参数对去电进行转接、查询、挂断等操作。 |
from | String | 主叫号码。 |
to | String | 被叫号码。 |
trunk | String | 呼出时通过的中继名称。 |
status | String |
通话状态
|
请求示例
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>
响应示例
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>