From 5adbaa6c5ba565320261d49254ab1386bd71ebe5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 29 May 2017 20:58:23 -0600 Subject: [PATCH] Update dialplans.php --- app/dialplan/dialplans.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/dialplan/dialplans.php b/app/dialplan/dialplans.php index 463d9adc5b..7bd93208fd 100644 --- a/app/dialplan/dialplans.php +++ b/app/dialplan/dialplans.php @@ -133,12 +133,17 @@ $sql .= "where (domain_uuid = '$domain_uuid' or domain_uuid is null) "; if (strlen($app_uuid) == 0) { //hide inbound routes - $sql .= "and app_uuid <> 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4' "; + $sql .= "and (app_uuid <> 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4' or dialplan_context = 'public') "; //hide outbound routes $sql .= "and app_uuid <> '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' "; } else { - $sql .= "and app_uuid = '".$app_uuid."' "; + if ($app_uuid == 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4') { + $sql .= "and (app_uuid = '".$app_uuid."' or dialplan_context = 'public') "; + } + else { + $sql .= "and app_uuid = '".$app_uuid."' "; + } } if (strlen($search) > 0) { $sql .= "and (";