Commit Graph

62 Commits

Author SHA1 Message Date
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
FusionPBX
0706b52427 Update destinations.php 2025-03-22 12:33:45 -06:00
frytimo
52d8f436e4 Replace session variables with the settings class (#7271) 2025-03-21 20:11:44 -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
8b59ef881b Use the settings array to pass database connection
Improve efficiency by using one database connection
2025-01-18 15:47:56 -07:00
FusionPBX
414c85eef8 Fix a bug where transfer is part of recording name 2024-12-10 13:44:49 -07:00
FusionPBX
cd8d5302ac Fix temporary permissions 2024-11-29 13:57:01 -07:00
FusionPBX
7f527aba07 Fix the sql query 2024-11-15 14:32:45 -07:00
FusionPBX
318953bddf Fix the destination summary when server using UTC
Set the PHP time zone to fix the destination summary report. Without the time zone set it would use the server operating system time zone.  If the time zone is set to UTC when it rolled over to a new date ahead of the local time zone it would make the report show 0 results.
2024-11-08 17:44:09 -07: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
fusionate
5c73ea7bbb Destination Summary: Mitigate PHP 8.x warnings, fix search criteria on CSV export. 2024-05-13 12:17:14 -06:00
fusionate
fc90314009 Destination Summary: Mitigate PHP 8.x warnings. 2024-05-13 11:46:51 -06:00
FusionPBX
92f5f4abe4 Update destinations.php 2024-04-02 09:43:16 -06:00
frytimo
6bd159a717 settings was being set in constructor but property was missing (#6931) 2024-03-28 22:13:01 -06:00
FusionPBX
2171a5f11a Use the name to find the Select Option Group translation. 2024-03-27 09:11:43 -06:00
FusionPBX
717ee2d8fc Update destinations.php
- Use the database object more efficiently
- Access the get method with this->get
- Bypass cached destinations to avoid problems
2024-02-21 11:23:58 -07:00
FusionPBX
776334844b Destination Summary update Total Calls
Purpose of  total calls is count calls to the destination number. This means calls from the server to the call center agent should be excluded.
2024-01-09 00:22:53 -07:00
FusionPBX
d0c3c93859 Destination summary unique callers
Use caller id number instead of name
2024-01-04 13:54:03 -07:00
FusionPBX
fff13633be Add a new destination summary report 2024-01-02 18:54:22 -07:00
fusionate
518c32efe6 Misc: Mitigate PHP 8.1 warnings. 2023-09-20 20:49:27 +00:00
fusionate
044b91ec6c Destination - Edit: Mitigate PHP 8.1 warnings. 2023-09-20 19:13:33 +00:00
fusionate
6411f50750 Destination Select: Set minimum width on second select box. 2023-09-08 22:05:19 +00:00
FusionPBX
c285a104f0 Fixed dynamic destinations when switching domains 2023-09-01 10:57:55 -06:00
fusionate
d0481896ba Destinations [Class]: Updates for PHP 8.1 2023-05-22 23:05:44 +00:00
markjcrane
10a4ceae65 Default destination type to inbound. Use is_array where it is required 2023-05-17 16:03:36 -06:00
markjcrane
2afda399e6 IVR Menu code changes for PHP 8.1 2023-05-16 22:55:19 -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
FusionPBX
bfa5492e21 Allow an empty destination so that values can be nulled. 2022-05-03 09:46:26 -06:00
FusionPBX
15977eff35 Removed this as it prevents adding to the array by resetting the value back to 0. 2022-02-04 11:39:49 -07:00
FusionPBX
68238e9ce4 Account for destination_prefix larger than one character.
Also account for trunk prefix when not using the area code.
2021-12-08 13:49:15 -07:00
FusionPBX
4b1ab310b7 Remove the login.php code as it breaks the destinations and not needed for this.
Retract changes from this pull request. Its not constantly refreshing and so this login check is not needed for this feature.
https://github.com/fusionpbx/fusionpbx/pull/5951
2021-06-10 22:51:29 -06:00
mhoogveld
bcf2366dbd Redirect to login page when auto-refreshing a (part of a) page while being logged out (#5951) 2021-05-28 22:45:11 -06:00
Andrew Querol
228b3d0b31 Fix typo with destination ID for the new destination buttons 2021-03-23 00:42:33 -05:00
Andrew Querol
4075a12a74 Do not use the null coalescing operator to retain pre PHP 7 support. 2021-03-23 00:07:35 -05:00
Andrew Querol
ee30b59909 Switch to window.open to '_blank' to prevent accidental navigation that looses changes. 2021-03-22 23:44:33 -05:00
Andrew Querol
59dbcd02a7 Check if there is an ID before redirecting 2021-03-22 23:37:11 -05:00
Andrew Querol
f1fbbad7ab Recordings are stored in 'uuid' not 'recording_uuid' 2021-03-22 23:25:12 -05:00
Andrew Querol
152955625c Initial attempt at allowing the destination button button
to dynamically change

This sets the UUID as the ID in the options list. The we use the javascript onclick listener to get the id(uuid) of the selected option and open the link to the edit page.
2021-03-22 23:13:39 -05:00
demonspork
ea8aa47029 Add direct link button for dynamic destinations
Added a button that links directly to the currently selected destination's edit page if you have the permission to view or edit it.
2021-03-22 20:59:18 -05:00
fusionate
c13c5182ac Destination Select - Dynamic: Clear session array for Outbound Destinations. 2020-11-30 15:53:44 -07:00
fusionate
c67c8cd4c2 Destination Select - Dynamic: Clear session array on add/toggle/delete of a destination type record. 2020-11-30 14:15:57 -07:00
FusionPBX
6be0a340f2 Improve the destination select list other category. 2020-11-23 09:32:02 -07:00
FusionPBX
6fd52ec721 Add select_mode 2020-11-19 09:54:32 -07:00
FusionPBX
4d183c1ffa Update destinations.php
Fix a PHP warning.
2020-11-11 09:34:42 -07:00
FusionPBX
c13b1426bb Update destinations.php
Prevent a plugin from breaking parts of the project.
2020-11-04 10:46:58 -07:00
FusionPBX
cd3ed425de Update destinations.php
Add to_regex method to the destinations class.
2020-10-10 00:03:04 -06:00
agree
16b34145d6 add extensions to destination class (#5501) 2020-09-29 11:43:48 -06:00
FusionPBX
e591ab9ce2 Change count to is_array to prevent a warning on PHP 7.3. 2020-09-28 11:17:17 -06:00
FusionPBX
61767aac3a Add new destinations get method. 2020-09-23 10:46:28 -06:00