[cdr] Add call stats to cdr details

This commit is contained in:
agree
2021-05-21 00:55:42 -04:00
parent 884720489f
commit 0fc6915a7a
2 changed files with 59 additions and 0 deletions

View File

@@ -630,6 +630,27 @@ $text['label-variables']['ru-ru'] = "Переменные";
$text['label-variables']['sv-se'] = "Variabler";
$text['label-variables']['uk-ua'] = "Змінні";
$text['label-call-stats']['en-us'] = "Call Stats: Audio";
$text['label-call-stats']['en-gb'] = "Call Stats: Audio";
$text['label-call-stats']['ar-eg'] = "";
$text['label-call-stats']['de-at'] = "";
$text['label-call-stats']['de-ch'] = "";
$text['label-call-stats']['de-de'] = "";
$text['label-call-stats']['es-cl'] = "";
$text['label-call-stats']['es-mx'] = "";
$text['label-call-stats']['fr-ca'] = "";
$text['label-call-stats']['fr-fr'] = "";
$text['label-call-stats']['he-il'] = "";
$text['label-call-stats']['it-it'] = "";
$text['label-call-stats']['nl-nl'] = "";
$text['label-call-stats']['pl-pl'] = "";
$text['label-call-stats']['pt-br'] = "";
$text['label-call-stats']['pt-pt'] = "";
$text['label-call-stats']['ro-ro'] = "";
$text['label-call-stats']['ru-ru'] = "";
$text['label-call-stats']['sv-se'] = "";
$text['label-call-stats']['uk-ua'] = "";
$text['label-uuid']['en-us'] = "UUID";
$text['label-uuid']['en-gb'] = "UUID";
$text['label-uuid']['ar-eg'] = "";

View File

@@ -278,6 +278,44 @@
echo "</table>";
echo "<br /><br />\n";
//call stats
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
if (is_array($array["call-stats"])) {
if (is_array($array["call-stats"]['audio'])) {
foreach($array["call-stats"]['audio'] as $audio_direction => $stat) {
echo " <table width='95%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$text['label-call-stats'].": ".$audio_direction."</b>&nbsp;</td>\n";
echo " <td>&nbsp;</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th width='30%'>".$text['label-name']."</th>\n";
echo " <th width='70%'>".$text['label-value']."</th>\n";
echo " </tr>\n";
foreach($stat as $key => $value) {
if (is_array($value)) { $value = implode($value); }
$value = urldecode($value);
echo "<tr >\n";
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".escape($key)."</td>\n";
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".escape(wordwrap($value,75,"\n", true))."&nbsp;</td>\n";
echo "</tr>\n";
$c = $c ? 0 : 1;
}
echo " <tr>\n";
echo " <td colspan='2'><br /><br /></td>\n";
echo " </tr>\n";
echo "</table>\n";
}
}
}
echo "</table>";
echo "<br /><br />\n";
//channel data loop
$c = 0;
$row_style["0"] = "row_style0";