diff --git a/app/xml_cdr/app_languages.php b/app/xml_cdr/app_languages.php
index d233507aaf..a0613fcbab 100644
--- a/app/xml_cdr/app_languages.php
+++ b/app/xml_cdr/app_languages.php
@@ -1,5 +1,4 @@
Note: Source, Destination and Caller ID (CID) Name fields support the use of an asterisk ('*') as a wildcard character.";
$text['description_search']['ar-eg'] = "";
$text['description_search']['de-at'] = "Info: Quelle, Ziel und Anruferkennung (CID) Namesfelder unterstützen die Verwendung von Stern ('*') als Wildcard Zeichen."; //copied from de-de
@@ -2541,4 +2640,4 @@ $text['button-advanced_search']['ru-ru'] = "Расширенный поиск";
$text['button-advanced_search']['sv-se'] = "Avancerad Sökning";
$text['button-advanced_search']['uk-ua'] = "";
-?>
+?>
\ No newline at end of file
diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php
index 9acf7db938..3c7eb7e205 100644
--- a/app/xml_cdr/xml_cdr.php
+++ b/app/xml_cdr/xml_cdr.php
@@ -221,19 +221,45 @@
echo " \n";
echo "";
- echo "
\n";
+ echo " \n";
echo " \n";
+
+ echo " ";
+ echo "\n";
+
+ echo " \n";
echo " ";
- echo "\n";
+ echo " \n";
echo " \n";
echo " \n";
- echo " \n";
- echo " ".$text['label-start_range']."\n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo " \n";
+ if (permission_exists('hangup_cause')) {
+ echo " \n";
+ echo " ".$text['label-hangup_cause']."\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+
+ $cdr_status_options = array(
+ 'NORMAL_CLEARING',
+ 'ORIGINATOR_CANCEL',
+ 'BLIND_TRANSFER',
+ 'LOSE_RACE',
+ 'NO_ANSWER',
+ 'NORMAL_UNSPECIFIED',
+ 'NO_USER_RESPONSE',
+ 'NO_ROUTE_DESTINATION',
+ 'SUBSCRIBER_ABSENT',
+ 'NORMAL_TEMPORARY_FAILURE',
+ 'ATTENDED_TRANSFER',
+ 'PICKED_OFF',
+ 'USER_BUSY',
+ 'CALL_REJECTED',
+ 'INVALID_NUMBER_FORMAT',
+ 'NETWORK_OUT_OF_ORDER',
+ 'DESTINATION_OUT_OF_ORDER',
+ 'RECOVERY_ON_TIMER_EXPIRE',
+ 'MANAGER_REQUEST',
+ 'MEDIA_TIMEOUT',
+ 'UNALLOCATED_NUMBER',
+ 'NONE',
+ 'EXCHANGE_ROUTING_ERROR',
+ 'ALLOTTED_TIMEOUT',
+ 'CHAN_NOT_IMPLEMENTED',
+ 'INCOMPATIBLE_DESTINATION',
+ 'USER_NOT_REGISTERED',
+ 'SYSTEM_SHUTDOWN',
+ 'MANDATORY_IE_MISSING'
+ );
+ sort($cdr_status_options);
+ foreach ($cdr_status_options as $cdr_status) {
+ $selected = ($hangup_cause == $cdr_status) ? "selected='selected'" : null;
+ $cdr_status_label = ucwords(strtolower(str_replace("_", " ", $cdr_status)));
+ echo " ".escape($cdr_status_label)." \n";
+ }
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ }
echo " \n";
echo " \n";
- echo " ".$text['label-caller_id_name']."\n";
+ echo " ".$text['label-order']."\n";
echo " \n";
- echo " \n";
- echo " \n";
+ echo " \n";
+ echo " \n";
+ if (permission_exists('xml_cdr_extension')) {
+ echo " ".$text['label-extension']." \n";
+ }
+ if (permission_exists('xml_cdr_all')) {
+ echo " ".$text['label-domain']." \n";
+ }
+ echo " ".$text['label-caller_id_name']." \n";
+ echo " ".$text['label-caller_id_number']." \n";
+ if (permission_exists('caller_destination')) {
+ echo " ".$text['label-caller_destination']." \n";
+ }
+ echo " ".$text['label-destination']." \n";
+ echo " ".$text['label-start']." \n";
+ echo " ".$text['label-tta']." \n";
+ echo " ".$text['label-duration']." \n";
+ if (permission_exists('xml_cdr_pdd')) {
+ echo " ".$text['label-pdd']." \n";
+ }
+ if (permission_exists('xml_cdr_mos')) {
+ echo " ".$text['label-mos']." \n";
+ }
+ if (permission_exists('hangup_cause')) {
+ echo " ".$text['label-hangup_cause']." \n";
+ }
+
+ if (is_array($_SESSION['cdr']['field'])) {
+ echo " \n";
+ echo " \n";
+ foreach ($_SESSION['cdr']['field'] as $field) {
+ $array = explode(",", $field);
+ $field_name = end($array);
+ $field_label = ucwords(str_replace("_", " ", $field_name));
+ $field_label = str_replace("Sip", "SIP", $field_label);
+ if ($field_name != "destination_number") {
+ echo " ".$field_label." \n";
+ }
+ }
+ echo " \n";
+ }
+ echo " \n";
+ echo " \n";
+ echo " ".$text['label-descending']." \n";
+ echo " ".$text['label-ascending']." \n";
+ echo " \n";
echo " \n";
echo " \n";
+
echo "
\n";
echo " ";
- // show hangup clause filter to super/admin
- echo "\n";
-
- echo "\n";
- echo " \n";
- if (permission_exists('hangup_cause')) {
- echo " \n";
- echo " ".$text['label-hangup_cause']."\n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo " \n";
-
- $cdr_status_options = array(
- 'NORMAL_CLEARING',
- 'ORIGINATOR_CANCEL',
- 'BLIND_TRANSFER',
- 'LOSE_RACE',
- 'NO_ANSWER',
- 'NORMAL_UNSPECIFIED',
- 'NO_USER_RESPONSE',
- 'NO_ROUTE_DESTINATION',
- 'SUBSCRIBER_ABSENT',
- 'NORMAL_TEMPORARY_FAILURE',
- 'ATTENDED_TRANSFER',
- 'PICKED_OFF',
- 'USER_BUSY',
- 'CALL_REJECTED',
- 'INVALID_NUMBER_FORMAT',
- 'NETWORK_OUT_OF_ORDER',
- 'DESTINATION_OUT_OF_ORDER',
- 'RECOVERY_ON_TIMER_EXPIRE',
- 'MANAGER_REQUEST',
- 'MEDIA_TIMEOUT',
- 'UNALLOCATED_NUMBER',
- 'NONE',
- 'EXCHANGE_ROUTING_ERROR',
- 'ALLOTTED_TIMEOUT',
- 'CHAN_NOT_IMPLEMENTED',
- 'INCOMPATIBLE_DESTINATION',
- 'USER_NOT_REGISTERED',
- 'SYSTEM_SHUTDOWN',
- 'MANDATORY_IE_MISSING'
- );
- sort($cdr_status_options);
- foreach ($cdr_status_options as $cdr_status) {
- $selected = ($hangup_cause == $cdr_status) ? "selected='selected'" : null;
- $cdr_status_label = ucwords(strtolower(str_replace("_", " ", $cdr_status)));
- echo " ".escape($cdr_status_label)." \n";
- }
- echo " \n";
- echo " \n";
- echo " \n";
- }
- if (permission_exists('caller_destination')) {
- echo " \n";
- echo " \n";
- echo " ".$text['label-caller_destination']."\n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo " \n";
- }
- echo "
\n";
-
- echo " ";
-
echo "";
echo "";
@@ -375,18 +419,18 @@
//column headings
echo " \n";
if (permission_exists('xml_cdr_extension')) {
- echo th_order_by('extension', $text['label-extension'], $order_by, $order, null, null, $param);
+ echo "".$text['label-extension']." \n";
}
if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) {
- echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param);
+ echo "".$text['label-domain']." \n";
$col_count++;
}
- echo th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order, null, null, $param);
- echo th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order, null, null, $param);
+ echo "".$text['label-caller_id_name']." \n";
+ echo "".$text['label-caller_id_number']." \n";
if (permission_exists('caller_destination')) {
- echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, null, $param);
+ echo "".$text['label-caller_destination']." \n";
}
- echo th_order_by('destination_number', $text['label-destination'], $order_by, $order, null, null, $param);
+ echo "".$text['label-destination']." \n";
if (permission_exists('recording_play') || permission_exists('recording_download')) {
echo "".$text['label-recording']." \n";
$col_count++;
@@ -398,23 +442,24 @@
$field_label = ucwords(str_replace("_", " ", $field_name));
$field_label = str_replace("Sip", "SIP", $field_label);
if ($field_name != "destination_number") {
- echo th_order_by($field_name, $field_label, $order_by, $order, null, "style='text-align: right;'", $param);
+ echo "".$field_label." \n";
+ $col_count++;
}
}
}
- echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: center;'", $param);
- echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'", $param, $text['description-tta']);
- echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param);
+ echo "".$text['label-start']." \n";
+ echo "".$text['label-tta']." \n";
+ echo "".$text['label-duration']." \n";
if (permission_exists('xml_cdr_pdd')) {
- echo th_order_by('pdd_ms', $text['label-pdd'], $order_by, $order, null, "style='text-align: right;'", $param, $text['description-pdd']);
+ echo "".$text['label-pdd']." \n";
$col_count++;
}
if (permission_exists('xml_cdr_mos')) {
- echo th_order_by('rtp_audio_in_mos', $text['label-mos'], $order_by, $order, null, "style='text-align: center;'", $param, $text['description-mos']);
+ echo "".$text['label-mos']." \n";
$col_count++;
}
if (permission_exists('hangup_cause')) {
- echo th_order_by('hangup_cause', $text['label-hangup_cause'], $order_by, $order, null, null, $param);
+ echo "".$text['label-hangup_cause']." \n";
}
else {
echo "".$text['label-status']." \n";
@@ -719,4 +764,4 @@
//show the footer
require_once "resources/footer.php";
-?>
+?>
\ No newline at end of file
diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php
index ee9c801167..631cbcfd85 100644
--- a/app/xml_cdr/xml_cdr_inc.php
+++ b/app/xml_cdr/xml_cdr_inc.php
@@ -181,7 +181,7 @@
}
//create the sql query to get the xml cdr records
- if (strlen($order_by) == 0) { $order_by = "start_epoch"; }
+ if (strlen($order_by) == 0) { $order_by = "start_stamp"; }
if (strlen($order) == 0) { $order = "desc"; }
//set a default number of rows to show
@@ -521,4 +521,4 @@
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
-?>
+?>
\ No newline at end of file