Fix domain_uuid for directory.lua.
This commit is contained in:
@@ -55,8 +55,9 @@
|
|||||||
--give time for the call to be ready
|
--give time for the call to be ready
|
||||||
session:streamFile("silence_stream://1000");
|
session:streamFile("silence_stream://1000");
|
||||||
|
|
||||||
--get the domain name
|
--get the domain info
|
||||||
domain_name = session:getVariable("domain_name");
|
domain_name = session:getVariable("domain_name");
|
||||||
|
domain_uuid = session:getVariable("domain_uuid");
|
||||||
|
|
||||||
--set the sounds path for the language, dialect and voice
|
--set the sounds path for the language, dialect and voice
|
||||||
default_language = session:getVariable("default_language");
|
default_language = session:getVariable("default_language");
|
||||||
@@ -110,15 +111,17 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
--get the domain_uuid
|
--get the domain_uuid
|
||||||
if (domain_name ~= nil) then
|
if (domain_uuid == nil) then
|
||||||
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", "[conference] SQL: " .. sql .. "\n");
|
if (debug["sql"]) then
|
||||||
|
freeswitch.consoleLog("notice", "[conference] SQL: " .. sql .. "\n");
|
||||||
|
end
|
||||||
|
status = dbh:query(sql, function(rows)
|
||||||
|
domain_uuid = string.lower(rows["domain_uuid"]);
|
||||||
|
end);
|
||||||
end
|
end
|
||||||
status = dbh:query(sql, function(rows)
|
|
||||||
domain_uuid = string.lower(rows["domain_uuid"]);
|
|
||||||
end);
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--define explode
|
--define explode
|
||||||
|
|||||||
Reference in New Issue
Block a user