Commit Graph

23437 Commits

Author SHA1 Message Date
john doe
b2fc02f4a8 Replace CONCAT with indexable expressions and refactor using CTE (#7647)
Replaced unindexable CONCAT() with COALESCE(col, '') || ... and refactored dialplan lookup into a CTE with UNION to split destination-based and public-context paths.

CONCAT() is marked as STABLE in PostgreSQL and cannot be used in functional indexes, which forced sequential scans during dialplan lookups. To enable future indexing and improve query optimizability, we replace all CONCAT(a, b, c) calls with (COALESCE(a, '') || COALESCE(b, '') || COALESCE(c, '')), which is functionally equivalent for text columns (treating NULLs as empty) and composed only of IMMUTABLE operations.

Additionally, the query was refactored using a CTE with UNION to decompose a complex top-level OR condition into two independent branches:
1. Dialplans linked to matching destinations.
2. Public dialplans with domain_uuid IS NULL.

This structure allows the planner to optimize each path separately, avoid full-table scans, and leverage primary key lookups efficiently - even without additional indexes.

On a production dataset with 3kk records in v_dialplans, this change reduced dialplans query latency from ~1.5s to ~37ms (40.5x faster), with further gains possible via expression indexes.
2025-12-09 09:02:26 -07:00
Takanobu Fuse
1c2f2aaae2 Fixed Linphone Provisioning URL Error for HTTP Authentication. (#7654) 2025-12-09 08:52:02 -07:00
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
markjcrane
df90513f86 Add table_exists condition to prevent an error on new installs 2025-12-08 12:34:15 -07:00
markjcrane
f56c51f6d2 Remove the reference to the empty string for boolean enabled. 2025-12-08 12:14:18 -07:00
FusionPBX
0e7ec5baa2 Change the class method getxml to get_xml
- Count the primary key in the SQL statement. Slightly more efficient.
- Updated $dir to $xml_dir
- Add an extra line feed
- Change spaces to tabs
- Remove the method return
2025-12-08 08:23:12 -07:00
volga629-1
e2ac2b3272 Number translate bug PHP Fatal error: Uncaught Error: Cannot access private property xml (#7656)
* Number translation through exception unable load private property


PHP Fatal error:  Uncaught Error: Cannot access private property

Under class defined 

```
       private $xml;
```

You can't access this properly under private constant

* Fix private property access  under class for import()

PHP Fatal error:  Uncaught Error: Cannot access private property.
2025-12-08 08:09:11 -07:00
volga629-1
807c6e2f46 Fix the vars.xml path by adding a missing forward slash (#7658)
* Vars table v_vars is not propagate table data

Path 

```
$xml_file = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'app/switch/resources/conf/vars.xml';
```

Will expand too 

```
/usr/share/nginx/fusionpbxapp/switch/resources/conf/vars.xml
```

This causes a failure to provision data into v_vars table for installs with a customized path.
2025-12-08 07:50:01 -07:00
frytimo
4c2e84f1bc Fix active calls dashboard widget hover (#7652)
* Fix active calls dashboard widget hover

* Fix PHP warning for widget background color
2025-12-06 08:14:22 -07:00
Bifur1
9046a6ea14 Update Groundwire template (#7653)
* Update Groundwire template

Voicemail number was not properly named and would not provision. & was needed under wsContactsURL to validate the xml. Opening it gave an error stating: 

This page contains the following errors:
error on line 14 at column 119: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.

* Update Groundwire template

Had one too many & under wsContactsUrl line
2025-12-06 08:10:18 -07:00
FusionPBX
9a1e624af0 Fix condition for voicemail_transcription_enabled 2025-12-05 15:00:45 -07:00
fusionate
bb6306a7db Destination [Class]: Add optional placeholder parameter for the select method (default mode only). 2025-12-04 20:43:32 -07:00
FusionPBX
45745d5980 Fix upgrading the default menu using upgrade.php --menu
Commands to update the default menu.
upgrade.php --menu
upgrade.php --m
2025-12-04 08:08:51 -07:00
FusionPBX
7d54568ca3 Update system_information array with apcu_enable and hostname 2025-12-03 18:10:33 -07:00
markjcrane
7126b1c47d Add hostname and use text translations 2025-12-03 11:24:48 -07:00
FusionPBX
8131e91378 Sanitize the phonebook xml 2025-12-02 12:58:40 -07:00
FusionPBX
5996544050 Fix the call center dsn variable: dsn_callcenter 2025-12-02 11:09:18 -07:00
frytimo
746329f130 Fix active calls dashboard widget hover (#7651) 2025-11-29 10:57:50 -07:00
frytimo
ef71932c74 Fix rounding causes negative timer (#7650)
When the floor operation is used it can go below zero causing the value to show as `-1👎-1` instead of 0:0:0 for a start time.
2025-11-28 14:34:41 -07:00
frytimo
fe1cd3d16f Fix live graph to show hover data points (#7649) 2025-11-28 14:34:30 -07:00
Alex
4cf2cea27f Fix undefined array indexes (#7648) 2025-11-26 16:46:23 -07:00
FusionPBX
40b82315c7 Update software version from 5.5.3 to 5.5.4 2025-11-26 07:22:17 -07:00
FusionPBX
ec439999b3 Add call recordings to the transcribe queue 2025-11-26 06:18:56 -07:00
Alex
ccd19e7d65 Set default widget boolean values (#7646) 2025-11-25 17:31:09 -07:00
Alex
48038090fc Check if queue_record_template is empty to fix a PHP warning (#7645) 2025-11-25 14:41:23 -07:00
Alex
124e7c2da8 Extension Summary: Fix include internal search filter (#7644)
* Extension Summary: Fix include internal search filter

* Update xml_cdr_extension_summary.php
2025-11-25 11:53:23 -07:00
markjcrane
e75732c7ab Fix the call center queue record 2025-11-25 10:00:47 -07:00
AdSecIT
92cd333e50 Updated Cisco 8000 series templates for KEM button compatiblity. (#7643)
* Updated Cisco 8000 series templates for KEM button compatibility.

Updated the Cisco 8000 series Key Expansion Module format in the templates to improve editing and provisioning button changes, with the label correctly set to the KEM.

Set max KEM Units to 2 ( Phones Maximum )
2025-11-25 07:49:05 -07:00
Alex
ee240a0822 Update bridge_edit.php (#7642) 2025-11-24 16:48:12 -07:00
Alex
c785656949 Update dialplan_outbound_add.php (#7641) 2025-11-24 16:47:12 -07:00
FusionPBX
460d1f81b8 Update esl to event_socket 2025-11-24 05:42:17 -07:00
frytimo
2951bff6c5 Reuse socket connection to event socket. (#7634)
Reuse the socket connection instead of creating a new connection for each API request.
Add PHPDoc tag "static" for the static methods in event_socket.
2025-11-24 05:30:28 -07:00
AdSecIT
7dc912eeaf Updated 470_valet_park.xml with improved compatibility for CallerID retrieval on call park. (#7640)
On call park retrieval will show original callee CallerID.
2025-11-24 05:15:24 -07:00
Ahron Greenberg (agree)
46f1ba9b2c Remove wrong 'Feature-Event' headers from event (#7635)
On multipart feature events, the feature-event header needs to be `init` only.
2025-11-24 05:11:53 -07:00
fusionate
478e2de8a8 Devices - List: Use boolean in query and labels. 2025-11-22 13:02:14 -07:00
markjcrane
bb1f1d0354 Set the total_ring_groups default value to 0 2025-11-21 17:45:28 -07:00
AdSecIT
cdc7be9476 Auth ID and Auth Realm Set for Provisioning Authentication. (#7636)
Set Auth ID and Auth Realm to assist in authenticating from the FusionPBX provisioning server to the Cisco phones.
2025-11-21 16:48:11 -07:00
Alex
9e9dd2ba71 Fix undefined label (#7639) 2025-11-21 16:46:38 -07:00
Alex
a3539f0859 Update sortable.min.js (#7638) 2025-11-21 16:09:05 -07:00
Alex
21e711dc43 Update chart.min.js (#7637) 2025-11-21 16:08:33 -07:00
markjcrane
c74a345498 Yealink phones replace account.1.sip_server_host on the G, S, and U series phones
Replaced with account.1.sip_server.1.address
2025-11-21 12:59:30 -07:00
markjcrane
ee9336f325 Add Yealink password_use_default.mode 2025-11-21 12:35:24 -07:00
Alex
d2b5fe4839 Check if destination_actions is empty to fix a PHP warning (#7633) 2025-11-19 15:56:10 -07:00
FusionPBX
d6aa15549c Exclude json to jsonb for schema data types 2025-11-19 15:49:10 -07:00
markjcrane
323d318141 Update boolean toggle
- When 2 equals it evaluates null as false and then false is selected.
2025-11-19 15:26:40 -07:00
markjcrane
b79ff030da Systemctl use enable and start
- remove --now for better compatibility
2025-11-19 14:23:41 -07:00
markjcrane
8063ae9ceb Set the schema return type
- Remove deprecated comments
2025-11-19 14:22:27 -07:00
frytimo
f8de76762f Documentation, formatting (#7630)
* Documentation, formatting

* Updated formatting to remove alignment

* Updated spacing in the quoted script
2025-11-19 12:08:12 -07:00
frytimo
34821bed7e Documentation, format class, no modification. (#7629) 2025-11-19 09:48:36 -07:00
markjcrane
0ea256fce8 Upgrade Schema includes Data Types by default
- Change the label to Database Schema
- Update the description to say tables, columns and data types
- upgrade.php --schema
  - Includes data types by default
  - Remove --types from upgrade.php
- command line upgrade --interactive
  - Option 2 schema
  - Includes data types by default
2025-11-18 20:19:04 -07:00