Voice Menu - Get the list of extension groups
Interface Description
Get the list of extension groups owned by the current user
Request method
POST, form-data format
request parameters
| parameter name | type | Is it necessary | illustrate |
|---|---|---|---|
| service | string | yes | App.Sip_Extgroup.GetExtgroupInfo |
| token | string | yes | The token obtained through the authorization interface |
| name | string | no | Extension group name, if it is empty, get all |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.GetExtgroupInfo',
'token' => 'ABCDEFG',
'name' => '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": {
"status": 0,
"desc": "获取成功",
"result": [
{
"id": 18,
"name": "test-group-3",
"status": 1042
}
],
"reqtime": 1581408746,
"rsptime": 1581408746
},
"msg": ""
}
return field description
| field | type | illustrate |
|---|---|---|
| result | string | extension list array |
| —id | string | extension group id |
| —name | string | extension group name |
| —status | string | Extension group status |