Fixed a couple of typos and changed the way the DSN is inserted.
This commit is contained in:
parent
4d3e4cb815
commit
2cef65a708
|
|
@ -68,7 +68,7 @@
|
||||||
table.insert(xml, [[ <configuration name="callcenter.conf" description="Call Center">]]);
|
table.insert(xml, [[ <configuration name="callcenter.conf" description="Call Center">]]);
|
||||||
table.insert(xml, [[ <settings>]]);
|
table.insert(xml, [[ <settings>]]);
|
||||||
if (string.len(dsn) > 0) then
|
if (string.len(dsn) > 0) then
|
||||||
table.insert(xml, [[ <param name="odbc-dsn" value="$${dsn}"/>]]);
|
table.insert(xml, [[ <param name="odbc-dsn" value="]]..database["switch"]..[["/>]]);
|
||||||
end
|
end
|
||||||
--table.insert(xml, [[ <param name="dbname" value="/usr/local/freeswitch/db/call_center.db"/>]]);
|
--table.insert(xml, [[ <param name="dbname" value="/usr/local/freeswitch/db/call_center.db"/>]]);
|
||||||
table.insert(xml, [[ </settings>]]);
|
table.insert(xml, [[ </settings>]]);
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
--not found
|
--not found
|
||||||
if (string.find(agent_contact, 'sofia/gateway') == nil) then
|
if (string.find(agent_contact, 'sofia/gateway') == nil) then
|
||||||
--add the call_timeout
|
--add the call_timeout
|
||||||
agent_contact = "{call_timeout="..agent_call_timeout."}"..agent_contact;
|
agent_contact = "{call_timeout="..agent_call_timeout.."}"..agent_contact;
|
||||||
else
|
else
|
||||||
--add the call_timeout and confirm
|
--add the call_timeout and confirm
|
||||||
tmp_pos = string.find(agent_contact, "}");
|
tmp_pos = string.find(agent_contact, "}");
|
||||||
|
|
@ -191,9 +191,9 @@
|
||||||
pos = string.find(agent_contact, "}");
|
pos = string.find(agent_contact, "}");
|
||||||
first = string.sub(agent_contact, 0, pos);
|
first = string.sub(agent_contact, 0, pos);
|
||||||
last = string.sub(agent_contact, pos);
|
last = string.sub(agent_contact, pos);
|
||||||
if (stristr(agent_contact, 'call_timeout') === FALSE) then
|
if (stristr(agent_contact, 'call_timeout') == FALSE) then
|
||||||
--add the call_timeout and confirm
|
--add the call_timeout and confirm
|
||||||
agent_contact = first.','..confirm.',call_timeout='..agent_call_timeout..last;
|
agent_contact = first..','..confirm..',call_timeout='..agent_call_timeout..last;
|
||||||
else
|
else
|
||||||
--add confirm
|
--add confirm
|
||||||
agent_contact = tmp_first..','..confirm..tmp_last;
|
agent_contact = tmp_first..','..confirm..tmp_last;
|
||||||
|
|
@ -249,9 +249,9 @@
|
||||||
|
|
||||||
--close the database connection
|
--close the database connection
|
||||||
dbh:release();
|
dbh:release();
|
||||||
|
freeswitch.consoleLog("notice", "thing is:"..api:execute("eval ${dsn}"));
|
||||||
--set the cache
|
--set the cache
|
||||||
result = trim(api:execute("memcache", "set configuration:callcenter.conf:" .. hostname .." '"..XML_STRING:gsub("'", "'").."' "..expire["callcenter.conf"]));
|
result = trim(api:execute("memcache", "set configuration:callcenter.conf:" .. hostname .." '"..XML_STRING:gsub("'", "'").."' ".."expire['callcenter.conf']"));
|
||||||
|
|
||||||
--send the xml to the console
|
--send the xml to the console
|
||||||
if (debug["xml_string"]) then
|
if (debug["xml_string"]) then
|
||||||
|
|
@ -267,9 +267,10 @@
|
||||||
else
|
else
|
||||||
--replace the ' back to a single quote
|
--replace the ' back to a single quote
|
||||||
XML_STRING = XML_STRING:gsub("'", "'");
|
XML_STRING = XML_STRING:gsub("'", "'");
|
||||||
|
freeswitch.consoleLog("notice", "XML STRING "..XML_STRING.."\n");
|
||||||
--send to the console
|
--send to the console
|
||||||
if (debug["cache"]) then
|
if (debug["cache"]) then
|
||||||
freeswitch.consoleLog("notice", "[xml_handler] configuration:callcenter.conf source: memcache\n");
|
freeswitch.consoleLog("notice", "[xml_handler] configuration:callcenter.conf source: memcache\n");
|
||||||
end
|
end
|
||||||
end --if XML_STRING
|
end --if XML_STRING
|
||||||
|
|
||||||
Loading…
Reference in New Issue