Update callcenter.conf.lua

This commit is contained in:
FusionPBX 2018-03-31 11:13:08 -06:00 committed by GitHub
parent 9fc2589dea
commit aa636c0c74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 9 deletions

View File

@ -76,6 +76,7 @@
x = 0;
dbh:query(sql, function(row)
--set as variables
queue_uuid = row.call_center_queue_uuid;
domain_uuid = row.domain_uuid;
domain_name = row.domain_name;
queue_name = row.queue_name;
@ -100,7 +101,7 @@
queue_name = queue_name:gsub(" ", "-");
--start the xml
table.insert(xml, [[ <queue name="]]..queue_name..[[@]]..domain_name..[[">]]);
table.insert(xml, [[ <queue name="]]..queue_uuid..[[" label="]]..queue_name..[[@]]..domain_name..[[">]]);
table.insert(xml, [[ <param name="strategy" value="]]..queue_strategy..[["/>]]);
--set ringback
queue_ringback = format_ringback(queue_moh_sound);
@ -161,6 +162,7 @@
x = 0;
dbh:query(sql, function(row)
--get the values from the database and set as variables
agent_uuid = row.call_center_agent_uuid;
domain_uuid = row.domain_uuid;
domain_name = row.domain_name;
agent_name = row.agent_name;
@ -222,7 +224,8 @@
--build the xml string
table.insert(xml, [[ <agent ]]);
table.insert(xml, [[ name="]]..agent_name..[[@]]..domain_name..[[" ]]);
table.insert(xml, [[ name="]]..agent_uuid..[[" ]]);
table.insert(xml, [[ label="]]..agent_name..[[@]]..domain_name..[[" ]]);
table.insert(xml, [[ type="]]..agent_type..[[" ]]);
table.insert(xml, [[ contact="]]..agent_contact..[[" ]]);
table.insert(xml, [[ status="]]..agent_status..[[" ]]);
@ -256,17 +259,20 @@
--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;
agent_uuid = row.call_center_agent_uuid;
queue_uuid = row.call_center_queue_uuid;
tier_level = row.tier_level;
tier_position = row.tier_position;
--build the xml
table.insert(xml, [[ <tier ]]);
table.insert(xml, [[ agent="]]..agent_name..[[@]]..domain_name..[[" ]]);
table.insert(xml, [[ queue="]]..queue_name..[[@]]..domain_name..[[" ]]);
table.insert(xml, [[ level="]]..tier_level..[[" ]]);
table.insert(xml, [[ position="]]..tier_position..[[" ]]);
table.insert(xml, [[ />]]);
table.insert(xml, [[ agent="]]..agent_uuid..[[" ]]);
table.insert(xml, [[ queue="]]..queue_uuid..[[" ]]);
table.insert(xml, [[ domain_name="]]..domain_name..[[" ]]);
--table.insert(xml, [[ agent_name="]]..agent_name..[[" ]]);
--table.insert(xml, [[ queue_name="]]..queue_name..[[" ]]);
table.insert(xml, [[ level="]]..tier_level..[[" ]]);
table.insert(xml, [[ position="]]..tier_position..[[" ]]);
table.insert(xml, [[ />]]);
end)
table.insert(xml, [[ </tiers>]]);