Commit Graph

7977 Commits

Author SHA1 Message Date
K-Flagman
62791e4eb3 [CORE] [MENU] Feature Assign/Unassign User Groups (#7373) 2025-05-17 13:50:02 -06:00
Kamil M
e37797453a Bugfix for T48u (#7364)
Missing ending if statement.
2025-05-12 09:46:19 -06:00
frytimo
c4e63c2562 Do not create a new socket when one is provided (#7358)
Check that the current socket in the object is false before trying to create a new socket
2025-04-25 10:38:43 -06:00
FusionPBX
0b74f0bb26 Update functions.php 2025-04-17 14:14:03 -06:00
frytimo
e7393cc7c0 New Feature OpenID Connect (#7355)
* Refactor authentication to allow for OpenID Connect
The authentication class has been refactored to separate the `validate` function for the method `create_user_session`. This is needed for the OpenID Connect module to authenticate a user without going through the process of all authentication plugins. Only the function `check_user_cidr` has been rewritten to use a single loop instead of a double-loop.
Due to the fact that create_user_function is public, the $result associative array is checked to ensure the required fields are present and the UUID fields are valid UUIDs. Further checking could be done against the database to ensure the UUIDs exist but this has been suppressed at this time because database queries would be required.

* Database class modified to allow for login banners for OpenID Connect
The database class is responsible for creating the view for login. The OpenID application required banners to be present so that any OpenID Connect authentication mechanism could be used. Each banner displayed has the properties of: name, image, alt, and url. The name is the class name of the authentication plugin. This will match the action in the URL. The image is the image banner used for the login. The alt is the alternate text used for screen readers. Each authenticator is responsible for providing each of the field values.

* Added PHPDocs for the check_cidr function

* Add backwards compatibility for PHP versions below 8

* Remove get_banner_alt

* Update check_cidr to allow cidr array

* Update authentication.php

* Update functions.php

* Update authentication.php
2025-04-17 13:48:16 -06:00
FusionPBX
96a6cca25b Define the settings object as global 2025-04-14 10:46:57 -06:00
FusionPBX
c3952028b1 Use the settings get method for the buttons 2025-04-14 10:36:21 -06:00
FusionPBX
a955b9389f Synchronize the grp templates 2025-04-11 17:04:51 -06:00
FusionPBX
4eb1b00dc7 Add algorithm to sip_authentication 2025-04-11 14:56:42 -06:00
FusionPBX
2ba87e5bee Add function escape_textarea 2025-04-11 12:06:52 -06:00
FusionPBX
a02fcdca37 Update domains all, add enabled and disabled methods
The domains all  method uses domain_uuid for the array key
2025-04-11 11:39:33 -06:00
FusionPBX
07cf65dee5 Update domains all and session methods
Updated to improve and simplify it
2025-04-11 10:34:38 -06:00
FusionPBX
f9c7a3df40 Update grandstream_missed_call_notification default to No
This matches the pcode template. Grandstream description set it to no by default.
2025-04-10 18:11:27 -06:00
FusionPBX
992b18389a GRP add grandstream_wifi_enabled
This is needed to prevent removing wifi settings that were set manually.
2025-04-10 17:55:27 -06:00
FusionPBX
373c32ea55 Fix the Grandstream GRP sip.transport 2025-04-10 17:33:34 -06:00
FusionPBX
d583e8352d Use more intuitive names 2025-04-07 14:48:47 -06:00
FusionPBX
4f4a1f9c15 Update switch.php 2025-04-01 09:13:41 -06:00
Antonio Fernandez
7040635baf Bug Fix - music on hold path (#7349) 2025-04-01 09:10:53 -06:00
frytimo
5ed20f1c2f Fix plugin class name mismatch in auto loader (#7350)
* Fix plugin class name mismatch in auto loader
When matching the file name of the plugins in the authentication plugin folder they do not match. This causes auto loader not to find and load the class.

* Update auto_loader.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2025-04-01 09:07:26 -06:00
frytimo
5c1be1a318 Update clear cache method for settings object (#7348)
* update clear cache method for settings object

* re-use the database object from settings object
2025-03-31 10:04:33 -06:00
FusionPBX
091dca3ceb Update footer.php 2025-03-29 13:39:24 -06:00
FusionPBX
0b9fd924a9 Add not empty check on the domains session 2025-03-29 13:20:38 -06:00
FusionPBX
d1d24a0a9c Add yealink_force_voice_ring_volume
Forced ringer volume: 0 - 15
2025-03-27 17:44:10 -06:00
frytimo
00c6befb70 Add missing file path when cache miss in auto_loader (#7339) 2025-03-27 13:33:36 -06:00
frytimo
b5af974d34 Add backslash to the trim command (#7338) 2025-03-26 14:56:55 -06:00
frytimo
c165afc53e Fix trim command on interface name (#7336) 2025-03-26 13:11:37 -06:00
Brett@NGEN
cf55ca59ed Corrected case errors in provisioning template for Grandstream GHP6xx Series (#7203)
* Corrected case errors for Grandstream GHP6xx Series

* Corrected case - remotecontrol

* Update {$mac}.xml

* Replaced all camel case within XML element names

* Found a few more

Matching pattern: name=".*[a-z][A-Z].*"
2025-03-22 16:45:14 -06:00
FusionPBX
62877b7aab Add grandstream_random_port 2025-03-22 16:29:36 -06:00
mbarvoipdrs
d44e7c0c5f Yealink W60B Updates (#5600)
Adding Alarm server lines to be used with ver 85 firmware and the W59R handset.
2025-03-21 21:02:20 -06:00
frytimo
d3cedcf17f Add wifi function enabled (#7333)
* add wifi function enabled
2025-03-21 18:02:54 -06:00
frytimo
449b689840 Fix wifi function enabled (#7332) 2025-03-21 17:50:01 -06:00
frytimo
891e9e3dfa Use auth_id instead of user_id for pcode 36 (#7329) 2025-03-21 09:44:36 -06:00
frytimo
64a8715245 Fix user id instead of auth id used in grandstream template (#7326) 2025-03-20 23:51:03 -06:00
FusionPBX
dce8f1ba8a Update algom{$mac}.conf 2025-03-18 13:25:31 -06:00
frytimo
6d356194ba Ensure apcu_cache_info function is available before calling (#7323) 2025-03-17 14:58:36 -06:00
frytimo
1572c76963 Use regex in autoloader instead of include (#7322) 2025-03-17 10:01:11 -06:00
frytimo
ad1ba95566 Fix undefined constant error when flushing cache (#7321) 2025-03-17 10:00:25 -06:00
frytimo
0a42d8f198 Add caching to the auto_loader for interfaces (#7320)
* update auto loader to load and cache interfaces

* use new method to update the auto loader cache

* use new interface

* use new interface to trigger a cache flush

* update the console upgrade menu

* update the missing implements syntax

* add the clear_cache to the flush cache button
2025-03-15 09:13:36 -06:00
frytimo
99b3100ee9 fix typo in require.php file (#7319) 2025-03-14 22:55:00 -06:00
frytimo
77d2b3099a Create get methods for domain_uuid and user_uuid (#7144)
* create get methods for domain_uuid and user_uuid
2025-03-13 14:32:51 -06:00
FusionPBX
6c6814b29e Remove syntax that breaks older PHP
Removed :static to support PHP 7.4
2025-03-12 23:39:24 -06:00
frytimo
bed7c8827f fix missing quotes on parameter default value (#7310) 2025-03-12 20:50:14 -06:00
FusionPBX
31a88e3a15 Update auto_loader.php 2025-03-12 14:48:33 -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
da6471df5f Optimize require.php (#7286)
Load the auto_loader first
Use config object to find config.conf file and declare global
Use database object and declare global
Use settings object and declare global
2025-03-11 14:37:31 -06:00
Antonio Fernandez
ca2b0b22dd Update algom{$mac}.conf (#7299)
admin password is now added via provisioning
2025-03-10 17:34:43 -06:00
frytimo
d529021b3f Use boolean setting as true boolean (#7284)
* use boolean setting as true boolean

* Update settings class to use the php filter_var function for boolean
Using the built-in filter type for boolean seems like a better option as they are faster, already hardened, and more widely tested.
I found this better method used originally by Mark J. Crane in 2022 in the content.php page so I included it here.

* Update settings class to use the php filter_var function for boolean
Using the built-in filter type for boolean seems like a better option as they are faster, already hardened, and more widely tested.
I found this better method used originally by Mark J. Crane in 2022 in the content.php page so I included it here.
2025-03-04 11:25:47 -07:00
FusionPBX
bb02c97c64 Add grandstream_transfer_mode_via_vpk 2025-03-03 18:51:19 -07:00
FusionPBX
c47eac110a Add grandstream_transfer_mode_via_vpk 2025-03-03 18:50:58 -07:00
FusionPBX
9fcfc7276a Add grandstream_transfer_mode_via_vpk 2025-03-03 18:50:44 -07:00