Files
fusionpbx/app/active_conferences/app_config.php
frytimo 46d3eb18ea Active conferences (#7684)
* Add active conferences with web sockets

* Buttons mostly working

* Convert all methods, function, variable, const to snake case instead of standards.

* Add default settings for customized control

* Add customizable settings

* More debugging default settings added

* Add better authentication handling for websocket connections
These methods were added:
- on_ws_authenticated can be overridden in the child class if there are tasks that need to be done after authentication.
- handle_ws_authenticated was added in the parent class

Handle methods are called by the this class and then their respective 'on_ws_' method is then called.

* Mute All now working

* Add PHPDoc block comments

* More PHPDoc to better describe class and variables

* Fix accidental removal of function during PHPDoc block edits

* Remove the variable type declaration for PHP 7.1 compatibility

* Update conferences with more websocket communication to replace AJAX calls.

* Ensure interface is loaded when no members

* Move color settings to theme category

* Update page view to default settings changes
2025-12-29 22:30:08 -07:00

238 lines
16 KiB
PHP

<?php
//application details
$apps[$x]['name'] = "Conferences Active";
$apps[$x]['uuid'] = "c168c943-833a-c29c-7ef9-d1ee78810b71";
$apps[$x]['category'] = "Switch";;
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "A real-time active conference viewer and moderator tool.";
$apps[$x]['description']['en-gb'] = "A real-time active conference viewer and moderator tool.";
$apps[$x]['description']['ar-eg'] = "";
$apps[$x]['description']['de-at'] = "";
$apps[$x]['description']['de-ch'] = "";
$apps[$x]['description']['de-de'] = "";
$apps[$x]['description']['es-cl'] = "";
$apps[$x]['description']['es-mx'] = "";
$apps[$x]['description']['fr-ca'] = "";
$apps[$x]['description']['fr-fr'] = "";
$apps[$x]['description']['he-il'] = "";
$apps[$x]['description']['it-it'] = "";
$apps[$x]['description']['ka-ge'] = "";
$apps[$x]['description']['nl-nl'] = "";
$apps[$x]['description']['pl-pl'] = "";
$apps[$x]['description']['pt-br'] = "";
$apps[$x]['description']['pt-pt'] = "";
$apps[$x]['description']['ro-ro'] = "";
$apps[$x]['description']['ru-ru'] = "";
$apps[$x]['description']['sv-se'] = "";
$apps[$x]['description']['uk-ua'] = "";
//permission details
$y=0;
$apps[$x]['permissions'][$y]['name'] = "conference_active_view";
$apps[$x]['permissions'][$y]['menu']['uuid'] = "2d857bbb-43b9-b8f7-a138-642868e0453a";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_view";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_lock";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_kick";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_energy";
//$apps[$x]['permissions'][$y]['groups'][] = "user";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_volume";
//$apps[$x]['permissions'][$y]['groups'][] = "user";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_gain";
//$apps[$x]['permissions'][$y]['groups'][] = "user";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_mute";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_deaf";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_interactive_video";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//default settings
$y = 0;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0242ad2b-72c7-42f8-b8fe-8716654e0c99";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "reconnect_delay";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2000";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Base delay in milliseconds before attempting to reconnect after disconnect.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9451b1a9-4f81-4819-bfe4-47cc468cd095";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "ping_interval";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "15000";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Interval in milliseconds between keepalive ping requests.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "605791c3-f20a-438c-98ec-869b600d27ea";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "auth_timeout";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3000";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Timeout in milliseconds waiting for WebSocket authentication before redirecting to login.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ea18eab7-9772-4ade-b318-a70a2ed40906";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "pong_timeout";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "500";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Timeout in milliseconds waiting for pong response before reloading the page.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "31b5f0e3-aec7-403b-be3d-94dbf3b8a59e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "refresh_interval";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Optional interval in milliseconds to periodically refresh conference data. Set to 0 to disable (rely on WebSocket events only).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3a757df6-37ce-4351-b046-d3ba2eaffd18";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "max_reconnect_delay";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "15000";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Maximum delay in milliseconds between reconnection attempts (exponential backoff cap).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "79c34bee-725a-4b85-86eb-5d9ceabda6a4";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "pong_timeout_max_retries";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of pong timeouts allowed before reloading the page. During retries, status indicator shows warning color.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "28babdbb-9155-4ff9-928d-5e9d7bac94c4";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_connected";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#28a745";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Color of the status indicator when connected and receiving pong responses.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8a447132-799a-4ae7-8d21-137df917b66a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_warning";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#ffc107";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Color of the status indicator when ping sent but pong not yet received (warning state).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "809954c0-48b9-4828-8843-a046235515b6";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_disconnected";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#dc3545";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Color of the status indicator when disconnected or not authenticated.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "522d2274-b4ea-4f25-9bb3-43d7669defe2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_connecting";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#6c757d";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Color of the status indicator when connecting or authenticating.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2c16616d-49d8-4921-b6bf-112f0f2fb4e8";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_indicator_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "color";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Status indicator display mode: 'color' for colored circle, 'icon' for Font Awesome icons.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "51357753-3782-4b23-9e31-ea5d5c649890";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_icon_connected";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "fa-solid fa-plug-circle-check";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Font Awesome icon class for connected status.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "86c2ef42-2988-4d6d-9c92-3fc697a171ba";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_icon_warning";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "fa-solid fa-plug-circle-exclamation";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Font Awesome icon class for warning status (ping sent, awaiting pong).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "51e4cff5-de0d-4ecb-b4e6-33eac9140b4b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_icon_disconnected";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "fa-solid fa-plug-circle-xmark";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Font Awesome icon class for disconnected status.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1b5a4a79-9b15-44ff-8a7c-d4cc773151f2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "active_conference_status_icon_connecting";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "fa-solid fa-plug fa-fade";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Font Awesome icon class for connecting status.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7fb8a315-38ff-4170-9b3c-bd7eae513d35";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "debug_show_permissions_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "off";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "When running in debug mode, Permissions can be shown as: 'bytes' for bytes only, 'full' for detailed permission checks, or 'off' to suppress showing permissions.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9b8853db-244c-40a6-a8fe-77c5b133c6b0";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "debug_show_switch_event";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "When running in debug mode, show the raw switch event message for conference maintenance events.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f84c37ed-0469-42d1-9f20-cb3ba00a9d7b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "active_conferences";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "websocket_enabled";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable or disable the use of websockets for active conferences.";