fix the voicemail IVR with custom greeting (#1917)

This commit is contained in:
Chris Black 2016-09-14 14:28:04 -07:00 committed by FusionPBX
parent 829f3d44a0
commit 1a9f7737e9
1 changed files with 9 additions and 2 deletions

View File

@ -27,6 +27,10 @@
--play the greeting
function play_greeting()
timeout = 100;
tries = 1;
max_timeout = 200;
--voicemail prompt
if (skip_greeting == "true") then
--skip the greeting
@ -82,9 +86,12 @@
--os.remove(voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
end
elseif (storage_type == "http_cache") then
session:execute("playback",storage_path.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "", "\\d+", max_timeout);
--session:execute("playback",storage_path.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
else
session:execute("playback",voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "","\\d+", max_timeout);
--session:execute("playback",voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
end
--sleep