Commit Graph

72 Commits

Author SHA1 Message Date
FusionPBX
6b063f2c28 Replace the DOCUMENT_ROOT and PROJECT_ROOT variables
Use the __DIR__ constant and dirname as needed
2025-12-08 14:12:19 -07:00
frytimo
adfc4cc469 Create more documentation (#7627)
* Documentation, format class, no modification.
2025-11-18 18:33:07 -07:00
FusionPBX
1b96e24713 Update channel_variables 2025-10-30 20:11:33 -06:00
FusionPBX
76e2e7d3b7 Remove database app_name and app_uuid (#7562)
- Remove database app_name, app_uuid
  - This is handled automatically by the database class
- Remove redundant database::new()
2025-10-09 17:54:05 -06:00
FusionPBX
7f9064fadb Update boolean toggle and the database boolean type (#7522)
* Change the data type to boolean

* Use boolean values in SQL and Conditional Statements

* Schema Data Types: Drop views so that alter tables statements complete

* Update settings.php

* Add extension for call_screen_enabled

* Gateway handle boolean
Add the boolean toggle
- distinct_to
- caller_id_in_from
- supress_cng
- extension_in_contact
- contact_in_ping

* Update gateways.php

* Update voicemail_edit.php

* Replace the ${caller_id_name} with the extensions caller id name

* Phrase - Edit: Update slide toggle with new select beneath.

* Update the input toggle style

* Set the input_toggle_style_switch as boolean

* Update the input toggle style

* Theme: Adjust CSS to wrap description text on form fields.

* Add domain_uuid and domain_name to the SQL SELECT

* Unset the parameters to fix the next query

* Gateway: Integrate new slide toggle switch.

* Dashboard: Update the input toggle style (#7499)

* Dashboard: Update the input toggle style

* Update dashboard_widget_edit.php

* Update dashboard_edit.php

* Inbound Route - Add: Integrate new slide toggle switch and boolean.

* User Settings: Integrate new slide toggle switch.

* Call Block Edit: Update the input toggle style (#7500)

* Bridge Edit: Update the input toggle style (#7501)

* Update phrases.php

* Update domain_edit.php

* Domain Settings Edit: Update the input toggle style

* User Edit: Update the input toggle style

* Update install.php

* Remove fields marked as deprecated

* Use boolean in the select statement

* Streams: New slide toggle and boolean.

* Streams: Remove unnecessary default.

* Queues (FIFO): New slide toggle.

* Call Detail Records: Update the input toggle style (#7503)

* Call Detail Records: Update the input toggle style

* Update xml_cdr_extension_summary.php

* Update xml_cdr_extension_summary.php

* Update xml_cdr_extension_summary.php

* Call Centers: Update the input toggle style (#7502)

* Call Centers: Update the input toggle style

* Update call_center_agent_edit.php

* Conference Centers: Update the input toggle style (#7506)

* Conference Centers: Update the input toggle style

* Update app_config.php

* Update conference_center_edit.php

* Use boolean data type (#7505)

* Call Flow Edit: Update the input toggle style (#7504)

* Devices: Update the input toggle style

* IVR Menus: New slide toggle.

* IVR Menu: Remove deprected file.

* SIP Profile - Edit: New slide toggle.

* Device Profiles: Update the input toggle style

* Ring Groups - List: Fix syntax.

* Theme: Fire onchange event when switching slide toggle control.

* Device Vendors: Update the input toggle style

* Update enabled boolean

* Update device_edit.php

* Ring Groups: New slide toggle.

* Update domain_edit.php

* Email Templates: Update the input toggle style

* Header: Correct default value on input toggle style.

* Default/Domain/User Settings: Adjust Select option label for better clarity.

* Use true boolean types for switch theme toggle or drop-down box (#7507)

* Groups: Update the input toggle style

* Conference Controls: Update the input toggle style (#7509)

* Conference Controls: Update the input toggle style

* Update conference_control_edit.php

* Update conference_control_details.php

* Update conference_control_detail_edit.php

* Conferences: Update the input toggle style (#7511)

* Use true boolean types for switch theme toggle or drop-down box (#7513)

* Dialplans: Update the input toggle style
Also updated outbound route add

* Ring Group: Only adjust ring group forward destination top margin when slide toggle enabled.

* Default/Domain/User Settings - List: Adjust for new 'Select Box' label on input_toggle_style value.

* Use true boolean types for switch theme toggle or drop-down box (#7514)

* Call Forward / Follow Me: Minor javascript adjustments to mirror previous behavior.

* Ring Groups [Dashboard]: New slide toggle.

* Get the contacts details with a seperate SQL Query

* Remove debug info

* Destinations: Update the input toggle style

* Conference Profiles: Update the input toggle style (#7515)

* Conference Profiles: Update the input toggle style

* Update conference_profiles.php

* Update conference_profile_params.php

* Update conference_profile_param_edit.php

* Update conference_profile_edit.php

* Extensions: Update the input toggle style

* Contacts: Update the input toggle style (#7517)

* Contacts: Update the input toggle style

* Update contact_address_edit.php

* Update contact_attachment_edit.php

* Update contact_edit.php

* Update contact_email_edit.php

* Update contact_phone_edit.php

* Update contact_relation_edit.php

* Update contact_setting_edit.php

* Update contact_url_edit.php

* Update contacts.php

* Voicemails: New slide toggle.

* Voicemail Greeting: New slide toggle.

* Modules: New slide toggle.

* Recordings: New slide toggle

* Variables: New slide toggle.

* Time Conditions: New slide toggle.

* Extensions - List: Remove invalid column name.

* Extension Settings: New slide toggle.

* Number Translations: New slide toggle and boolean.

* Sofia global settings: Update the input toggle style

* Update alter table convert to boolean

* Fix contact relation search (#7518)

* Sip Profile Edit: Fix setting enabled labels (#7519)

* Sip Profile Edit: Fix setting enabled labels

* Update sip_profile_edit.php

* Update dialplan_edit.php (#7520)

* Update SQL queries to use true/false for contact primary settings (#7521)

* Update SQL queries to use true/false for contact primary settings

* Update contacts_vcard.php

* Update email.php

* Update totp.php

* Update contact_url_edit.php

* Update contact_email_edit.php

* Update contact_address_edit.php

* Update contact_attachment_edit.php

* Update contact_phone_edit.php

* Add a database views method

* Add database view groups

* Add database users view

* Add database call_recordings view

* Update users.php

* Add  database view call block

* Update schema to use the database views method

* Update conference.conf.lua boolean

* Update directory.lua boolean

* Update callcenter.conf.lua agent_status boolean

* Update sofia.conf.lua boolean

* Update number translations lua boolean

* Update directory.lua boolean

* Update group_call.lua fix the cache

* Update reverse-auth-lookup.lua boolean

* Update directory.lua boolean

* Use concat instead of ||

* Update index.lua

---------

Co-authored-by: fusionate <nate@fusionpbx.com>
Co-authored-by: Alex <alex@fusionpbx.com>
Co-authored-by: frytimo <tim@fusionpbx.com>
2025-09-20 18:42:05 -06:00
frytimo
86093bda83 Exit fax_send immediately if no fax_queue_uuid is found (#7479)
* Exit fax_send immediately if no fax_queue_uuid is found

* Add removing the PID file in to the registered shutdown function
2025-09-04 11:00:13 -06:00
frytimo
196a354e52 Fix undeclared variable warning in fax_send (#7478)
* fix undeclared variable warning in fax_send

* Update fax_send.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2025-09-04 10:49:56 -06:00
hacc1225
1fc0962de2 Fix: Ensure proper absolute_codec_string for fax_queue (#7359)
The absolute_codec_string parameter for FreeSWITCH was being incorrectly
for formatted, causing issues with fax transmissions, particularly in
regions preferring the PCMA codec.
Without proper quoting, the comma-separated codec list PCMU,PCMA was
being parsed incorrectly by FreeSWITCH. The second codec PCMA was
misinterpreted as a separate dial string parameter, resulting in
absolute_codec_string being set to only PCMU. This led to negotiation
failures when the receiving end required PCMA.
This commit resolves this by enclosing the codec list within *escaped*
single quotes \'PCMU,PCMA\'. **Crucially, without this escaping,
FreeSWITCH would not correctly interpret the quoted string.** The
literal quotes are necessary to ensure that PCMU,PCMA is treated as a
single value. By implementing this change, we guarantee that both PCMU
and PCMA are correctly included in the codec negotiation, resolving the
fax transmission failures in PCMA-dominant regions.
2025-08-15 07:29:27 -06:00
FusionPBX
4e3618e35f Update process_exists 2025-06-05 16:46:39 -06:00
FusionPBX
399c071961 Fix the email_from when using per domain settings
Remove extra new database objects to make the code more efficient
2025-05-06 21:30:01 -06:00
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
FusionPBX
27e32e8f34 Send the fax with primary and alternative routes 2025-02-14 15:50:51 -07:00
FusionPBX
9d3dd2a831 Add two fax variables 2025-02-14 13:08:19 -07:00
FusionPBX
574ec7a5b3 Fax queue setting prefer_local default false
This allows control over whether to prefer sending to the voip provider or attempt local fax call.
2025-02-04 18:37:58 -07:00
FusionPBX
df90b758bb Fix issue with sending local faxes
When sip_to_user or sip_req_user are used then we need to add these variables so that it can find the correct inbound route.
2025-01-15 19:44:56 -07:00
FusionPBX
57a792dccd Use the PHP_BINARY constant 2024-12-02 17:58:07 -07:00
FusionPBX
cd8d5302ac Fix temporary permissions 2024-11-29 13:57:01 -07:00
FusionPBX
baed3947d4 Make sure the origination_uuid is set 2024-11-04 08:21:03 -07:00
FusionPBX
81fc86fc01 Handle country code, trunk prefix and area code 2024-10-17 13:15:26 -06:00
FusionPBX
ed836aa41e Update fax_send.php
- Optimize the database connection
- Use loopback for local FAX destinations
2024-10-17 02:39:03 -06:00
FusionPBX
7b025e490f Update fax sending order 2024-10-15 12:06:02 -06:00
fusionate
e4aa30bcd6 Fax - Sent: Added Recipient column, if allowed. 2024-09-17 14:38:11 -06:00
Antonio Fernandez
440ffb69db set fax failed when missing (#7077) 2024-07-30 16:31:11 -06:00
FusionPBX
475696ecff Check for valid fax numbers
Validate the fax destination number
- Check outbound routes
- Check valid extension
- Set the status to failed for all other numbers
2024-05-14 12:49:13 -06:00
FusionPBX
f30180d2b7 Bug fix send fax to a local extension 2024-05-03 13:13:51 -06:00
FusionPBX
ebcd78ed4f Fix fax from address when sending an outbound fax 2024-02-23 15:42:38 -07:00
FusionPBX
192e651722 Remove the single quote
Escape with a back slash didn't work
2024-02-05 17:22:42 -07:00
FusionPBX
1f5b979d0d Add escape_quote quoted values 2024-02-05 17:10:20 -07:00
FusionPBX
f63524a164 If exists use category fax from and from name 2024-01-05 17:24:08 -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
FusionPBX
c19899097d Send FAX when gateway fails try the next one 2023-09-28 12:41:12 -06:00
fusionate
d9d17a6917 Misc: Remove parameters from event_socket_create() calls. 2023-09-20 18:43:17 +00:00
FusionPBX
f1890976b2 Use settings class for the fax queue 2023-09-14 22:15:37 -06:00
frytimo
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
FusionPBX
a4ad93632d FAX status busy increment count
It turns out most of the busies are a bad number. So we need to increment the value and eventually stop retrying.
2023-05-30 09:33:24 -06:00
FusionPBX
3b53247dee Use !isset instead of empty
Reason for this change is empty treats 0 as null.
2023-05-19 16:10:38 -06:00
FusionPBX
b8d03a0384 Add absolute_codec_string PCMU,PCMA 2023-05-15 12:11:40 -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
FusionPBX
4d3f2e1e0b Add a shutdown function fax send 2023-04-14 12:24:24 -06:00
FusionPBX
d662a641e6 Add fax_status sending
While in sending mode it will not send again. The fax hangup hook will update the status to trying again if the fax fails or is set to failed if it reaches max tries.
2023-04-11 14:01:54 -06:00
Luis Daniel Lucio Quiroz
3a8dfca16d SQL query missing toll_allow (#6604)
The SQL query is missing the toll-allow setting from the virtual fax extension. All dialplans that have that condition will fail.
This patch makes sure the variable is present if need it.
2023-04-03 19:14:26 -06:00
FusionPBX
9c73670845 Move the fax_queue update before originate
Reason for the change is to make sure the api_hangup_hook lua script update of the email queue doesn't conflict.
2023-02-09 12:40:42 -07:00
FusionPBX
3b2e92a67d Use $_SERVER['DOCUMENT_ROOT'] 2023-01-13 14:24:33 -07:00
markjcrane
d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX
de21143246 Reduce size of fax originate command.
Originate command is limited to around 1130 characters. So this work was to reduce the size. Single quotes aren't needed on everything as this is not a command line. Its an even socket command. Also moving fax_variables into the fax options prevents variable duplicates.
2022-09-16 17:02:16 -06:00
emak
e52f6626f9 Fix fax_queue to Email PDF Instead of TIF (#6461)
* Fix fax_queue to Email PDF Instead of TIF

Variables `$fax_file_tif` and `$fax_file_pdf` are missing a period before the extension so file_exists is always evaluating to false. Thus, TIF was always sent. Adds the period back into the path so the check works correctly.

NOTE: `$fax_file_tif` is completely unused and can be removed from this code for cleanup.

* Use single quotes.
2022-08-22 10:10:31 -06:00
emak
26b3e7893b Add Fax Queue TX Email Variables (#6460)
* Add db field to v_fax_queue to link to fax log

* Add fax_duration field to v_fax_logs

Add fax duration to db to allow for logging of this data for fax email templates.

* Add new email variables to fax send

* Fix some logging variables and fax_log_uuid

Added back some missing session variables for the fax log.

Also update the email queue db field with the fax_log_uuid to allow us to add variables to the fax email templates later.

* Update hangup_tx.lua
2022-08-19 18:08:43 -06:00
FusionPBX
be841cd17a Update fax_send.php 2022-06-28 11:06:19 -06:00
M. Skenderian
b3fc6e6857 removed duplicate code (#6410)
Co-authored-by: mskenderian <michael@wireprosolutions.com>
2022-06-16 10:04:28 -06:00
FusionPBX
f214547359 First attempt use the fax variables from settings
Also set fax_retry_attempts, and fax_retry_limit.
2022-06-14 23:09:54 -06:00