Commit Graph

77 Commits

Author SHA1 Message Date
Alex 1e96df6e95
Change $setting to $settings (#7318)
* Change $setting to $settings

* Update app_defaults.php

* Update fax_queue.php

* Update xml_cdr.php

* Update email_queue.php

* Update transcribe.php

* Update send.php

* Update fax_queue.php

* Update fax_send.php

* Update app_defaults.php

* Update email_queue.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php

* Update app_defaults.php
2025-03-14 16:19:49 -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
FusionPBX 48e44814de
Update email_send.php 2025-03-02 10:38:34 -07:00
FusionPBX a2fc7dff1d
Update email_send.php 2025-01-30 16:11:33 -07:00
FusionPBX 5c9c872c99
Show newest emails first 2025-01-01 11:26:44 -07:00
FusionPBX f0837e173b
Add function_exists for posix_getsid
Used to support operating systems that don't support posix_getsid
2024-12-02 18:34:49 -07:00
markjcrane 78306a1a68 Add execute permission 2024-12-02 18:05:26 -07:00
FusionPBX efdc007eb2
Use the PHP_BINARY constant 2024-12-02 17:55:35 -07:00
FusionPBX 6f1c595b1f
Use the PHP_BINARY constant 2024-12-02 17:54:49 -07:00
FusionPBX cd8d5302ac
Fix temporary permissions 2024-11-29 13:57:01 -07:00
frytimo f86214f61e
Fix email send breaks transcribe when php 7.1 is used (#7170)
Ensured the values are of boolean type as PHP 7.1 treats them strange
2024-10-24 14:11:25 -06:00
FusionPBX 5e75879518
Add email queue audio string
This enables sending base64 to the transcription class
2024-09-14 21:27:02 -06:00
fusionate d79c7b1cb9
Voicemail: Integrate message forward intro playback in web interface, and prepend intro on emailed audio file. 2024-08-01 10:27:15 -06:00
frytimo 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
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 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
FusionPBX 4369ab6380
Update email_send.php
Email transcription has a value no need to transcribe again so run the transcription when the value is empty.
2024-06-24 18:12:49 -06:00
FusionPBX b6257bbda2
Update email_send.php 2024-06-24 17:34:19 -06:00
FusionPBX 94e3d1edf6
Voicemail transcription use the new transcribe class 2024-05-05 16:47:32 -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
Ahron Greenberg (agree) 4435cf5bd0
[voicemail transcription] fix google v2 (#6946)
* v2 doesn't require to have api_key set
* allow setting setting a path to the application credentials
* check only ones if the file path exists
2024-04-15 09:26:44 -06:00
Ahron Greenberg (agree) 199e573041
[email_queue] don't run exec on each iteration (#6945) 2024-04-08 14:18:42 -06:00
FusionPBX 6ec3c53c1f
Email Queue save response false by default 2024-01-24 11:04:51 -07:00
FusionPBX 2d8f591534
Update send.php
Spelling correction and use domain_uuid to find settings
2024-01-24 10:58:12 -07:00
FusionPBX aee125f23a
Create send.php 2024-01-05 15:07:06 -07:00
Andrew Alexander 3a0a7b48f1
openai transcription support (#6850)
* openai transcription support

* Update transcribe.php

* Update transcribe.php
2023-12-14 18:39:11 -07:00
FusionPBX 2e032cd115
Update email_send.php
Move the 'transcribe enabled' message
2023-12-11 12:32:27 -07:00
FusionPBX 87f722e59d
check if transcribe_enabled is enabled
We are checking this already on the voicemail. This checks the setting for transcribe_enabled in default and domain settings.
2023-12-11 12:21:15 -07:00
FusionPBX b919848425
Only include transcribe.php if enabled 2023-12-11 11:51:19 -07:00
FusionPBX 8a2688cfc5
Update email_queue.php 2023-12-11 11:48:58 -07:00
FusionPBX 88a4dbf3e6
Prevent error when the google_url is incorrect 2023-12-11 11:43:55 -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
fusionate d9d17a6917
Misc: Remove parameters from event_socket_create() calls. 2023-09-20 18:43:17 +00:00
FusionPBX a7dce663a1
Simplified array structure as it changed when using the settings class 2023-09-19 11:40:18 -06:00
FusionPBX 7cb3c0b211
Fix the category and subcategory 2023-09-14 21:17:19 -06:00
FusionPBX 5afce93f03
Update email_queue to use settings class 2023-09-14 16:10:13 -06:00
FusionPBX 1880688813
Use settings class needed for the email_queue 2023-09-13 09:54:00 -06:00
FusionPBX d8cc5d4ad5
Adjust version 2 command 2023-09-07 13:43:40 -06:00
FusionPBX 6036f36a8b
Use gscloud for oauth2 for Google v2 2023-09-07 13:37:25 -06:00
FusionPBX 556c1fe284
Add Google API v2 speech transcription 2023-09-07 13:13:05 -06:00
fusionate d4d5799342
Email Queue - Job & Service: Fix variable issues to mitigate errors. 2023-08-01 00:14:00 +00:00
markjcrane 32051873be Use __dir__ to find resources/require.php 2023-06-16 22:49:09 -06:00
frytimo fef8165be2
Frytimo pr patches for php8.1 (#6630)
* Passing null to parameter #2 ($string) of type string is deprecated

* Passing null to parameter #1 ($string) of type string is deprecated

* php 8.1 fixes

* php 8.1 fixes - replace strlen($var) > 0 with !empty($var)

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - strlower with null

* php 8.1 fixes - strreplace with null

* php 8.1 fixes - passing null to base64_decode

* php 8.1 fixes - check for false and check for null on $this->dir

* php 8.1 fixes - remove assignment of $db variable to modules object

* php 8.1 fixes - avoid sending null to substr

* php 8.1 fixes - change ${var} to {$var}

* php 8.1 fixes - check for null before preg_replace

* php 8.1 fixes - remove setting db variable on domains object

* php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null

* php 8.1 fixes - set empty string if $_REQUEST['show'] is not available

* php 8.1 fixes

* php 8.1 fixes - correct $_POST checking syntax

* php 8.1 fixes - correct $_POST variables

* php 8.1 fixes

* Use brackets consistently

* Update user_setting_edit.php

* Change to not empty

* Update device.php

* Update text.php

---------

Co-authored-by: Tim Fry <tim@voipstratus.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-05 10:46:37 -06: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
markjcrane 2d2c5fc06e Add email attachment cid and mime type 2023-04-12 14:04:56 -06:00
Finn 8cdcd86ba9
update custom transcription provider for async transcriptions and retry logic (#6583)
Co-authored-by: Finn <finn@acceleratenetworks.com>
2023-03-24 12:43:17 -06:00
FusionPBX 1d36ca2dc9
Preprend the settings to the email response 2023-02-17 16:58:44 -07:00
FusionPBX c430c5c07f
Add email settings to the saved email response 2023-02-17 16:45:52 -07:00
FusionPBX ef866e12d7
Remove code that was commented out 2023-02-17 12:59:22 -07:00