Commit Graph

50 Commits

Author SHA1 Message Date
Alex
18634417fd Dashboard Edit - Correctly display the chart type options (#7465)
* Dashboard Edit - Correctly display the chart type options

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php
2025-08-20 16:20:04 -06:00
FusionPBX
b0b3b63cb6 Update the systemd service files 2025-08-19 18:05:40 -06:00
FusionPBX
b52ee47c1e Fix the event guard pid file 2025-08-19 17:42:08 -06:00
Alex
c305685d23 Fix dashboard edit defaults (#7340)
* Fix dashboard edit defaults

* Update app_defaults.php

* Update config.php
2025-03-27 15:41:38 -06:00
frytimo
08001488f4 Allow namespace in auto loader (#7307)
* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove closing tag

* remove invalid method params

* remove closing tag

* remove closing tag

* Update auto_loader to load each class file in the project
Update the auto_loader class to use an include statement on each file in the project to load the class within the file. This will allow mismatched names within the file to be loaded and mapped according to the declaration instead of the filename. The class is then checked against the parsed classes from the PHP engine so that namespaces are available and mapped to the file they were declared in. An update was also made to the search algorithm used to find a file that was not already loaded by collapsing the array to have only valid matches to increase performance on a cache miss. Logging within the auto_loader has been moved to a function.
Multiple files were modified to allow the include statement. When the class has the `if(class_exists())` statement, the auto_loader is called to check for the class. This caused an infinite loop scenario so all wrappers have been removed. The auto_loader will now break the loop by directly modifying the internal classes array instead of trying to restart with the 'reload_classes' method.

- APCu is used to cache classes so any loading of the classes is done only once. To clear the APCu cache, restart php-fpm or call the auto_loader::clear_cache() function.
- Cache file is used when APCu is not available. To clear the cache remove it from the tmp folder or call the auto_loader::clear_cache() function.
- All classes must no longer have a class_exists wrapper to benefit from the performance boost.
- Classes should not be directly included when the auto_loader is used.

* remove include statement of class file

* Update destinations.php
2025-03-12 13:55:47 -06:00
frytimo
0cf387f306 do not save event_guard logs to transactions (#7254)
Event Guard already has a log table so no need to duplicate the transactions in another table
2025-02-13 09:10:33 -07:00
Alex
9fc82c02cb Add dashboard icon color setting (#7197)
* Add dashboard icon color setting

* Update index.php

* Update app_languages.php

* Update app_defaults.php

* Update app_config.php

* Update dashboard_edit.php

* Update index.php

* Update app_languages.php

* Update app_defaults.php

* Update app_config.php

* Update config.php

* Update domains.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update registrations.php

* Update config.php

* Update config.php

* Update config.php

* Update config.php

* Update voicemails.php

* Update config.php

* Update missed_calls.php

* Update recent_calls.php

* Update index.php

* Update index.php

* Update index.php
2024-12-11 21:28:45 -07:00
FusionPBX
cd8d5302ac Fix temporary permissions 2024-11-29 13:57:01 -07:00
FusionPBX
e4a8efa0b9 Add event guard to the dashboard 2024-09-16 21:20:12 -06:00
FusionPBX
3b1f73f847 Update event_guard.php 2024-08-27 11:09:37 -06:00
FusionPBX
d45f6ddae0 Update event guard for freebsd 2024-08-25 19:31:05 -06:00
frytimo
7630056bb8 Remove the unset($database) statements (#7084)
* Remove the unset($database) statements
The database object is a global variable that contains a database object reference and should not be unset.

* Update event_guard.php

* Update event_guard.php

* Update event_guard.php

---------

Co-authored-by: Tim Fry <tim@fusionpbx.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2024-08-06 13:19:45 -06:00
frytimo
3a4c2f72e2 Event socket bug fix and more docs (#6823)
* Add documentation to methods. Use is_resource for added type detection

* Allow connect to specify timeout in microseconds with default 30,000

* Update calling mechanism for event sockets

* Update project for new singleton event sockets

* remove unused variable

* catch errors on closing the socket
2023-12-02 17:16:18 -07:00
fusionate
d4f7efa4eb Event Guard: Remove parameters from event_socket connect() method. 2023-09-20 18:50:41 +00:00
fusionate
d9d17a6917 Misc: Remove parameters from event_socket_create() calls. 2023-09-20 18:43:17 +00:00
FusionPBX
0011878dcd Use the settings class to get the event socket details 2023-09-14 21:23:27 -06:00
FusionPBX
7a0420f138 Use the settings class to get event_socket details 2023-09-14 21:18:23 -06:00
FusionPBX
dcd00c3a15 Find and use the firewall path
Needed as Debian 8 and 9 have a different iptables location than Debian 11
2023-08-23 15:29:04 -06:00
FusionPBX
9a19fb4f82 Add full path to iptables and pfctl
Full path to iptables needed now for Debian 11 since /usr/sbin is no longer in the path by default.
2023-08-23 10:09:24 -06:00
Andy Binder
74bdf82dba Update event_guard.php (#6779) 2023-07-26 14:05:57 -06:00
markjcrane
32051873be Use __dir__ to find resources/require.php 2023-06-16 22:49:09 -06:00
fusionate
1b35623c59 Event Guard [Service]: Updates for PHP 8.1 2023-05-27 18:22:10 +00:00
fusionate
268dd25f6f Event Guard [Class]: Updates for PHP 8.1 2023-05-27 18:21:53 +00:00
frytimo
69bd42af05 remove unneeded destruct methods as GC has higher performance (#6631)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-27 20:18:53 -06:00
FusionPBX
7d31d6958b User log auto white list for limited time.
This is so that temporary IP addresses are not permanently allowed.
2023-03-29 19:13:10 -06:00
fusionate
9c8f4e9060 Event Guard - Fix Unblock multiple checked. 2023-03-17 21:07:35 +00:00
FusionPBX
440883fba8 Add iptables chain add and exit functions 2022-11-17 21:59:46 -07:00
FusionPBX
b004e8f3ba Add message Unable to connect... 2022-10-20 16:07:23 -06:00
markjcrane
d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX
0db773e395 Correct the user_log_allowed function 2022-10-03 22:32:17 -06:00
FusionPBX
568d561c0c Update debian.service 2022-09-26 11:45:00 -06:00
FusionPBX
446f4615bf Bug fix use column instead of field
If updated in the last few days then you need should clear the file cache. Also disabled event_guard_log_allowed until there is a setting to enable or disable it.

Update the source code
cd /var/www/fusionpbx
rm /var/cache/fusionpbx/*
service event_guard restart
2022-09-18 17:53:03 -06:00
FusionPBX
410bab6d05 Allow access for addresses that have been unblocked 2022-09-15 17:34:38 -06:00
FusionPBX
1d55981cbb Add user_log_allowed function. 2022-09-15 17:00:57 -06:00
FusionPBX
4fce9a4565 Filter for specific Events 2022-09-15 16:01:47 -06:00
FusionPBX
2ca336e956 Wait until event socket is ready then connect to it.
If FreeSWITCH is not started yet then wait to connect to it then
2022-08-26 12:05:28 -06:00
FusionPBX
4f2d0316c5 Add custom event_guard:unblock 2022-08-20 12:48:41 -06:00
FusionPBX
01b31dce1a Watch for event_guard:unblock and more debug info. 2022-08-20 12:47:24 -06:00
FusionPBX
f8f09f9a31 Skip resolving IP addresses to improve performance. 2022-08-18 23:31:42 -06:00
FusionPBX
82bb973ea7 Update the event_guard constructor. 2022-08-17 17:27:47 -06:00
FusionPBX
074628ca7a Add method unblock to the event_guard class. 2022-08-17 00:27:08 -06:00
FusionPBX
9b06671810 Add ability to unblock addresses and use more descriptive variable names. 2022-08-17 00:06:52 -06:00
FusionPBX
8a3af98f6b Multiple changes including reconnect to event socket if needed.
- IN function block replace array with event to prevent a naming conflict.
- Reconnect to event socket if the connection is lost.
- Use condition if is_array around each foreach.
- Unset the database connection
- Use event socket variables and close the session before the loop
2022-08-15 14:54:49 -06:00
FusionPBX
2c5c522186 Add a better way to detect if the iptables chain exists. 2022-08-02 12:34:03 -06:00
FusionPBX
7f494e3baf Add the user_agent field. 2022-08-01 23:38:03 -06:00
FusionPBX
73ded9bf60 Remove cache from switch.blocked.
Since the IP address is blocked don't need to cache it.
2022-08-01 19:37:59 -06:00
FusionPBX
95c358f8e4 Add database log for new blocked address. 2022-07-28 11:15:48 -06:00
FusionPBX
02522b11f3 Create event_guard.php 2022-07-28 09:33:09 -06:00
FusionPBX
22a243ceb4 Update and rename app/switch/resources/service/debian-event_guard.service to app/event_guard/resources/service/debian.service
Move event guard to its own directory.
2022-07-28 08:38:16 -06:00
FusionPBX
9d2efbeccb Rename app/switch/resources/service/event_guard.php to app/event_guard/resources/service/event_guard.php
Move the event_guard service to its own directory name.
2022-07-28 08:35:16 -06:00