diff --git a/app/dialplan/resources/classes/dialplan.php b/app/dialplan/resources/classes/dialplan.php index c828cc25b1..92631e73d3 100644 --- a/app/dialplan/resources/classes/dialplan.php +++ b/app/dialplan/resources/classes/dialplan.php @@ -381,7 +381,11 @@ include "root.php"; if (!is_array($_SESSION[$_SESSION['domain_uuid']]['outbound_routes'])) { //get the outbound routes from the database $sql = "select * from v_dialplans as d, v_dialplan_details as s "; - $sql .= "where d.domain_uuid = '".$this->domain_uuid."' "; + $sql .= "where "; + $sql .= "( "; + $sql .= "d.domain_uuid = '".$this->domain_uuid."' "; + $sql .= "or d.domain_uuid is null "; + $sql .= ") "; $sql .= "and d.app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' "; $sql .= "and d.dialplan_enabled = 'true' "; $sql .= "and d.dialplan_uuid = s.dialplan_uuid ";