Update index.lua

Prevent an error by moving the voicemail quota into the if statement that checks if the voicemail_uuid is not null.
This commit is contained in:
FusionPBX 2017-01-27 12:18:01 -07:00 committed by GitHub
parent a3be20aa1f
commit be0ffa16e5
1 changed files with 23 additions and 23 deletions

View File

@ -37,8 +37,8 @@
direct_dial["max_digits"] = 4;
--debug
debug["info"] = true;
debug["sql"] = true;
debug["info"] = false;
debug["sql"] = false;
--get the argv values
script_name = argv[1];
@ -320,6 +320,9 @@
--leave a message
if (voicemail_action == "save") then
--valid voicemail
if (voicemail_uuid ~= nil) then
--check the voicemail quota
if (vm_disk_quota) then
--get voicemail message seconds
@ -341,9 +344,6 @@
end
end
--valid voicemail
if (voicemail_uuid ~= nil) then
--play the greeting
timeouts = 0;
play_greeting();