mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-21 18:36:31 +00:00
Update route_to_bridge.lua
This commit is contained in:
@@ -573,6 +573,12 @@ local function outbound_route_to_bridge(dbh, domain_uuid, fields, actions)
|
||||
local context = fields.context
|
||||
if context == '' then context = nil end
|
||||
|
||||
--connect to the database
|
||||
if (dbh == nil) then
|
||||
local Database = require "resources.functions.database";
|
||||
dbh = Database.new('system');
|
||||
end
|
||||
|
||||
local current_dialplan_uuid, extension
|
||||
dbh:query(select_outbound_dialplan_sql, {domain_uuid=domain_uuid, hostname=hostname}, function(route)
|
||||
if (route.dialplan_context ~= '${domain_name}') and (context and context ~= route.dialplan_context) then
|
||||
|
||||
Reference in New Issue
Block a user