From a7de7f0baa554a402cc2c59b47b9c3590273bd19 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 29 Nov 2017 10:21:21 +0300 Subject: [PATCH] Fix. Use external numbers in ring groups with global outbound routes (#2937) --- .../install/scripts/resources/functions/route_to_bridge.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/install/scripts/resources/functions/route_to_bridge.lua b/resources/install/scripts/resources/functions/route_to_bridge.lua index 66c63b0c5e..c4f1cc016a 100644 --- a/resources/install/scripts/resources/functions/route_to_bridge.lua +++ b/resources/install/scripts/resources/functions/route_to_bridge.lua @@ -575,7 +575,7 @@ local function outbound_route_to_bridge(dbh, domain_uuid, fields, actions) local current_dialplan_uuid, extension dbh:query(select_outbound_dialplan_sql, {domain_uuid=domain_uuid, hostname=hostname}, function(route) - if context and context ~= route.dialplan_context then + if (route.dialplan_context ~= '${domain_name}') and (context and context ~= route.dialplan_context) then -- skip dialplan for wrong contexts return end @@ -659,7 +659,7 @@ local function preload_dialplan(dbh, domain_uuid, fields) local dialplan = {} dbh:query(select_outbound_dialplan_sql, {domain_uuid=domain_uuid, hostname=hostname}, function(route) - if context and context ~= route.dialplan_context then + if (route.dialplan_context ~= '${domain_name}') and (context and context ~= route.dialplan_context) then -- skip dialplan for wrong contexts return end