diff --git a/app/extensions/extension_dashboard.php b/app/extensions/extension_dashboard.php index 67b761d79c..73a694e00f 100644 --- a/app/extensions/extension_dashboard.php +++ b/app/extensions/extension_dashboard.php @@ -126,8 +126,8 @@ $extensions = $_SESSION['user']['extension']; //get the destinations - $sql = "select * from v_destinations "; - $sql .= "where domain_uuid = '".check_str($domain_uuid)."' "; + $sql = "select destination_caller_id_name, destination_caller_id_number from v_destinations "; + $sql .= "where domain_uuid = '".check_str($_SESSION['domain_uuid'])."' "; $sql .= "and destination_type = 'inbound' "; $sql .= "order by destination_number asc "; $prep_statement = $db->prepare(check_sql($sql)); @@ -197,12 +197,12 @@ echo " \n"; echo " \n"; foreach ($destinations as &$row) { - if(strlen($tmp) > 0){ - if ($outbound_caller_id_number == $row['outbound_caller_id_number']) { - echo " \n"; + if(strlen($row['destination_caller_id_number']) > 0){ + if ($outbound_caller_id_number == $row['destination_caller_id_number']) { + echo " \n"; } else { - echo " \n"; + echo " \n"; } } }