Change the gateway name to gateway_uuid in the XML handler.
This commit is contained in:
+2
-10
@@ -101,15 +101,7 @@
|
|||||||
end
|
end
|
||||||
x = 0;
|
x = 0;
|
||||||
dbh:query(sql, function(field)
|
dbh:query(sql, function(field)
|
||||||
--set as variables
|
table.insert(xml, [[ <gateway name="]] .. field.gateway_uuid .. [[">]]);
|
||||||
gateway = field.gateway;
|
|
||||||
gateway = gateway:gsub(" ", "_");
|
|
||||||
|
|
||||||
if (domain_count > 1) then
|
|
||||||
table.insert(xml, [[ <gateway name="]] .. field.domain_name .."-".. gateway .. [[">]]);
|
|
||||||
else
|
|
||||||
table.insert(xml, [[ <gateway name="]] .. gateway .. [[">]]);
|
|
||||||
end
|
|
||||||
|
|
||||||
if (string.len(field.username) > 0) then
|
if (string.len(field.username) > 0) then
|
||||||
table.insert(xml, [[ <param name="username" value="]] .. field.username .. [["/>]]);
|
table.insert(xml, [[ <param name="username" value="]] .. field.username .. [["/>]]);
|
||||||
@@ -254,7 +246,7 @@
|
|||||||
|
|
||||||
--send to the console
|
--send to the console
|
||||||
if (debug["cache"]) then
|
if (debug["cache"]) then
|
||||||
freeswitch.consoleLog("notice", "[xml_handler] configuration:sofia.conf source: database\n");
|
freeswitch.consoleLog("notice", "[xml_handler] configuration:sofia.conf:" .. hostname .." source: database\n");
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
--replace the ' back to a single quote
|
--replace the ' back to a single quote
|
||||||
|
|||||||
Reference in New Issue
Block a user