POST /api/v0.0.1/extensionlist/query?token={token}&type={type}
无参数,直接发送查询分机列表的请求即可。
名称 | 类型 | 描述 |
extlist | Object | 分机对象。 |
extnumber | Int | 分机号。 |
status | String |
分机当前状态:
|
type | String | 分机类型。 |
port | String | 分机端口,当分机为模拟分机时则显示该项。 |
username | String | 用户名。 |
请求示例
POST /api/v0.0.1/extensionlist/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
POST /api/v0.0.1/extensionlist/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
响应示例
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success",
"extlist": [
{
"extnumber": "100",
"status": "Unavailable",
"type": "pjsip",
"username": "100",
"agentid": ""
},
{
"extnumber": "101",
"status": "Registered",
"type": "pjsip",
"username": "xiaoshaokun",
"agentid": ""
},
{
"extnumber": "102",
"status": "Registered",
"type": "pjsip",
"username": "102",
"agentid": ""
}
]
}
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>
<extlist>
<item id="0">
<extnumber>100</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>100</username>
<agentid></agentid>
</item>
<item id="1">
<extnumber>101</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>xiaoshaokun</username>
<agentid></agentid>
</item>
<item id="2">
<extnumber>102</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>102</username>
<agentid></agentid>
</item>
<item id="3">
<extnumber>103</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>103</username>
<agentid></agentid>
</item>
</extlist>
</xml>