diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php
index 8fc0aa4f53..c6f7d521ba 100644
--- a/app/xml_cdr/xml_cdr.php
+++ b/app/xml_cdr/xml_cdr.php
@@ -109,6 +109,11 @@
echo " \n";
echo " \n";
echo " \n";
+ foreach ($_SESSION['cdr']['field'] as $field) {
+ if (isset($_REQUEST[$field])) {
+ echo " \n";
+ }
+ }
if (isset($order_by)) {
echo " \n";
echo " \n";
@@ -361,6 +366,13 @@
echo "
".$text['label-recording']." | \n";
$col_count++;
}
+ if (is_array($_SESSION['cdr']['field'])) {
+ foreach ($_SESSION['cdr']['field'] as $field) {
+ $field_name = ucwords(str_replace("_", " ", $field));
+ $field_name = str_replace("Sip", "SIP", $field_name);
+ echo th_order_by($field, $field_name, $order_by, $order, null, "style='text-align: right;'", $param);
+ }
+ }
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);
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param);
@@ -545,6 +557,12 @@
echo " | \n";
}
}
+ //dynamic cdr fields
+ if (is_array($_SESSION['cdr']['field'])) {
+ foreach ($_SESSION['cdr']['field'] as $field) {
+ echo " ".$row[$field] ." | \n";
+ }
+ }
//start
echo " ".$tmp_start_epoch." | \n";
//tta (time to answer)
@@ -668,4 +686,4 @@
//show the footer
require_once "resources/footer.php";
-?>
\ No newline at end of file
+?>