Voicemail message playback press 4 for rewind and 6 for fast forward.

This commit is contained in:
Mark Crane 2013-07-10 22:59:17 +00:00
parent cc3ea9b087
commit 2c3f51fdcf
3 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,7 @@
max_tries = 3;
max_timeouts = 3;
digit_timeout = 3000;
stream_seek = false;
--direct dial
direct_dial = {}

View File

@ -56,7 +56,9 @@
--play the message
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then
stream_seek = true;
session:streamFile(voicemail_dir.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext);
stream_seek = false;
session:streamFile("silence_stream://1000");
end
end

View File

@ -34,6 +34,16 @@
if (debug["info"]) then
freeswitch.console_log("info", "[voicemail] dtmf digits: " .. dtmf_digits .. ", length: ".. string.len(dtmf_digits) .." max_digits: " .. max_digits .. "\n");
end
if (stream_seek == true) then
if (dtmf_digits == "4") then
dtmf_digits = "";
return("seek:-12000");
end
if (dtmf_digits == "6") then
dtmf_digits = "";
return("seek:12000");
end
end
if (string.len(dtmf_digits) >= max_digits) then
if (debug["info"]) then
freeswitch.console_log("info", "[voicemail] max_digits reached\n");