Portions created by the Initial Developer are Copyright (C) 2008-2012 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ require_once "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; require_once "app_languages.php"; if (permission_exists('xml_cdr_view')) { //access granted } else { echo "access denied"; exit; } //add multi-lingual support foreach($text as $key => $value) { $text[$key] = $value[$_SESSION['domain']['language']['code']]; } //import xml_cdr files require_once "v_xml_cdr_import.php"; //additional includes require_once "includes/header.php"; require_once "includes/paging.php"; //xml cdr include $rows_per_page = 100; require_once "xml_cdr_inc.php"; //javascript function: send_cmd echo "\n"; //page title and description echo "
"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
".$text['title']."\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo " \n"; echo "\n"; echo "
\n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "
\n"; echo "".$text['description']." \n"; echo "".$text['description2']." \n"; echo "".$text['description-3']." \n"; echo "".$text['description-4']." \n"; //To do an advanced search of the call detail records click on the following advanced button. echo "
\n"; echo "
\n"; echo "
\n"; //search the call detail records if (if_group("admin") || if_group("superadmin")) { echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
".$text['label-description'].":\n"; echo " \n"; echo "
".$text['label-cid-name'].":
\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
".$text['label-source'].":
".$text['label-destination'].":
\n"; echo "
\n"; echo "\n"; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; //echo " "; echo " "; echo "
Context:
Answer:
End:
".$text['label-start'].":
".$text['label-status'].":\n"; echo " \n"; echo "
Duration:
Bill:
UUID:
Bridge UUID:
Account Code:
Read Codec:
Write Codec:
Remote Media IP:
Network Address:
"; echo "
\n"; //echo " \n"; echo "\n"; echo "  \n"; echo " \n"; echo "
"; echo "
"; } //show the results echo "\n"; echo "\n"; //echo th_order_by('direction', 'Direction', $order_by, $order); //echo th_order_by('default_language', 'Language', $order_by, $order); //echo th_order_by('context', 'Context', $order_by, $order); //echo th_order_by('leg', 'Leg', $order_by, $order); echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order); echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order); echo th_order_by('destination_number', $text['label-destination'], $order_by, $order); echo "\n"; echo th_order_by('start_stamp', $text['label-start'], $order_by, $order); //echo th_order_by('end_stamp', 'End', $order_by, $order); echo th_order_by('duration', $text['label-length'], $order_by, $order); if (if_group("admin") || if_group("superadmin")) { echo th_order_by('pdd_ms', 'PDD', $order_by, $order); } echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order); echo "\n"; if ($result_count > 0) { foreach($result as $row) { $tmp_year = date("Y", strtotime($row['start_stamp'])); $tmp_month = date("M", strtotime($row['start_stamp'])); $tmp_day = date("d", strtotime($row['start_stamp'])); if (defined('TIME_24HR') && TIME_24HR == 1) { $tmp_start_epoch = date("j M Y H:i:s", $row['start_epoch']); } else { $tmp_start_epoch = date("j M Y h:i:sa", $row['start_epoch']); } $hangup_cause = $row['hangup_cause']; $hangup_cause = str_replace("_", " ", $hangup_cause); $hangup_cause = strtolower($hangup_cause); $hangup_cause = ucwords($hangup_cause); $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; $tmp_name = ''; if(!empty($row['recording_file']) && file_exists($row['recording_file'])){ $tmp_name=$row['recording_file']; } elseif (file_exists($tmp_dir.'/'.$row['uuid'].'.wav')) { $tmp_name = $row['uuid'].".wav"; } elseif (file_exists($tmp_dir.'/'.$row['uuid'].'_1.wav')) { $tmp_name = $row['uuid']."_1.wav"; } elseif (file_exists($tmp_dir.'/'.$row['uuid'].'.mp3')) { $tmp_name = $row['uuid'].".mp3"; } elseif (file_exists($tmp_dir.'/'.$row['uuid'].'_1.mp3')) { $tmp_name = $row['uuid']."_1.mp3"; } echo "\n"; //echo " \n"; //echo " \n"; //echo " \n"; //echo " \n"; echo " \n"; echo " \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']; echo " \n"; if (if_group("admin") || if_group("superadmin")) { echo " \n"; echo " \n"; } else { echo " \n"; } echo "\n"; if ($c==0) { $c=1; } else { $c=0; } } //end foreach unset($sql, $result, $row_count); } //end if results echo "\n"; echo "\n"; echo "\n"; echo "
".$text['label-tools']."
".$row['direction']."".$row['default_language']."".$row['context']."".$row['leg'].""; echo $row['caller_id_name'].' '; echo " "; echo "   \n"; if (is_numeric($row['caller_id_number'])) { echo " ".format_phone($row['caller_id_number']).' '; } else { echo " ".$row['caller_id_number'].' '; } echo " "; echo " "; echo " \n"; if (is_numeric($row['destination_number'])) { echo format_phone($row['destination_number'])."\n"; } else { echo " ".$row['destination_number']."\n"; } echo " \n"; echo " "; if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) { echo " \n"; echo " ".$text['label-play']."\n"; echo " \n"; echo "  \n"; echo " \n"; echo " ".$text['label-download']."\n"; echo " \n"; } else { echo "  \n"; } echo " ".$tmp_start_epoch."".$row['end_stamp']."".gmdate("G:i:s", $seconds)."".number_format($row['pdd_ms']/1000,2)."s".$hangup_cause."".$hangup_cause."
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
 $paging_controls 
\n"; echo "
"; echo "
"; echo "

"; echo "

"; //show the footer require_once "includes/footer.php"; ?>