When reading web socket data, the loop will run forever if there is no more data available in a chunk. This fix will add a counter to how many times it tries to read before a timeout is reached.
Fixed a problem where the constructor parameter for permission_filter was not being fulfilled. This can cause a crash also leading to the read of web socket data to begin looping.
Added better debugging information by using the topic of the websocket_message instead of the payload data. This would cause some messages to appear empty when they were not.
Added a wait state for re-connecting to the web socket server for system status service so it would not exit immediately when the websocket server exited.
Added more PHPDoc Block information.
* add extension handling to subscriber
Store the extensions in the subscriber when it is available from $_SESSION.
Add more documentation to functions and variables
* remove rogue 'c' character injected by my keyboard
* Store the user session information in the token when available
* Add extension filter class
* Create get_user_setting function
* Add channel_presence_id key to event message
* Add context filter
* Add dashboard widget
* Add config for widget
* Add domain filter to service
* Fix websocket_service to get the class name
* Add new method get_service_name
* Remove setting hardcoded timer
* Use websockets for real-time CPU status on dashboard
* Add system_dashboard service file
* moved javascript file to core
* Initial commit of websockets
* Move app_menu to the active_calls websockets
* Fix hangup function
* Remove connection wait-state on web socket server so events can process
* Add timestamp and debug level to console for service debug output
* Remove debug exit
* Fix typo for ws_client instead of ws_server
* Update app_config.php
* Fix typo and remove empty function
* Remove call to empty function
* Fix the menu to point to the correct location
* Remove Logging Class
* Rename service file
* Rename service file
* Fix the in progress browser request
* Fix browser reload and implement 'active_calls' default values
* Add apply_filter function
* Create new permission_filter object
* In progress active calls now use filter
* Add invalid_uuid_exception class
* add event_key_filter to honor user permissions
* add and_link and or_link for filters
* Fix disconnected subscriber and add filters to honor permissions
* Add $key and $value for filter
* define a service name
* catch throwable instead of exception
* Add $key and $value for filter and allow returning null
* Update permission checks when loading page
* Add apply_filter function to honor subscriber permissions
* Add create_filter_chain_for function to honor subscriber permissions
* Add apply_filter function to honor subscriber permissions
* Add apply_filter function to honor subscriber permissions
* create interface to allow filterable payload
* create interface to define functions required for websocket services
* Pass in service class when creating a service token
* Allow key/name and return null for filter
* Adjust subscriber exceptions to return the ID of the subscriber
* Add event filter to filter chain
* Add command line options for ip and port for websockets and switch
* update service to use is_a syntax
* initial commit of base class for websockets system services
* initial commit of the system cpu status service
* remove extra line feed
* fix path on active_calls
* initial proof of concept for cpu status updated by websockets
* Allow returning null
* Use default settings to set the interval for cpu status broadcast
* Improve the CPU percent function for Linux systems
* Show more debug information
* Allow child processes to re-connect to the web socket service
* Fix websockets as plural instead of singular
* Add class name list-row
* Update active_calls.php
* Update active_calls.php
* Update websocket_client.js
* Update app_config.php
* Update app_menu.php
* Update debian-websockets.service
* Update debian-active_calls.service
---------
Co-authored-by: FusionPBX <markjcrane@gmail.com>