diff --git a/app/extensions/extension_dashboard.php b/app/extensions/extension_dashboard.php index 73a694e00f..57db96015f 100644 --- a/app/extensions/extension_dashboard.php +++ b/app/extensions/extension_dashboard.php @@ -59,10 +59,14 @@ //build the array on what is allowed. if ($found) { - if (is_numeric($row['outbound_caller_id_number'])) { - $array['extensions'][$x]['extension_uuid'] = $row['extension_uuid']; - $array['extensions'][$x]['outbound_caller_id_name'] = $row['outbound_caller_id_name']; - $array['extensions'][$x]['outbound_caller_id_number'] = $row['outbound_caller_id_number']; + $caller_id = explode('@', $row['outbound_caller_id']); + $outbound_caller_id_name = $caller_id[0]; + $outbound_caller_id_number = $caller_id[1]; + + $array['extensions'][$x]['extension_uuid'] = $row['extension_uuid']; + $array['extensions'][$x]['outbound_caller_id_name'] = $caller_id[0]; + if (is_numeric($outbound_caller_id_number)) { + $array['extensions'][$x]['outbound_caller_id_number'] = $outbound_caller_id_number; } } @@ -164,8 +168,7 @@ if ($x === 0 && $previous_extension_uuid != $row['extension_uuid']) { echo " \n"; echo " ".$text['label-extension']."\n"; - echo " ".$text['label-outbound_caller_id_name']."\n"; - echo " ".$text['label-outbound_caller_id_number']."\n"; + echo " ".$text['label-caller_id']."\n"; echo " \n"; } @@ -194,38 +197,15 @@ echo " \n"; if (permission_exists('outbound_caller_id_select')) { if (count($destinations) > 0) { - echo " \n"; echo " \n"; foreach ($destinations as &$row) { - if(strlen($row['destination_caller_id_name']) > 0){ - if ($outbound_caller_id_name == $row['destination_caller_id_name']) { - echo " \n"; - } - else { - echo " \n"; - } - } - } - echo " \n"; - } - } - else { - echo " \n"; - } - echo " \n"; - - echo " \n"; - if (permission_exists('outbound_caller_id_select')) { - if (count($destinations) > 0) { - echo "