Add global outbound route compatibility for ring groups external destinations

This commit is contained in:
Mark Crane 2014-07-13 04:12:04 +00:00
parent aca28e7efb
commit 7df0bd628d
1 changed files with 8 additions and 10 deletions

View File

@ -28,7 +28,6 @@
-- Mark J Crane <markjcrane@fusionpbx.com>
-- Luis Daniel Lucio Qurioz <dlucio@okay.com.mx>
--connect to the database
dofile(scripts_dir.."/resources/functions/database_handle.lua");
dbh = database_handle('system');
@ -110,7 +109,7 @@
and d.ring_group_uuid = ']]..ring_group_uuid..[['
and r.ring_group_enabled = 'true'
order by d.destination_delay, d.destination_number asc ]]
freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
destinations = {};
x = 1;
assert(dbh:query(sql, function(row)
@ -142,7 +141,7 @@ freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
--get the dialplan data and save it to a table
if (external) then
sql = [[select * from v_dialplans as d, v_dialplan_details as s
where d.domain_uuid = ']] .. domain_uuid .. [['
where (d.domain_uuid = ']] .. domain_uuid .. [[' or d.domain_uuid is null)
and d.app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3'
and d.dialplan_enabled = 'true'
and d.dialplan_uuid = s.dialplan_uuid
@ -413,7 +412,6 @@ freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
end
end
--actions
--ACTIONS = {}
--table.insert(ACTIONS, {"set", "hangup_after_bridge=true"});