Fix a bug in the new voicemail for single tenant systems where the domain_uuid shows as nil.
This commit is contained in:
@@ -100,18 +100,20 @@
|
|||||||
|
|
||||||
--get the domain_uuid
|
--get the domain_uuid
|
||||||
domain_uuid = session:getVariable("domain_uuid");
|
domain_uuid = session:getVariable("domain_uuid");
|
||||||
if (domain_uuid == nil) then
|
if (domain_count > 1) then
|
||||||
--get the domain_uuid
|
if (domain_uuid == nil) then
|
||||||
if (domain_name ~= nil) then
|
--get the domain_uuid using the domain name required for multi-tenant
|
||||||
sql = "SELECT domain_uuid FROM v_domains ";
|
if (domain_name ~= nil) then
|
||||||
sql = sql .. "WHERE domain_name = '" .. domain_name .. "' ";
|
sql = "SELECT domain_uuid FROM v_domains ";
|
||||||
if (debug["sql"]) then
|
sql = sql .. "WHERE domain_name = '" .. domain_name .. "' ";
|
||||||
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");
|
if (debug["sql"]) then
|
||||||
|
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");
|
||||||
|
end
|
||||||
|
status = dbh:query(sql, function(rows)
|
||||||
|
domain_uuid = rows["domain_uuid"];
|
||||||
|
end);
|
||||||
end
|
end
|
||||||
status = dbh:query(sql, function(rows)
|
end
|
||||||
domain_uuid = rows["domain_uuid"];
|
|
||||||
end);
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
domain_uuid = string.lower(domain_uuid);
|
domain_uuid = string.lower(domain_uuid);
|
||||||
|
|
||||||
@@ -280,7 +282,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
--close the database connection
|
--close the database connection
|
||||||
dbh:release();
|
--dbh:release();
|
||||||
|
|
||||||
--notes
|
--notes
|
||||||
--record the video
|
--record the video
|
||||||
|
|||||||
Reference in New Issue
Block a user