API - Users status¶
API Users status is used to monitor the status of users in PBX
API URL¶
https://[YOUR-PBX-URL]/api/users-status
Data is sent via POST or GET and must be of the form:¶
Array ( [api_username] => demo_user [api_password] => demo_pass [type] => sip [api_hash] => bb76587c4cc53d74fecbb189dd5dbbb8 )
Parameter type must have the value sip or iax
Example of hash generation:
$params['api_hash'] = md5(http_build_query($params) . 'your_api_key'); // make hash
Example for data sending:
$url = 'https://[YOUR-PBX-URL]/api/users-status';
header('Content-Type: application/json');
echo curlPost($url, $params);
Answer¶
If successful:
{
"has_error": false,
"messages": [ ],
"results": {
"test-user1": {
"username": "test-user1",
"in_use": "0",
"ringing": "0",
"on_hold": "0",
"limit": "1",
"status": "UNKNOWN",
"ip": "",
"dnd_time": null
}
}
}
Or in case of error:
{
"has_error": true,
"messages": [
"Invalid type: sipx"
],
"results": [ ]
}
Available in other languages: RO
Go to top