diff --git a/app/contacts/contact_phones.php b/app/contacts/contact_phones.php index d754c53fcf..f4136e8037 100644 --- a/app/contacts/contact_phones.php +++ b/app/contacts/contact_phones.php @@ -40,6 +40,21 @@ require_once "includes/paging.php"; $order_by = $_GET["order_by"]; $order = $_GET["order"]; +//javascript function: send_cmd + echo "\n"; + //show the content //echo "
"; //echo "\n"; @@ -60,7 +75,7 @@ require_once "includes/paging.php"; echo "
\n"; //prepare to page the results - $sql = " select count(*) as num_rows from v_contact_phones "; + $sql = "select count(*) as num_rows from v_contact_phones "; $sql .= " where domain_uuid = '$domain_uuid' "; $sql .= " and contact_uuid = '$contact_uuid' "; if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } @@ -85,7 +100,7 @@ require_once "includes/paging.php"; $offset = $rows_per_page * $page; //get the contact list - $sql = " select * from v_contact_phones "; + $sql = "select * from v_contact_phones "; $sql .= " where domain_uuid = '$domain_uuid' "; $sql .= " and contact_uuid = '$contact_uuid' "; if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } @@ -114,8 +129,16 @@ require_once "includes/paging.php"; foreach($result as $row) { echo "\n"; echo " ".$row['phone_type']." \n"; - echo " ".format_phone($row['phone_number'])." \n"; - echo " CDR \n"; + echo " \n"; + echo " \n"; + echo " ".format_phone($row['phone_number'])." \n"; + echo " \n"; + echo " \n"; + echo " Call\n"; + echo "  \n"; + echo " CDR\n"; + echo "  \n"; + echo " \n"; echo " \n"; echo " $v_link_label_edit\n"; echo " $v_link_label_delete\n"; diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 1d84ecb026..4503c9ee44 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -45,6 +45,21 @@ else { $rows_per_page = 100; require_once "xml_cdr_inc.php"; +//javascript function: send_cmd + echo "\n"; + //page title and description echo "
"; echo "\n"; @@ -351,7 +366,7 @@ else { $tmp_name = $row['uuid']."_1.mp3"; } if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) { - echo " \n"; + echo " \n"; echo $row['caller_id_name'].' '; echo " "; } @@ -361,33 +376,45 @@ else { echo " \n"; echo " \n"; + + echo " \n"; + echo format_phone($row['destination_number'])."\n"; } else { - echo " \n"; + echo " ".$row['destination_number']."\n"; } + echo " \n"; + echo " \n"; + echo " \n"; //echo " \n"; - + //If they cancelled, show the ring time, not the bill time. $seconds = ($row['hangup_cause']=="ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; diff --git a/includes/lib_switch.php b/includes/lib_switch.php index 928210d5c6..c15bf87af3 100644 --- a/includes/lib_switch.php +++ b/includes/lib_switch.php @@ -160,7 +160,7 @@ foreach($settings_array as $name => $value) { if (strlen($_SESSION["user_uuid"]) > 0 && count($_SESSION['user']['extension']) == 0) { //get the user extension list unset($_SESSION['user']['extension']); - $sql = "select e.extension, e.user_context, e.extension_uuid from v_extensions as e, v_extension_users as u "; + $sql = "select e.extension, e.user_context, e.extension_uuid, e.outbound_caller_id_name, e.outbound_caller_id_number from v_extensions as e, v_extension_users as u "; $sql .= "where e.domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "and e.extension_uuid = u.extension_uuid "; $sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' "; @@ -172,6 +172,8 @@ foreach($settings_array as $name => $value) { foreach($result as $row) { $_SESSION['user']['extension'][$x]['user'] = $row['extension']; $_SESSION['user']['extension'][$x]['extension_uuid'] = $row['extension_uuid']; + $_SESSION['user']['extension'][$x]['outbound_caller_id_name'] = $row['outbound_caller_id_name']; + $_SESSION['user']['extension'][$x]['outbound_caller_id_number'] = $row['outbound_caller_id_number']; $_SESSION['user_context'] = $row["user_context"]; $x++; }
"; if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) { - echo " \n"; + echo "\n"; if (is_numeric($row['caller_id_number'])) { echo format_phone($row['caller_id_number']).' '; } else { + echo "\n"; echo $row['caller_id_number'].' '; + echo "\n"; } echo " "; } else { if (is_numeric($row['caller_id_number'])) { + echo "\n"; echo format_phone($row['caller_id_number']).' '; + echo "\n"; } else { + echo "\n"; echo $row['caller_id_number'].' '; + echo "\n"; } } echo " "; + echo " \n"; if (is_numeric($row['destination_number'])) { - echo " ".format_phone($row['destination_number'])."".$row['destination_number']."".$tmp_start_epoch."".$row['end_stamp']."