Project

General

Profile

API - Users status

API Users status se foloseste pentru a monitoriza statusul userilor din centrala

API URL

https://[YOUR-PBX-URL]/api/users-status

Datele se trasmit prin POST sau GET si trebuie sa fie de forma:

Array
(
    [type] => sip
    [api_hash] => bb76587c4cc53d74fecbb189dd5dbbb8
)

Parametrul type trebuie sa aiba valoarea sip sau iax

Headere HTTP:

Content-Type: text/xml
Authorization: Bearer <token>

Exemplu generare hash:

$params['api_hash'] = md5(http_build_query($params) . 'your_api_key'); // make hash

Exemplu trimitere date:

$url = 'https://[YOUR-PBX-URL]/api/users-status';
$token = 'your_api_token';
echo curlPost($url, http_build_query($params), array("Authorization: Bearer {$token}"));

Raspuns

In caz de succes:

{

    "has_error": false,
    "messages": [ ],
    "results": {
        "test-user1": {
            "username": "test-user1",
            "dnid": "0123456789",
            "in_use": 0
            "limit": 1,
            "status": "UNKNOWN",
            "ip": "",
            "port": "",
            "useragent": "",
            "extension": 123,
            "remote_id": null
        }
    }

}

Sau in caz de eroare:

{

    "has_error": true,
    "messages": [
        "Invalid type: sipx" 
    ],
    "results": [ ]

}

Disponibil si in alte limbi: EN

Go to top