Brekeke PBX Wiki

2. Connecting with Brekeke PAL WebSocket

Get connected with Brekeke PBX by logging in as system administrator “sa”, administrator, or user extension and retrieve necessary information required in the following requests by defining parameters: status, voicemail, registered, park, line, and queue, and gain access to allow the use of methods. Once login succeeds with login_user other than “sa”, you will no longer need to set the tenant parameter in the request methods. If the tenant parameter is set, it will be ignored.

 

Login

Description:

Send encrypted login information and encrypted login user password that are encrypted with MD5 hasher algorithm.

 

Parameters:

login_password – A string encrypted with MD5 hasher algorithm in the following format:

<login_user>:<nonce>:<login_password>

where <login_user> is login user extension number, <login_password> is login user password encrypted with MD5 hasher algorithm, and <nonce> is the value of parameter “nonce” got from the connection response.

 

Version:

3.3 or later

 


URL format

 

ws://<Brekeke-PBX-IP>:<Brekeke-PBX-Port>/pbx/ws?tenant=<tenant-name>&login_user=<user-name>&login_password=<password>[&user=<user-extension>][&registered=<true|false>][&status=<true|false>][&voicemail=<true >][&callrecording=<true|false>][&park=<park-value>][&line=<line-value>][&queue=<queue-value>]
<Brekeke-PBX-IP> IP address of the server where Brekeke PBX is installed
<Brekeke-PBX-Port> The same port number as the one used to access Brekeke PBX Admintool
<tenant-name> Tenant name. Do not specify this value if logging in as “sa” or in the case of using the single tenant version.
<user-name>  Login user name
<password> The password for the login_user extension. If login password is not set from URL, Brekeke PAL WebSocket login method can be used to send encrypted login information as explained above.
<user-extension[n]>  The user extension(s) whose information will be retrieved from Brekeke PBX. This setting can be omitted when you don’t need to receive any user’s information.

The values can be: * (user=*), or multiple values connected by “&” can be set (ex. user=200&user=201&user=202). Setting * as value means all users of the system or under the specified tenant.
When the login_user does not have an admin privilege, all users specified in these parameters must be allowed by the [User] > [Settings] > [PAL WebSocket settings] > [Access users].

<park-value> Park ID(s) information will be retrieved from Brekeke PBX. The values can be: *, or multiple values connected by “&” can be set. (Refer to <user-extension>.)
<line-value> Line ID(s) information will be retrieved from Brekeke PBX. The values can be: *, or multiple values connected by “&” can be set. (Refer to <user-extension>.)
<queue-value> Group extension(s) information will be retrieved from Brekeke PBX. The values can be: *, or multiple values connected by “&” can be set. (Refer to <user-extension>.)

 


Response

When login password is not specified in the URL, “login_password_required” event with one parameter “nonce” will be returned.

If login succeeds, WebSocket notifications will be returned with request information.

If login fails, an error message will be returned.

 

Yes No
Suggest Edit