Call Center Queue name change from uuid@domain to extension@domain

This commit is contained in:
markjcrane
2021-04-27 22:42:09 -06:00
parent 356fd56af1
commit a6e59c3522
5 changed files with 139 additions and 39 deletions

View File

@@ -1,6 +1,6 @@
-- xml_handler.lua
-- Part of FusionPBX
-- Copyright (C) 2015-2020 Mark J Crane <markjcrane@fusionpbx.com>
-- Copyright (C) 2015-2021 Mark J Crane <markjcrane@fusionpbx.com>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -101,7 +101,7 @@
queue_name = queue_name:gsub(" ", "-");
--start the xml
table.insert(xml, [[ <queue name="]]..queue_uuid..[[@]]..domain_name..[[" label="]]..queue_name..[[@]]..domain_name..[[">]]);
table.insert(xml, [[ <queue name="]]..queue_extension..[[@]]..domain_name..[[" label="]]..queue_name..[[@]]..domain_name..[[">]]);
table.insert(xml, [[ <param name="strategy" value="]]..queue_strategy..[["/>]]);
--set ringback
queue_ringback = format_ringback(queue_moh_sound);
@@ -255,8 +255,10 @@
table.insert(xml, [[ </agents>]]);
--get the tiers
sql = "select * from v_call_center_tiers as t, v_domains as d ";
sql = sql .. "where d.domain_uuid = t.domain_uuid; ";
sql = "select t.domain_uuid, d.domain_name, t.call_center_agent_uuid, t.call_center_queue_uuid, q.queue_extension, t.tier_level, t.tier_position ";
sql = sql .. "from v_call_center_tiers as t, v_domains as d, v_call_center_queues as q ";
sql = sql .. "where d.domain_uuid = t.domain_uuid ";
sql = sql .. "and t.call_center_queue_uuid = q.call_center_queue_uuid; ";
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");
end
@@ -267,12 +269,13 @@
domain_name = row.domain_name;
agent_uuid = row.call_center_agent_uuid;
queue_uuid = row.call_center_queue_uuid;
queue_extension = row.queue_extension;
tier_level = row.tier_level;
tier_position = row.tier_position;
--build the xml
table.insert(xml, [[ <tier ]]);
table.insert(xml, [[ agent="]]..agent_uuid..[[" ]]);
table.insert(xml, [[ queue="]]..queue_uuid..[[@]]..domain_name..[[" ]]);
table.insert(xml, [[ queue="]]..queue_extension..[[@]]..domain_name..[[" ]]);
table.insert(xml, [[ domain_name="]]..domain_name..[[" ]]);
--table.insert(xml, [[ agent_name="]]..agent_name..[[" ]]);
--table.insert(xml, [[ queue_name="]]..queue_name..[[" ]]);