Commit Graph

325 Commits

Author SHA1 Message Date
FusionPBX 1f680c90de Allow sending text based email templates 2026-05-22 20:22:54 +00:00
teknoprep ed9ba8a21a Add Alternate Voicemail Location to voicemail box settings (#7932)
Adds a per-voicemail-box option that diverts the caller to an arbitrary
dialable destination instead of leaving a message. Useful for handing
voicemail off to an external service (e.g. Microsoft Teams, a paging
group, an answering service) while keeping the caller's original
Caller-ID intact for downstream logging.

The setting lives on the voicemail box (v_voicemails) — not on the
extension's follow-me/forwarding settings — so it only fires when a call
actually reaches voicemail.lua. It does not interact with the existing
"No Answer" forward on the call-forward page, nor with call-center,
ring-group, or FIFO no-answer handling: those mechanisms route the call
elsewhere before voicemail.lua ever runs, so the divert never triggers
on those paths in the first place.

Schema (v_voicemails, registered in app/voicemails/app_config.php so
upgrades pick it up automatically):

* alternate_voicemail_enabled       boolean
* alternate_voicemail_destination   text  (any dialable string —
                                            extension number, external
                                            number, etc.)

UI is added to the voicemail edit screen
(app/voicemails/voicemail_edit.php) directly under "Mail To", mirroring
the toggle + destination input pattern used on the call-forward page.
Sanitisation matches the existing forward_*_destination fields
([^\*0-9] stripped).

Voicemail behaviour change is in
app/switch/resources/scripts/app/voicemail/index.lua: when a caller hits
a valid voicemail box and the box has the alternate voicemail location
enabled, the script transfers the call via session:transfer(destination,
"XML", context) BEFORE the greeting plays. session:transfer preserves
channel variables so the original Caller-ID is carried into the diverted
leg.

Override semantics — when enabled, the alternate location always wins.
The voicemail menu (voicemail_action == "check") path is unaffected, so
extension owners can still log in and review their existing messages.

Group-call safety net: the divert is intentionally skipped when the leg
is part of a call-center, ring-group, or FIFO bridge (detected via the
cc_side, cc_queue, dialed_extension, ring_group_uuid, or fifo_role
channel variables). In normal use these paths shouldn't reach the
voicemail Lua at all — the queue / group manages its own no-answer
behaviour upstream — but if one does land here for any reason, we don't
want a session:transfer to yank the leg out of the queue's control and
hijack the call to the alternate destination.
2026-05-19 19:13:26 +00:00
Antonio Fernandez 04a9893130 Added Wait Announcements to Ring Groups (#7919) 2026-04-27 15:06:57 +00:00
FusionPBX eb9a6f9180 Fix fax status logic check busy first followed by fax_success
This change reorders the status determination logic to check for 
busy conditions first, ensuring successful transmissions are 
correctly marked as 'sent' and trigger the proper success email.
2026-04-22 17:00:23 +00:00
FusionPBX 4467a0761f Add default empty string as a default values
Updated variable assignments to provide default empty string values if session variables are nil.
2026-04-21 12:06:40 -06:00
jonathanblack1000 431949bb67 Update to allow voicemail links in SMS (#7888)
Add voicemail_uuid and message_uuid replacements to enable building links for SMS notifications.
2026-04-17 22:41:16 +00:00
Alex 474ab00b75 Fix: Add CALL_REJECTED to originate dispositions (#7834) 2026-04-08 10:24:13 -06:00
FusionPBX 1a915bb21c Fix the gsub for to limit to allowed characters 2026-03-31 12:31:58 -06:00
FusionPBX 7831e7c10e Security update
- There are safer ways to do this
2026-03-23 12:34:33 +00:00
FusionPBX 26e803d76c Security using shell_esc for file cache flush command 2026-03-22 16:11:37 +00:00
FusionPBX faab18936e Security add shell_esc to the sox command 2026-03-22 15:38:37 +00:00
FusionPBX 8920222cb7 Security voicemail listen_to_recording add shell_esc 2026-03-22 15:27:13 +00:00
FusionPBX 3e2f60bc7e Update shell_esc remove local 2026-03-22 15:23:15 +00:00
FusionPBX 198edb9d41 Update shell_esc.lua 2026-03-22 14:54:46 +00:00
FusionPBX 92ea4dc8db Add sanitize for the lua copy function 2026-03-22 03:34:26 +00:00
FusionPBX 0a63841e5a Update conference center lua
- prevent a minor error
- add shell_esc
2026-03-22 03:32:08 +00:00
FusionPBX e5314b254f Include the shell_esc function 2026-03-22 03:29:32 +00:00
FusionPBX 07926f6b06 Security add a shell arg escape function 2026-03-21 23:59:20 +00:00
FusionPBX bd906cd8c6 Add double quotes and metacharacter to escape shell arguments 2026-03-21 23:48:20 +00:00
FusionPBX a72bd5c708 Fix call center queue sound_prefix 2026-03-21 01:31:09 +00:00
FusionPBX a2c057dc31 Fix email transcribe when sending an email download or listen link 2026-03-20 16:59:33 +00:00
FusionPBX 8c1df99ffc Fix to add domain_uuid, domain_name to the bridge 2026-03-12 18:51:33 +00:00
FusionPBX 075c5a4fa0 Remove the hostname prefix from the directory cache key 2026-03-04 11:50:49 -07:00
FusionPBX 34c6330f41 If not set then set the record_ext to wav 2026-03-03 09:15:11 -07:00
FusionPBX ca9ea51104 Fix voicemail remote_access 2026-02-16 12:36:13 -07:00
FusionPBX 8aa8d5caff Fix intermittent call recording by removing api_on_answer 2026-02-12 12:10:19 -07:00
Antonio Fernandez 141a350a96 Change Fanvil event header for check_sync command (#7740)
Fanvils don't provision from the web gui without this change.
2026-02-09 13:18:18 -07:00
FusionPBX 06927a14a0 Add record_stereo=true to the ring group lua script 2026-02-04 12:28:32 -07:00
markjcrane f294d7c836 Remove the widget background and detail color default value 2026-01-27 18:55:03 -07:00
FusionPBX 6c2c215cf8 Add instant_ringback to the bridge statement 2026-01-15 18:29:18 -07:00
FusionPBX 6d8618cb2f Add sip_h_caller_destination to the dial_string if it has a value 2025-12-15 12:17:43 -07:00
FusionPBX 46bc156dc4 Predefine the subject and body variables 2025-12-15 10:45:28 -07:00
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
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
FusionPBX 9a1e624af0 Fix condition for voicemail_transcription_enabled 2025-12-05 15:00:45 -07:00
FusionPBX 5996544050 Fix the call center dsn variable: dsn_callcenter 2025-12-02 11:09:18 -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
frytimo adfc4cc469 Create more documentation (#7627)
* Documentation, format class, no modification.
2025-11-18 18:33:07 -07:00
Alex 4c45329df0 Update links to use new active calls (#7611)
* Update links to use new active calls

* Update call_broadcast_send.php

* Update system_status.php
2025-11-13 09:52:13 -07:00
FusionPBX bcc7bf9dc2 Add bind_digit_action for follow me 2025-11-07 21:06:53 -07:00
markjcrane 7286d4b58d Update permission_exists for multiple permissions 2025-11-06 08:20:46 -07:00
markjcrane de74db14ee Add support for Poly check-sync 2025-11-05 17:24:19 -07:00
markjcrane b0eabca1f6 Update check permisisons 2025-11-02 00:22:57 -06:00
markjcrane 2ba40da0d4 Update the emergency_calls SQL Query 2025-10-31 21:40:02 -06:00
markjcrane 1d7ec1b020 Add dialplan emergency_calls
Adds a feature dial *911 to check recent emergency calls
2025-10-31 21:08:37 -06:00
FusionPBX cf81cca8d1 Update boolean handling 2025-10-30 20:09:49 -06:00
FusionPBX 11eb62a50d Add missing call_center_agent_uuid required field 2025-10-30 14:56:44 -06:00
FusionPBX 39502959b2 Fix the call center agent_record boolean
Cast the agent_record in Lua. To a string then used agent_record == 'true'
2025-10-30 14:33:47 -06:00
FusionPBX da2264aca0 Fix voicemail using tonumber on message_silence_seconds 2025-10-28 11:11:29 -06:00
Harry Foster 6530340765 Update the message length checker to match the silence seconds, otherwise silent voicemails are emailed or put into the voicemail box and cannot be played properly 2025-10-21 17:29:13 +01:00