Add the voicemail_greeting_number variable to set the greeting_id. Adjust skip_instructions so that it used.
This commit is contained in:
parent
081ecb1f8a
commit
bf8d154914
|
|
@ -82,6 +82,7 @@
|
||||||
destination_number = session:getVariable("destination_number");
|
destination_number = session:getVariable("destination_number");
|
||||||
caller_id_name = session:getVariable("caller_id_name");
|
caller_id_name = session:getVariable("caller_id_name");
|
||||||
caller_id_number = session:getVariable("caller_id_number");
|
caller_id_number = session:getVariable("caller_id_number");
|
||||||
|
voicemail_greeting_number = session:getVariable("voicemail_greeting_number");
|
||||||
skip_instructions = session:getVariable("skip_instructions");
|
skip_instructions = session:getVariable("skip_instructions");
|
||||||
skip_greeting = session:getVariable("skip_greeting");
|
skip_greeting = session:getVariable("skip_greeting");
|
||||||
vm_message_ext = session:getVariable("vm_message_ext");
|
vm_message_ext = session:getVariable("vm_message_ext");
|
||||||
|
|
|
||||||
|
|
@ -30,15 +30,23 @@
|
||||||
--skip the greeting
|
--skip the greeting
|
||||||
else
|
else
|
||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
dtmf_digits = '';
|
--set the greeting based on the voicemail_greeting_number variable
|
||||||
if (string.len(greeting_id) > 0) then
|
if (voicemail_greeting_number ~= nil) then
|
||||||
--play the custom greeting
|
if (string.len(voicemail_greeting_number) > 0) then
|
||||||
session:streamFile(voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
|
greeting_id = voicemail_greeting_number;
|
||||||
session:streamFile("silence_stream://200");
|
end
|
||||||
else
|
end
|
||||||
--play the default greeting
|
|
||||||
dtmf_digits = macro(session, "person_not_available_record_message", 1, 200);
|
--play the greeting
|
||||||
end
|
dtmf_digits = '';
|
||||||
|
if (string.len(greeting_id) > 0) then
|
||||||
|
--custom greeting
|
||||||
|
session:streamFile(voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
|
||||||
|
session:streamFile("silence_stream://200");
|
||||||
|
else
|
||||||
|
--default greeting
|
||||||
|
dtmf_digits = macro(session, "person_not_available_record_message", 1, 200);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
function record_message()
|
function record_message()
|
||||||
|
|
||||||
--record your message at the tone press any key or stop talking to end the recording
|
--record your message at the tone press any key or stop talking to end the recording
|
||||||
if (skip_greeting == "true") then
|
if (skip_instructions == "true") then
|
||||||
--skip the greeting
|
--skip the instructions
|
||||||
else
|
else
|
||||||
if (string.len(dtmf_digits) == 0) then
|
if (string.len(dtmf_digits) == 0) then
|
||||||
dtmf_digits = macro(session, "record_message", 1, 100);
|
dtmf_digits = macro(session, "record_message", 1, 100);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue