Add read and write codec to columns displayed (#6913)

* add read and write codec to columns displayed

* update the column display name to be Codecs
This commit is contained in:
frytimo 2024-03-16 13:56:28 -03:00 committed by GitHub
parent e279b0c7b6
commit 2264e2c0ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 103 additions and 2 deletions

View File

@ -247,6 +247,10 @@
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_extension_summary_all";
$y++;
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_account_code";
$y++;
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_codecs";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
//default settings
$y=0;

View File

@ -3744,4 +3744,78 @@ $text['button-advanced_search']['zh-cn'] = "先进的";
$text['button-advanced_search']['ja-jp'] = "高度";
$text['button-advanced_search']['ko-kr'] = "고급의";
$text['label-codecs']['en-us'] = "Codecs";
$text['label-codecs']['en-gb'] = "Codecs";
$text['label-codecs']['ar-eg'] = "برامج الترميز";
$text['label-codecs']['de-at'] = "Codecs";
$text['label-codecs']['de-ch'] = "Codecs";
$text['label-codecs']['de-de'] = "Codecs";
$text['label-codecs']['el-gr'] = "";
$text['label-codecs']['es-cl'] = "Códecs";
$text['label-codecs']['es-mx'] = "Códecs";
$text['label-codecs']['fr-ca'] = "Codecs";
$text['label-codecs']['fr-fr'] = "Codecs";
$text['label-codecs']['he-il'] = "कोडेक्स";
$text['label-codecs']['it-it'] = "Codec";
$text['label-codecs']['nl-nl'] = "";
$text['label-codecs']['pl-pl'] = "Kodeki";
$text['label-codecs']['pt-br'] = "";
$text['label-codecs']['pt-pt'] = "";
$text['label-codecs']['ro-ro'] = "";
$text['label-codecs']['ru-ru'] = "Кодеки";
$text['label-codecs']['sv-se'] = "Kodeki";
$text['label-codecs']['uk-ua'] = "Кодеки";
$text['label-codecs']['zh-cn'] = "编解码器";
$text['label-codecs']['ja-jp'] = "コーデック";
$text['label-codecs']['ko-kr'] = "코덱";
$text['label-codec_read']['en-us'] = "Read Codec";
$text['label-codec_read']['en-gb'] = "Read Codec";
$text['label-codec_read']['ar-eg'] = "";
$text['label-codec_read']['de-at'] = "";
$text['label-codec_read']['de-ch'] = "";
$text['label-codec_read']['de-de'] = "";
$text['label-codec_read']['el-gr'] = "";
$text['label-codec_read']['es-cl'] = "";
$text['label-codec_read']['es-mx'] = "";
$text['label-codec_read']['fr-ca'] = "";
$text['label-codec_read']['fr-fr'] = "";
$text['label-codec_read']['he-il'] = "";
$text['label-codec_read']['it-it'] = "";
$text['label-codec_read']['nl-nl'] = "";
$text['label-codec_read']['pl-pl'] = "";
$text['label-codec_read']['pt-br'] = "";
$text['label-codec_read']['pt-pt'] = "";
$text['label-codec_read']['ro-ro'] = "";
$text['label-codec_read']['ru-ru'] = "";
$text['label-codec_read']['sv-se'] = "";
$text['label-codec_read']['uk-ua'] = "";
$text['label-codec_read']['zh-cn'] = "";
$text['label-codec_read']['ja-jp'] = "";
$text['label-codec_read']['ko-kr'] = "";
$text['label-codec_write']['en-us'] = "Write Codec";
$text['label-codec_write']['en-gb'] = "Write Codec";
$text['label-codec_write']['ar-eg'] = "";
$text['label-codec_write']['de-at'] = "";
$text['label-codec_write']['de-ch'] = "";
$text['label-codec_write']['de-de'] = "";
$text['label-codec_write']['el-gr'] = "";
$text['label-codec_write']['es-cl'] = "";
$text['label-codec_write']['es-mx'] = "";
$text['label-codec_write']['fr-ca'] = "";
$text['label-codec_write']['fr-fr'] = "";
$text['label-codec_write']['he-il'] = "";
$text['label-codec_write']['it-it'] = "";
$text['label-codec_write']['nl-nl'] = "";
$text['label-codec_write']['pl-pl'] = "";
$text['label-codec_write']['pt-br'] = "";
$text['label-codec_write']['pt-pt'] = "";
$text['label-codec_write']['ro-ro'] = "";
$text['label-codec_write']['ru-ru'] = "";
$text['label-codec_write']['sv-se'] = "";
$text['label-codec_write']['uk-ua'] = "";
$text['label-codec_write']['zh-cn'] = "";
$text['label-codec_write']['ja-jp'] = "";
$text['label-codec_write']['ko-kr'] = "";
?>

View File

@ -51,6 +51,8 @@
$paging_controls_mini = '';
$paging_controls = null;
$order_by = "";
$read_codec = '';
$write_codec = '';
if(!isset($_REQUEST['show'])) {
//set to show only this domain
$_REQUEST['show'] = 'domain';
@ -375,6 +377,17 @@
echo " </div>\n";
echo " </div>\n";
}
if (permission_exists('xml_cdr_codecs')) {
echo " <div class='form_set'>\n";
echo " <div class='label'>\n";
echo " ".$text['label-codecs']."\n";
echo " </div>\n";
echo " <div class='field no-wrap'>\n";
echo " <input type='text' class='formfld' style='min-width: 115px; width: 115px;' name='read_codec' id='read_codec' value='".escape($read_codec)."' placeholder=\"".$text['label-codec_read']."\">\n";
echo " <input type='text' class='formfld' style='min-width: 115px; width: 115px;' name='write_codec' id='write_codec' value='".escape($write_codec)."' placeholder=\"".$text['label-codec_write']."\">\n";
echo " </div>\n";
echo " </div>\n";
}
if (permission_exists('xml_cdr_search_tta')) {
echo " <div class='form_set'>\n";
echo " <div class='label'>\n";
@ -517,7 +530,7 @@
echo " </select>\n";
echo " </div>\n";
echo " </div>\n";
if (permission_exists('xml_cdr_search_call_center_queues')) {
echo " <div class='form_set'>\n";
echo " <div class='label'>\n";
@ -631,6 +644,10 @@
echo "<th class='center shrink hide-md-dn'>".$text['label-time']."</th>\n";
$col_count += 2;
}
if (permission_exists('xml_cdr_codecs')) {
echo "<th class='center shrink'>".$text['label-codecs']."</th>\n";
$col_count++;
}
if (permission_exists('xml_cdr_tta')) {
echo "<th class='right hide-md-dn' title=\"".$text['description-tta']."\">".$text['label-tta']."</th>\n";
$col_count++;
@ -896,6 +913,10 @@
$content .= " <td class='middle right no-wrap'>".$row['start_date_formatted']."</td>\n";
$content .= " <td class='middle right no-wrap hide-md-dn'>".$row['start_time_formatted']."</td>\n";
}
//codec
if (permission_exists('xml_cdr_codecs')) {
$content .= " <td class='middle right no-wrap'>".($row['read_codec'] ?? '').' / '.($row['write_codec'] ?? '')."</td>\n";
}
//tta (time to answer)
if (permission_exists('xml_cdr_tta')) {
$content .= " <td class='middle right hide-md-dn'>".(!empty($row['tta']) && $row['tta'] >= 0 ? $row['tta']."s" : "&nbsp;")."</td>\n";
@ -918,7 +939,7 @@
}
//call result/status
if (permission_exists("xml_cdr_status")) {
$content .= " <td class='middle no-wrap hide-sm-dn'><a href='".$list_row_url."'>".escape($text['label-'.$status])."</a></td>\n";
$content .= " <td class='middle no-wrap hide-sm-dn'><a href='".$list_row_url."'>".escape($text['label-'.$status] ?? '')."</a></td>\n";
}
//hangup cause
if (permission_exists('xml_cdr_hangup_cause')) {

View File

@ -277,6 +277,8 @@
$sql .= "c.source_number, \n";
$sql .= "c.destination_number, \n";
$sql .= "c.leg, \n";
$sql .= "c.read_codec, \n";
$sql .= "c.write_codec, \n";
$sql .= "c.cc_side, \n";
//$sql .= "(c.xml is not null or c.json is not null) as raw_data_exists, \n";
//$sql .= "c.json, \n";