mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 10:43:49 +00:00
Make sure voicemail_id is set before using it
This commit is contained in:
@@ -149,15 +149,6 @@
|
||||
end
|
||||
end
|
||||
|
||||
--get the extension_uuid using the voicemail_id
|
||||
extension_uuid = session:getVariable("extension_uuid");
|
||||
if (extension_uuid == nil and session ~= nil and session:ready()) then
|
||||
extension_uuid = api:execute("user_data", voicemail_id .. "@" .. domain_name .. " attr extension_uuid");
|
||||
if (extension_uuid ~= nil) then
|
||||
session:setVariable("extension_uuid", extension_uuid);
|
||||
end
|
||||
end
|
||||
|
||||
--set the voicemail_dir
|
||||
voicemail_dir = voicemail_dir.."/default/"..domain_name;
|
||||
if (debug["info"]) then
|
||||
@@ -422,6 +413,17 @@
|
||||
check_password(voicemail_id, password_tries);
|
||||
end
|
||||
|
||||
--get the extension_uuid using the voicemail_id
|
||||
if (voicemail_id ~= nil) then
|
||||
extension_uuid = session:getVariable("extension_uuid");
|
||||
if (extension_uuid == nil and session ~= nil and session:ready()) then
|
||||
extension_uuid = api:execute("user_data", voicemail_id .. "@" .. domain_name .. " attr extension_uuid");
|
||||
if (extension_uuid ~= nil) then
|
||||
session:setVariable("extension_uuid", extension_uuid);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--send to the main menu
|
||||
timeouts = 0;
|
||||
if (voicemail_tutorial == "true") then
|
||||
|
||||
Reference in New Issue
Block a user