diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php
index 9f32a66b9b..29d145cd66 100644
--- a/app/xml_cdr/xml_cdr.php
+++ b/app/xml_cdr/xml_cdr.php
@@ -574,37 +574,42 @@
$content .= " \n";
}
//destination
- if ($_SESSION['cdr']['cut_prefix']['boolean'] == 'true') {
+ if ($_SESSION['cdr']['remove_prefix']['boolean'] == 'true') {
//get outbound prefix variable from json table if exists
$json_string = trim($row["json"]);
$array = json_decode($json_string,true);
- $cut_prefix = false;
+ $remove_prefix = false;
if (is_array($array["app_log"]["application"])) foreach ($array["app_log"]["application"] as $application) {
$app_data = urldecode($application["@attributes"]["app_data"]);
if (substr($app_data,0,7) == "prefix=") {
$prefix = substr($app_data,7);
- $cut_prefix = true; }
+ $remove_prefix = true;
+ }
}
}
$content .= "
";
$content .= " \n";
if (is_numeric($row['destination_number'])) {
- if ($prefix ) {
+ if ($prefix) {
//confirms call was made with a prefix
$is_prefixed = substr(format_phone(escape(substr($row['destination_number'], 0, 20))),0,strlen($prefix));
+
+ //remove the prefix
if ($prefix == $is_prefixed) {
- //cut the prefix
- $content .= substr(format_phone(escape(substr($row['destination_number'], 0, 20))),strlen($prefix))."\n"; }
+ $content .= substr(format_phone(escape(substr($row['destination_number'], 0, 20))),strlen($prefix))."\n";
+ }
else {
- $content .= format_phone(escape(substr($row['destination_number'], 0, 20)))."\n";}
+ $content .= format_phone(escape(substr($row['destination_number'], 0, 20)))."\n";
+ }
}
else {
- if ($cut_prefix == 'true') {
- $content .= substr(format_phone(escape(substr($row['destination_number'], 0, 20))),strlen($prefix))."\n";
+ if ($remove_prefix == 'true') {
+ $content .= substr(format_phone(escape(substr($row['destination_number'], 0, 20))),strlen($prefix))."\n";
}
else {
- $content .= format_phone(escape(substr($row['destination_number'], 0, 20)))."\n"; }}
+ $content .= format_phone(escape(substr($row['destination_number'], 0, 20)))."\n";
+ }
}
$content .= " \n";
$content .= " | \n";
@@ -617,7 +622,8 @@
$content .= "".$v_link_label_play."";
}
else {
- $content .= "don't have recording_play permission ";
+ //needs a translation
+ $content .= "Don't have recording_play permission ";
}
if (permission_exists('recording_download')) {
$content .= "".$v_link_label_download."";