Update route_to_bridge.lua
This commit is contained in:
parent
b40c1305bb
commit
4bd7e18e79
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue