POST /api/v0.0.1/extension/dial_extension?token={token}&type={type}
名称 | 是否必需 | 类型 | 描述 |
caller | 是 | String | 主叫分机。 |
callee | 是 | String | 被叫分机。 |
autoanswer | 否 | String |
是否自动接听(只针对 SIP 线路有效,且需要话机支持,此参数不带则默认为不自动应答)
|
名称 | 类型 | 描述 |
请求示例分机 101呼叫分机 102。
POST /api/v0.0.1/extension/dial_extension?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
"caller": "101",
"callee": "102",
"autoanswer": "no"
}
POST /api/v0.0.1/extension/dial_extension?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>
<caller>101</caller>
<callee>102</callee>
<autoanswer>no</autoanswer>
</xml>
响应示例
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success"
}
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>
</xml>