From e13582eb2846b291dea9b0e5a36529ee1ff36d20 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 18 Jun 2015 20:08:54 +0000 Subject: [PATCH] Fix call center xml handler domain. --- .../scripts/configuration/callcenter.conf.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua index 3af1605922..3e7c29920d 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua @@ -149,13 +149,16 @@ --get the agents table.insert(xml, [[ ]]); - sql = "select * from v_call_center_agents "; + sql = "select * from v_call_center_agents as a, v_domains as d "; + sql = sql .. "where d.domain_uuid = a.domain_uuid; "; if (debug["sql"]) then freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n"); end x = 0; dbh:query(sql, function(row) --get the values from the database and set as variables + domain_uuid = row.domain_uuid; + domain_name = row.domain_name; agent_name = row.agent_name; agent_type = row.agent_type; agent_call_timeout = row.agent_call_timeout; @@ -239,13 +242,16 @@ table.insert(xml, [[ ]]); --get the tiers - sql = "select * from v_call_center_tiers "; + sql = "select * from v_call_center_tiers as t, v_domains as d "; + sql = sql .. "where d.domain_uuid = t.domain_uuid; "; if (debug["sql"]) then freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n"); end table.insert(xml, [[ ]]); dbh:query(sql, function(row) --get the values from the database and set as variables + domain_uuid = row.domain_uuid; + domain_name = row.domain_name; agent_name = row.agent_name; queue_name = row.queue_name; tier_level = row.tier_level;