Extension Manage - Get extension idle(busy status)
Interface Description
Get the extension status in the extension group
Request method
POST, form-data format
request parameters
| parameter name | type | Is it necessary | illustrate |
|---|---|---|---|
| service | string | yes | App.Sip_Extgroup.GetGroupExt |
| token | string | yes | The token obtained through the authorization interface |
| name | string | no | Extension group name, if it is empty, all extension group data of the current user will be obtained |
| extnumber | string | no | Extension number, if it is empty, all extension data of the current user will be obtained |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.GetGroupExt',
'token' => 'ABCDEFG',
'name' => 'abcdefg',
'extnumber' => 'abcdefg'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": [
{
"name": "autocall-9026",
"extnumber": "9026004",
"status": "hangup",
"priority": 1,
"linkcount": 0,
"date": null,
"state": "idle"
}
],
"msg": ""
}
Return data field description
| field | type | illustrate |
|---|---|---|
| data | string | extension data array |
| —name | string | extension group name |
| —extnumber | string | Ext |
| —status | string | Extension status answer: answer; hangup: hang up |
| —priority | string | priority |
| —linkcount | string | call time |
| —date | string | update time |
| —state | string | Extension idle/busy status idle: idle; busy: busy |