Voicemail message playback press 4 for rewind and 6 for fast forward.
This commit is contained in:
parent
cc3ea9b087
commit
2c3f51fdcf
|
|
@ -29,6 +29,7 @@
|
|||
max_tries = 3;
|
||||
max_timeouts = 3;
|
||||
digit_timeout = 3000;
|
||||
stream_seek = false;
|
||||
|
||||
--direct dial
|
||||
direct_dial = {}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue