From 13c5d984f2c982042831df4f464759dd9a76cd56 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Sat, 12 Jun 2021 15:42:47 -0400 Subject: [PATCH] [voicemail] Add # option to go to next recording without saving the message (#5973) This useful for shared voicemail boxes and a voicemail is meant for someone else or a person doesn't want yet to mark the voicemail as saved --- .../voicemail/resources/functions/listen_to_recording.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/scripts/resources/scripts/app/voicemail/resources/functions/listen_to_recording.lua b/app/scripts/resources/scripts/app/voicemail/resources/functions/listen_to_recording.lua index 0b0afd52e7..0b6b74fc26 100644 --- a/app/scripts/resources/scripts/app/voicemail/resources/functions/listen_to_recording.lua +++ b/app/scripts/resources/scripts/app/voicemail/resources/functions/listen_to_recording.lua @@ -181,7 +181,7 @@ --post listen options if (session:ready()) then if (string.len(dtmf_digits) == 0) then - dtmf_digits = session:playAndGetDigits(1, 1, max_tries, digit_timeout, "#", "phrase:voicemail_listen_file_options:1:2:5:7:8:9:0", "", "\\d+"); + dtmf_digits = session:playAndGetDigits(1, 1, max_tries, digit_timeout, "", "phrase:voicemail_listen_file_options:1:2:5:7:8:9:0", "", "^[\\d\\*#]$"); end end --wait for more digits @@ -217,10 +217,12 @@ session:execute("playback", "phrase:voicemail_ack:emailed"); elseif (dtmf_digits == "*") then timeouts = 0; - main_menu(); + return main_menu(); elseif (dtmf_digits == "0") then message_saved(voicemail_id, uuid); session:transfer("0", "XML", context); + elseif (dtmf_digits == "#") then + return; else message_saved(voicemail_id, uuid); session:execute("playback", "phrase:voicemail_ack:saved");