Voice Menu - Extension idle and busy state setting
Extension idle and busy state setting
Interface Description:
Set the free/busy status of the extension
Request method: POST, form-data format
request parameters
parameter name |
type |
Is it necessary |
illustrate |
service |
string |
yes |
App.Sip_Extgroup.EditExtnumber |
token |
string |
yes |
The token obtained through the authorization interface |
name |
string |
yes |
extension group name |
extnumber |
string |
yes |
Ext |
state |
string |
yes |
Extension status idle: idle; busy: busy |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.EditExtnumber',
'token' => 'ABCDEFG',
'name' => 'abcdefg',
'extnumber' => '100001',
'state' => 'idle'
];
$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": {
"status": 0,
"desc": "Successfully modified",
"reqtime": 1581409508,
"rsptime": 1581409508
},
"msg": ""
}
Return data field description
field |
type |
illustrate |
desc |
string |
return description |