diff --git a/resources/switch.php b/resources/switch.php index f4ca7fa1bf..f8ddc8f87a 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -1975,7 +1975,7 @@ function outbound_route_to_bridge ($domain_uuid, $destination_number) { } $sql = "select * from v_dialplans "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; $sql .= "and app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' "; $sql .= "and dialplan_enabled = 'true' "; $sql .= "order by dialplan_order asc "; @@ -1993,7 +1993,7 @@ function outbound_route_to_bridge ($domain_uuid, $destination_number) { //get the extension number using the dialplan_uuid $sql = "select * "; $sql .= "from v_dialplan_details "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; $sql .= "and dialplan_uuid = '$dialplan_uuid' "; $sql .= "order by dialplan_detail_order asc "; $sub_result = $db->query($sql)->fetchAll(PDO::FETCH_ASSOC);