Voice Menu - Get extension call status
Get extension call status
Interface Description:
Get the extension list information owned by the user。
Request method: POST, form-data format
request parameters
parameter name |
type |
Is it necessary |
illustrate |
service |
string |
yes |
App.Sip_Status.GetSipCallStatus |
token |
string |
yes |
The token obtained through the authorization interface |
extnumber |
string |
yes |
Extension number, multiple extension numbers are separated by commas |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Status.GetSipCallStatus',
'token' => 'ABCDEFG',
'extnumber' => '100001'
];
$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": "get success",
"result": [
{
"extnumber": "90170002",
"status": 1014,
"caller": null,
"callee": null,
"disnumber": null,
"direction": null,
"channel": null,
"idleduration": null,
"callduration": null
}
],
"reqtime": 1581506689,
"rsptime": 1581506689
},
"msg": ""
}
Return parameter description
parameter name |
type |
illustrate |
result |
array |
extension data array |
—extnumber |
string |
Ext |
—status |
int |
Extension Status |
—caller |
string |
caller |
—callee |
string |
called person |
—disnumber |
string |
display number |
—direction |
string |
call direction |
—channel |
string |
channel |
—idleduration |
int |
idle time |
—callduration |
int |
call time |