Update index.lua
This commit is contained in:
parent
8d95457276
commit
9199ccc07c
|
|
@ -204,9 +204,17 @@
|
||||||
password_min_length = settings['voicemail']['password_min_length']['numeric'];
|
password_min_length = settings['voicemail']['password_min_length']['numeric'];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
not_found_message = 'false';
|
||||||
|
if (settings['voicemail']['not_found_message'] ~= nil) then
|
||||||
|
if (settings['voicemail']['not_found_message']['text'] ~= nil) then
|
||||||
|
not_found_message = settings['voicemail']['not_found_message']['text'];
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if settings['voicemail'] then
|
end
|
||||||
|
|
||||||
|
if (settings['voicemail']) then
|
||||||
if settings['voicemail']['voicemail_to_sms'] then
|
if settings['voicemail']['voicemail_to_sms'] then
|
||||||
voicemail_to_sms = (settings['voicemail']['voicemail_to_sms']['boolean'] == 'true');
|
voicemail_to_sms = (settings['voicemail']['voicemail_to_sms']['boolean'] == 'true');
|
||||||
end
|
end
|
||||||
|
|
@ -258,7 +266,7 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
--valid voicemail
|
--valid voicemail
|
||||||
if (voicemail_uuid ~= nil) then
|
if (voicemail_uuid ~= nil and string.len(voicemail_uuid) > 0) then
|
||||||
--answer the session
|
--answer the session
|
||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
session:answer();
|
session:answer();
|
||||||
|
|
@ -591,7 +599,9 @@
|
||||||
referred_by = referred_by:match('[%d]+');
|
referred_by = referred_by:match('[%d]+');
|
||||||
session:transfer(referred_by, "XML", context);
|
session:transfer(referred_by, "XML", context);
|
||||||
else
|
else
|
||||||
|
if (not_found_message == "true") then
|
||||||
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-no_answer_no_vm.wav");
|
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-no_answer_no_vm.wav");
|
||||||
|
end
|
||||||
session:hangup("NO_ANSWER");
|
session:hangup("NO_ANSWER");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue