This commit is contained in:
Rudy Weiler 2025-03-31 17:18:04 -04:00 committed by GitHub
commit 170ad65206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 90 additions and 5 deletions

View File

@ -416,6 +416,12 @@
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
<input pattern="^(marked_new)$">
<match>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$1.wav"/>
</match>
</input>
<input pattern="^(marked-urgent)$">
<match>

View File

@ -83,9 +83,11 @@
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="currency/and.wav"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-mark_message_new.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
@ -163,6 +165,21 @@
</input>
</macro>
<macro name="voicemail_forward_menu">
<input pattern="^(1):(2)$">
<match>
<!-- forward to extension -->
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<!-- forward to email -->
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- name recording deleted -->
<macro name="voicemail_record_file_deleted">
<input>

View File

@ -361,6 +361,7 @@
require "app.voicemail.resources.functions.record_message";
require "app.voicemail.resources.functions.record_menu";
require "app.voicemail.resources.functions.forward_add_intro";
require "app.voicemail.resources.functions.forward_menu";
require "app.voicemail.resources.functions.forward_to_extension";
require "app.voicemail.resources.functions.main_menu";
require "app.voicemail.resources.functions.listen_to_recording";

View File

@ -0,0 +1,63 @@
-- Part of FusionPBX
-- Copyright (C) 2013-2024 Mark J Crane <markjcrane@fusionpbx.com>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
--added function name to index.lua file
--changed listen to recording function menu starting at line 273
--forward message menu
function forward_menu(voicemail_id, uuid)
if (session:ready()) then
--clear the dtmf digits variable
dtmf_digits = '';
--flush dtmf digits from the input buffer
session:flushDigits();
--to listen to the recording press 1, to save the recording press 2, to re-record press 3
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then
-- TO DO update playAndGetDigit function
dtmf_digits = session:playAndGetDigits(1, 1, 1, 3000, "#", "phrase:voicemail_forward_menu:1:2", "", "^[1-2]$");
end
end
--process the dtmf
if (session:ready()) then
if (dtmf_digits == "1") then
forward_to_extension(voicemail_id, uuid);
dtmf_digits = '';
elseif (dtmf_digits == "2") then
send_email(voicemail_id, uuid);
dtmf_digits = '';
session:execute("playback", "phrase:voicemail_ack:emailed");
elseif (dtmf_digits == "*") then
timeouts = 0;
return main_menu();
end
end
end
end

View File

@ -280,12 +280,10 @@
message_waiting(voicemail_id_copy, domain_uuid);
end
elseif (dtmf_digits == "8") then
forward_to_extension(voicemail_id, uuid);
dtmf_digits = '';
forward_menu(voicemail_id, uuid);
elseif (dtmf_digits == "9") then
send_email(voicemail_id, uuid);
dtmf_digits = '';
session:execute("playback", "phrase:voicemail_ack:emailed");
session:execute("playback", "phrase:voicemail_ack:marked_new");
elseif (dtmf_digits == "*") then
timeouts = 0;
return main_menu();