Commit Graph
100 Commits
Author SHA1 Message Date
frytimo 414e0b2a21 fix fax caller id number empty (#7129) 2024-09-11 09:09:14 -06:00
frytimo 2085c950ee Use isset in permission exists for improved efficiency(#7126)
Using isset on the key name of the array allows it to use a hash table lookup to improve the lookup times for a permission. The permission name is not set if it does not exist for the current user.
2024-09-09 09:14:45 -06:00
frytimo d4fdd1ce6b Add back button to fax queue page. Move permission_exists outside loop (#7125)
* Add back button to fax queue page. Move permission_exists outside loop

* move to permission array instead of individual permission variables
2024-09-06 20:27:19 -06:00
frytimo 9f6d828799 pass objects to authentication plugins when possible (#7123)
* pass objects to authentication plugins when possible
Pass the settings and authentication objects to the plugins to re-use existing objects

* Update authentication.php
2024-09-06 18:20:26 -06:00
frytimoandTim Fry 7b94e9434e fix authentication logging of cidr fail (#7120)
Correct variable name to use when logging a cidr failed login attempt

Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-09-05 09:30:22 -06:00
frytimo a965c78735 fix empty session username (#7119) 2024-09-04 17:09:16 -06:00
frytimo 7dde6ceb85 fix default settings showing all settings as bold (#7118) 2024-09-04 14:12:30 -06:00
frytimoandTim Fry b529d2a535 regenerate the session after cidr check is complete and then log (#7117)
Logging after all checks are complete ensures the session ID is correct when logging it in the user_logs table

Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-09-04 12:06:09 -06:00
frytimo 2cbb4dbc31 remove instances where a pointer is used in a foreach loop for value (#7108) 2024-08-22 12:41:10 -06:00
frytimo 027a78243a Fix bug where a global profile doesn't show up in the device list (#7103)
* Fix bug where a global profile doesn't show up in the device list
2024-08-19 09:50:08 -06:00
frytimoandTim Fry d7035fecaa exit for loop when matching token for slight performance increase (#7092)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-08-15 14:10:08 -06:00
frytimo 301fb2b974 remove all $_SESSION references and use single database object (#7095)
Updates:
- use config object to find and load config file
- use single database object with config passed in constructor
- use settings object with database passed in constructor
- parse command line options with for loop so order no longer matters
- store all passed options in the super global $_REQUEST array for easy reference and debugging
- add debug and debug_level options for command line
- allow dumping the command line arguments when debug_level is 3 or higher
- add config option in command line to set location of config file
- add a shutdown function to allow for the exit command to be used but still output to either console or file
- add extra checks for options that are needed during runtime
- remove old PHP version 4 code
- add is_file check when checking for a valid .tiff file because file_exists returns true if it's a directory or file
2024-08-14 12:59:53 -06:00
frytimo 10bd1b9f9f add multiple line export feature (#7090)
* move permissions to top of page and use single database object

* use a domain array instead of session

* use a domain array instead of session

* add multiple line export feature
Exporting devices with multiple lines did not show headers for extra columns if the first device listed only had a single line and the other devices had multiple lines. This adds a feature to export multiple lines for devices using the "duplicate column feature" so that the import feature can detect and import all lines for the device.

* Update device_download.php
2024-08-09 17:57:53 -06:00
frytimo 56ca4ee695 Remove files not used in project (#7086) 2024-08-07 14:23:30 -06:00
frytimo be68bfb915 honor the domain_filter setting in default settings (#7085)
It was found that the domain_filter was not working when provisioning devices. This can lead to conflicts if a device address is in multiple domains or a valid device address is sent for another domain. This enforces the check so that if http_domain_filter is enabled and the domain name does not match the device specified, it will reject the request.
2024-08-07 14:09:26 -06:00
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 2d16cba7fb update voicemail constructor to use domain and user uuids for settings (#7080)
If the settings object is not passed in the parameters the settings object that was created did not have the current domain uuid or user uuid set. This would cause default settings that were copied to the domain to be ignored. Ensuring the domain_uuid and user_uuid are initialized before the setting object and then passing them to the settings object constructor will make sure that the values would be returned when a request to the settings object is made.
2024-08-02 09:46:54 -06:00
frytimo 3fc320ea39 method messages in object voicemail erases the property voicemail_uuid (#7079)
The method overwrites the object property initially set when the method is called. This causes any subsequent calls to be incorrect. Removing this keeps the initial objects property intact. The method voicemail_messages is only used internally from the messages method for getting message details in the voicemails. This has been set to a private method to reflect this type of use.

Authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-31 13:19:58 -06:00
frytimo cb94f2c02b voicemail messages function is called twice. second call removes list (#7078)
When voicemail is called the first time, it correctly displays the list of voicemail messages. When it is called a second time the function returns an empty array and gives an empty display. This removes the second call to method 'messages' in 'voicemail' object.

authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-31 12:26:26 -06:00
frytimoandTim Fry 78f68d106f replace if_group with dialplan_edit permission (#7072)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-26 12:20:47 -06:00
frytimoandTim Fry bc5165572a Use ini_get to retrieve the session path instead of using session_path (#7067)
When using session_path, the session must be active and will automatically activate the session. This is a better method so that the session is never started.

Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-24 11:28:34 -06:00
frytimo 46abe4897c use loose comparison instead of strict comparison (#7064)
Update comparison checks when testing the database status and
add a unified log message with a more detailed message from the
database when there is a failure

Authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-23 19:58:13 -06:00
frytimo f80347504a enable foreground mode for services (#7061)
Authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-23 07:40:49 -06:00
frytimo 8f71f5cf4b reduce permission_exists calls from 7,000+ to just 7 (#7056)
Authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-19 17:39:19 -06:00
frytimo cd9c6e95cb Use the __DIR__ to include require.php (#7055)
Authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-18 12:06:27 -06:00
frytimoandTim Fry 5af4610a9c Ensure the 'transcribe_' is prepended to the class name (#7048)
Class name requires the transcribe_ prepended before PHP checks to see
if the class actually exists as the engine must have 'transcribe_' in
front of the classes.

Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-10 14:02:23 -06:00
frytimoandTim Fry 8cfdb40acc Database transactions maintenance (#7047)
* add database_maintenance function to database_transactions

* update database_maintenance function in database_transactions
New changes in the maintenance application required changes to any
existing functions already created

---------

Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-09 12:52:05 -06:00
frytimoandTim Fry d1594da57e implement changes in to the fax queue class (#7044)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-09 12:51:36 -06:00
frytimoandTim Fry 72a66f555a specify the cdr category for xml_cdr (#7046)
* update xml_cdr with the latest changes to the maintenance application
Update the public static function database_maintenance in xml_cdr
class to use the newest changes in the maintenance class. Constants are
now defined in the class for the table names and subcategories.

* update app_config file with necessary default setting changes

* remove constants

* use empty instead of null check

---------

Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-09 12:51:11 -06:00
frytimoandTim Fry abf5ffb9f0 implement changes in to the event_guard class (#7045)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-09 12:50:34 -06:00
frytimo d7f05621c7 Implement changes in to the session class (#7042) 2024-07-09 12:50:01 -06:00
frytimo d68c1a08d8 Call recordings maintenance changes (#7039)
* add filesystem maintenance method to the call_recordings class

* Add filesystem maintenance default setting to the app_config
Set filesystem_retention_days default setting to 90 days in the 
app_config.php file to allow the maintenance service to delete older
files.
2024-07-09 09:19:50 -06:00
frytimo 50f1601a4d update voicemail with the latest changes to the maintenance application (#7035)
* update voicemail with the latest changes to the maintenance application
Update the public static function filesystem_maintenance in voicemail
class to use the newest changes in the maintenance class. The
maintenance class now has a constant defined for the subcategory used
within the project.

* update app_config file with necessary default setting changes

---------

Authored-by: Tim Fry <tim@fusionpbx.com>
2024-07-06 20:45:25 -06:00
frytimo 0ea012c494 Update database_maintenance (#7037) 2024-07-05 17:37:50 -06:00
frytimo 766aeeefae email_send_remove_extra_database_objects (#7034)
Use a single instance of the object instead
2024-07-04 11:53:44 -06:00
frytimo 2b87349e7d remove the manual inclusion of classes to let autoloader handle it (#7033)
By including the class manually with the include statement, the class
has a possibility of loading twice. This will cause a fatal error if
classes are already loaded.
2024-07-04 09:12:34 -06:00
frytimo 9beef70b94 fix missing class exists check for transcribe engine (#7032)
Add a class_exists check to ensure transcribe engine exists before
attempting the use of the class.
2024-07-02 09:30:26 -06:00
frytimo 7d493c3287 smtp_from_name was accidentally set to smtp_from (#7029)
This uses the settings default value to set smtp_from_name to be set to
smtp_from if it does not have it's own value. The isset check on line
248 is no longer needed because smtp_from_name will always have a value
2024-06-28 08:47:17 -06:00
frytimoandTim Fry 5ea753295d add maintenance function to the xml_cdr (#7025)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-06-27 11:27:09 -06:00
frytimoandTim Fry a863faaae2 fix the user_uuid missing from transaction tables (#7026)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-06-27 11:26:16 -06:00
frytimo 49b2505f0c Voicemail maintenance (#7023)
* add database_maintenance

* add filesystem_maintenance

* use modified time instead of create time

* Update voicemail.php
2024-06-25 13:07:42 -06:00
frytimoandTim Fry 820a7231dc format class for comments to be at the same tab stop (#7018)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-06-24 08:26:34 -06:00
frytimo fcd64fcce6 Remove session from provisioning (#7014)
* use single database object, use settings class

* add common domain functions

* use settings class
2024-06-22 19:28:04 -06:00
frytimoandTim Fry 4eb9892256 update templates with checking for codec to be set to 'true' (#7015)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-06-21 14:34:52 -06:00
frytimoandTim Fry 5fda9b2dda allow auto_loader to search in traits directories (#7005)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-06-11 10:17:02 -06:00
frytimoandTim Fry f0a80426eb add function to return the config object used to create the database object (#6998)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-06-08 09:57:33 -06:00
frytimo c176192c13 move dollar sign to inside the curly brace (#6991) 2024-06-03 13:32:19 -06:00
frytimo 968c05374f do not exit when unable to connect to freeswitch socket (#6992) 2024-06-03 13:31:32 -06:00
frytimo 058d9aba37 fix failing to save dialplan details xml in proper order (#6994) 2024-06-03 13:30:59 -06:00
frytimo 642c0acb79 introduce new service framework (#6990) 2024-05-31 12:40:46 -06:00
frytimo 30b38e7d86 Add methods to handle device and add documentation (#6989) 2024-05-31 11:19:03 -06:00
frytimo a4f352aa27 Add check for file fax_active.php to exist before showing link to page (#6966)
Task #8 - File not found: fax_active.php
2024-05-29 16:13:56 -06:00
frytimo a7f4dd0340 update grandstream template to use NTP provisioning variable (#6983) 2024-05-27 13:10:05 -06:00
frytimo 46b7c5536a Prevent deleting the email when fax sender is not authorized (#6981)
* Prevent deleting the email when fax sender is not authorized
2024-05-21 22:51:50 -06:00
frytimo 0b8edef82c Config class rewrite (#6965)
* Use a singleton pattern in the database class to re-use the database object inside the permission_exists function.
2024-04-27 19:22:20 -06:00
frytimo aeee90d56e update auto_loader to use magic dir constant (#6963) 2024-04-26 13:49:56 -06:00
frytimo c85e10ea09 include software_name in the global declaration (#6957) 2024-04-23 10:23:04 -06:00
frytimo 41eb7ac8d3 Fix empty line printing on console (#6956)
* fix empty line printing on console
2024-04-23 08:53:14 -06:00
frytimo 33ff85ee75 Commad line upgrade enhancements (#6955)
* Add new English language phrases for cli upgrade menu

* include a software name as a const for cli upgrade menu

* add it repos in app folder, internationalizations, and descriptions

* bug fix when response_source_update is empty change back to origin dir

* change original 'menu' to 'menus'. Allow calling menu from upgrade.php

* Update upgrade_menu.php
2024-04-22 17:15:09 -06:00
frytimo c4fd1c4842 Rename domains to app defaults in menu (#6954)
* rename 'Domains' to 'App Defaults' in menu options for clarity

* reorder app defaults to be after the schema like web interface
2024-04-22 12:56:31 -06:00
frytimo 37fd4692c1 Add command line menu for upgrade (#6949)
* use existing git_pull function from global functions
2024-04-17 15:04:34 -06:00
frytimo 2f31b5addd if_group caused no conferences to show when user not in the admin group (#6942)
* if_group caused no conferences to show when user not in the admin group

* if_group replaced to be conference_room_edit
2024-04-05 17:33:42 -06:00
frytimo 614986cd7a use a single database instead of using new database in user_edit (#6939) 2024-04-02 11:55:32 -06:00
frytimo c595df34b2 variable expanded_all was not initialized causing warning (#6938) 2024-04-02 09:23:37 -06:00
frytimo 4377336add variable conference_center_greeting was not initialized causing warning (#6937) 2024-04-02 09:15:44 -06:00
frytimo e47b2e3710 Fix $x was not initialized on first iteration of for loop (#6936) 2024-04-02 09:09:36 -06:00
frytimo 502ba07c53 Ai elevenlabs io engine (#6932)
* allow settings to load domain and user settings

* ensure the engine is also enabled before attempting to create a new object

* add default values to stop undefined variable warnings

* enforce all models to set and return voices and languages

* enforce all models to set and return languages

* ensure speech_enabled is set by the current session

* create elevenlabs implementation of ai speech

* Update ai_elevenlabs.php
2024-03-30 14:16:16 -06:00
frytimo 6bd159a717 settings was being set in constructor but property was missing (#6931) 2024-03-28 22:13:01 -06:00
frytimo 6fd5d7cda4 Fix user_email missing from object properties (#6929) 2024-03-28 22:10:36 -06:00
frytimo 758cb2ec60 set to compare instead of assignment in the message error checking (#6933) 2024-03-28 22:07:04 -06:00
frytimo ff55a36980 after doing a database restore, the permission may not yet exist (#6930) 2024-03-28 08:59:30 -06:00
frytimo a9886a8ba9 Add str_starts_with and str_ends_with to PHP versions older than 8 (#6832)
* Add str_starts_with and str_ends_with to PHP versions older than 8

* Update functions.php
2024-03-26 16:42:44 -06:00
frytimo 2064c33fb7 AI bug fixes and update interfaces (#6925)
* allow settings to load domain and user settings

* ensure engine is also enabled before attempting to create a new object

* add default values to stop undefined variable warnings

* enforce all models to set and return voices and languages

* enforce all models to set and return languages

* ensure speech_enabled is set by the current session
2024-03-24 08:37:17 -06:00
frytimo 2264e2c0ed Add read and write codec to columns displayed (#6913)
* add read and write codec to columns displayed

* update the column display name to be Codecs
2024-03-16 10:56:28 -06:00
frytimo 9573cfd9a9 fix transcription bug showing when not enabled in default settings (#6911) 2024-03-05 10:58:22 -07:00
frytimo ebe12ef338 allow setting a default value (#6908) 2024-03-01 10:26:51 -07:00
frytimo d5cbebadd8 add domain column when showing all domains (#6905) 2024-02-26 08:57:36 -07:00
frytimo b47f9c3219 add default value for ring time delay before voicemail (#6900)
* add default value for ring time delay before voicemail

* Update app_config.php
2024-02-20 22:04:24 -07:00
frytimo 2a613840ec avoid user/pass connection request removal in GRP TR-069 settings (#6890) 2024-02-12 11:38:50 -07:00
frytimo d309308824 Change default DHCP value to SNOM recommendation (#6889)
* change default DHCP  value to match SNOM recommendation

* modify the name to be snom_dhcp
2024-02-09 10:29:03 -07:00
frytimo a17b63e616 Use the settings class in the cache class (#6891) 2024-02-09 10:21:55 -07:00
frytimo c51d485668 use $app_name and $app_uuid for database transaction (#6881) 2024-02-08 11:13:50 -07:00
frytimo 535eba25fa Change domain to server_address (#6888)
template should use account.1.server_address
2024-02-08 11:12:24 -07:00
frytimo 4fbd767c05 Fix bug where a dialplan detail item was deleted but still shows in the XML dialplan (#6875)
* Fix bug where a dialplan detail item was deleted but still shows in the
XML dialplan.

* Update dialplan_edit.php
2024-02-02 09:17:00 -07:00
frytimo 4e9dd1cdc9 Create information area for bug reports or errors to the Support Team (#6876)
* initial commit for system information bug report data

* add javascript to copy to clipboard

* add javascript to copy to clipboard

* Update copy_to_clipboard.js

* Update system.php

* Update app_languages.php

Add other languages

* move function file to resources/functions directory

* use the array returned from system_information function

* Update app_languages.php

* update path locations

* remove require files

* Merge origin/create_json_page_for_bug_report into create_json_page_for_bug_report
2024-01-23 16:11:51 -07:00
frytimo 1cba516bdc add Multi-cast variables to Yealink t54w provisioning template (#6877) 2024-01-23 15:51:13 -07:00
frytimo a2c54d98b4 ensure $git_repo is an array and has elements before access (#6874) 2024-01-20 16:45:23 -07:00
frytimo 0b977f044d Force close port (#6870)
* force close profile sip ports

* create force_close_port function

* force close profile sip ports
2024-01-17 09:05:28 -07:00
frytimo 10e7b485e7 Schema change object property db instead of database->db (#6833) 2023-12-16 07:54:20 -07:00
frytimo 9f204a7cac move explode of $line inside of if block to fix php warning for line 93 (#6842) 2023-12-07 18:38:57 -07:00
frytimo 1664bef5d9 use empty check instead of string check to prevent php warning (#6843) 2023-12-07 18:38:01 -07: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
frytimo 12fb45c99f Update logging class (#6829)
* logging class improvements

* remove alias

* adjust line print out for field order

* refactor class name to be inline with framework standard

* fix writing direct to write method
2023-11-13 18:55:52 -07:00
frytimoandFusionPBX 372db3cc50 Patch contacts calling multiple schemas (#6826)
* improve performance for contacts app_defaults

* add app_name and app_uuid as constants in class

* performance boost by removing scanning app_defaults twice

* Update app_defaults.php

* Update schema.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-11-03 14:04:07 -06:00
frytimo 77e4bb9865 Reorder project path and project root defines (#6787)
* reorder the project_root and project_path define so isset is called
before the config key project.root is used

* ensure project path begins with a '/'

* rewrite for empty string in project_path

* Update require.php
2023-10-16 21:54:56 -06:00
frytimo 9a982edc2e update the settings set method to use params instead of array (#6804)
* update the settings set method to use params instead of array

* remove test code
2023-09-20 17:59:37 -06:00
frytimo 0dc9aaabe8 Minor Changes (#6756)
* Update installer to use magic __DIR__

* move setting default step to near top

* spacing

* move session start before text object creation
2023-06-17 14:07:06 -06:00
frytimoandFusionPBX d7bbcd89f5 Use magic constant dir (#6711)
* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__ to load only functions.php

* replace spaces with tab character

* update dirname command to use levels instead of nesting

* use magic constant __DIR__

* update dirname command to use levels instead of nesting

* Update access_control_edit.php

* Update access_control_import.php

* Update access_controls.php

* Update dnd.php

* Update access_controls_reload.php

* Update call_center_agents.php

* Update call_center_agents.php

* Update fax_queue.php

* Update login.php

* Update pdo.php

* Update pdo_vm.php

* Update switch.php

* Update index.php

* Update css.php

* Update v_mailto.php

* Update fax_to_email.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-06-15 11:28:23 -06:00
frytimo c03ae6e098 Php 8.1 call forward fixes (#6716)
* various PHP 8.1 warning fixes

* various PHP 8.1 warning fixes and create class constants
2023-05-24 10:24:39 -06:00
frytimo 9dc8bcf7e9 Fix xml cdr for PHP 8.1 (#6692)
* fix multiple warnings

* fix multiple warnings

* ensure array key exists

* ensure array key exists

* assign boolean variable for showall in url

* change boolean to show_all instead of showall

* revert some changes. Create default leg value and mos_score

* validate page integer

* revert back to showall from get
2023-05-12 13:28:42 -06:00