Method ws_cti

The method ws_cti opens a WebSocket connection with your Basix PBX. This WebSocket connection will permit to receive notification of events happening in your PBX.

You can use this library to parse the event: https://github.com/brastelcloud/basix_cti

You can monitor all events in the PBX or only events related to a specified user.

Parameters

Parameter Name Description Allowed Values Default Value Optional
app_name name of the app that is using the WebSocket connection. This is used to apply connection limits per user+app_name (limit=2) a string none no
full_events indicated if we should get all events in the PBX or just the ones for the specified user true or false false yes
forced if set to 'true' and the connection limit was already reached one of the previous connections will be closed to permit to create a new one true or false false yes
user_id user whose events will be monitored a user id none yes
user_name user whose events will be monitored a user name none yes
user_label user whose events will be monitored a user label none yes
user_extension user whose events will be monitored a user extension none yes
user_did user whose events will be monitored a user DID none yes
user_email user whose events will be monitored a user email none yes

The user_id, user_name, user_label, user_extension, user_did and user_email are all optional: we just need to provide one of them to identify the user whose events will be monitored. But if full_events=true is specified, they are not necessary (they will be ignored).

The parameters are passed in the URL. Examples:

wss://bcs.brastel.com/basix/api/ws_cti?app_name=myapp&user_name=profxavier&forced=true

wss://bcs.brastel.com/basix/api/ws_cti?app_name=myapp&user_email=xavier@somewhere.com&forced=true

wss://bcs.brastel.com/basix/api/ws_cti?app_name=myapp&full_events=true&forced=true