Hide digits_dialed and dsn variable from the CDR table as a security enhancement.

This commit is contained in:
Mark Crane
2013-05-22 01:07:59 +00:00
parent d6bfe478af
commit d534a2b0e7
2 changed files with 35 additions and 34 deletions

View File

@@ -77,7 +77,7 @@
$database->fields['accountcode'] = check_str(urldecode($xml->variables->accountcode));
$database->fields['default_language'] = check_str(urldecode($xml->variables->default_language));
$database->fields['bridge_uuid'] = check_str(urldecode($xml->variables->bridge_uuid));
$database->fields['digits_dialed'] = check_str(urldecode($xml->variables->digits_dialed));
//$database->fields['digits_dialed'] = check_str(urldecode($xml->variables->digits_dialed));
$database->fields['sip_hangup_disposition'] = check_str(urldecode($xml->variables->sip_hangup_disposition));
//time
$database->fields['start_epoch'] = check_str(urldecode($xml->variables->start_epoch));

View File

@@ -178,7 +178,6 @@ else {
//$tmp_file_array = explode("\.",$file);
echo $caller_id_name.' ';
echo " </a>";
}
else {
echo $caller_id_name.' ';
@@ -257,41 +256,43 @@ else {
foreach($xml->variables->children() as $child) {
$key = $child->getName();
$value = urldecode($child);
echo "<tr >\n";
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".$key."</td>\n";
if ($key == "bridge_uuid" || $key == "signal_bond") {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>\n";
echo " <a href='xml_cdr_details.php?uuid=$value'>".$value."</a>&nbsp;\n";
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
$tmp_name = '';
if (file_exists($tmp_dir.'/'.$value.'.wav')) {
$tmp_name = $value.".wav";
if ($key != "digits_dialed" && $key != "dsn") {
echo "<tr >\n";
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".$key."</td>\n";
if ($key == "bridge_uuid" || $key == "signal_bond") {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>\n";
echo " <a href='xml_cdr_details.php?uuid=$value'>".$value."</a>&nbsp;\n";
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
$tmp_name = '';
if (file_exists($tmp_dir.'/'.$value.'.wav')) {
$tmp_name = $value.".wav";
}
elseif (file_exists($tmp_dir.'/'.$value.'_1.wav')) {
$tmp_name = $value."_1.wav";
}
elseif (file_exists($tmp_dir.'/'.$value.'.mp3')) {
$tmp_name = $value.".mp3";
}
elseif (file_exists($tmp_dir.'/'.$value.'_1.mp3')) {
$tmp_name = $value."_1.mp3";
}
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
echo " <a href=\"javascript:void(0);\" onclick=\"window.open('../recordings/v_recordings_play.php?a=download&type=moh&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no')\">\n";
echo " play";
echo " </a>&nbsp;";
}
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode("archive/".$tmp_year."/".$tmp_month."/".$tmp_day."/".$tmp_name)."\">\n";
echo " download";
echo " </a>";
}
echo "</td>\n";
}
elseif (file_exists($tmp_dir.'/'.$value.'_1.wav')) {
$tmp_name = $value."_1.wav";
else {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".wordwrap($value,75,"<br />\n", TRUE)."&nbsp;</td>\n";
}
elseif (file_exists($tmp_dir.'/'.$value.'.mp3')) {
$tmp_name = $value.".mp3";
}
elseif (file_exists($tmp_dir.'/'.$value.'_1.mp3')) {
$tmp_name = $value."_1.mp3";
}
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
echo " <a href=\"javascript:void(0);\" onclick=\"window.open('../recordings/v_recordings_play.php?a=download&type=moh&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no')\">\n";
echo " play";
echo " </a>&nbsp;";
}
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode("archive/".$tmp_year."/".$tmp_month."/".$tmp_day."/".$tmp_name)."\">\n";
echo " download";
echo " </a>";
}
echo "</td>\n";
echo "</tr>\n";
}
else {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".wordwrap($value,75,"<br />\n", TRUE)."&nbsp;</td>\n";
}
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
}
echo "</table>";