mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add. Statistics takes account to leg. (#2653)
Add. Leg field to advanced search form.
This commit is contained in:
committed by
FusionPBX
parent
f939c82862
commit
d093b37c22
@@ -107,8 +107,20 @@
|
||||
echo " <option value='local'>".$text['label-local']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
|
||||
if(permission_exists('xml_cdr_b_leg')){
|
||||
echo " <select name='leg' class='formfld'>\n";
|
||||
echo " <option value='' selected='selected'></option>\n";
|
||||
echo " <option value='a'>a-leg</option>\n";
|
||||
echo " <option value='b'>b-leg</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-caller_id_name']."</td>"; //source name
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='caller_id_name' value='$caller_id_name'></td>";
|
||||
|
||||
@@ -122,14 +122,20 @@ else {
|
||||
$mos_comparison = "<>";
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$mos_comparison = '';
|
||||
}
|
||||
} else {
|
||||
$mos_comparison = '';
|
||||
}
|
||||
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
||||
$mos_score = check_str($_REQUEST["mos_score"]);
|
||||
if(permission_exists('xml_cdr_b_leg')){
|
||||
$leg = check_str($_REQUEST["leg"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if we do not see b-leg then use only a-leg to generate statistics
|
||||
if(!permission_exists('xml_cdr_b_leg')){
|
||||
$leg = 'a';
|
||||
}
|
||||
|
||||
//build the sql where string
|
||||
if ($missed == true) {
|
||||
@@ -182,6 +188,7 @@ else {
|
||||
if (strlen($remote_media_ip) > 0) { $sql_where_ands[] = "remote_media_ip like '%".$remote_media_ip."%'"; }
|
||||
if (strlen($network_addr) > 0) { $sql_where_ands[] = "network_addr like '%".$network_addr."%'"; }
|
||||
if (strlen($mos_comparison) > 0 && strlen($mos_score) > 0 ) { $sql_where_ands[] = "rtp_audio_in_mos " . $mos_comparison . " ".$mos_score.""; }
|
||||
if (strlen($leg) > 0) { $sql_where_ands[] = "leg='$leg'"; }
|
||||
|
||||
//if not admin or superadmin, only show own calls
|
||||
if (!permission_exists('xml_cdr_domain')) {
|
||||
|
||||
Reference in New Issue
Block a user