Add. Statistics takes account to leg. (#2653)
Add. Leg field to advanced search form.
This commit is contained in:
committed by
FusionPBX
parent
d43cb9e700
commit
a83d52eba6
@@ -107,8 +107,20 @@
|
|||||||
echo " <option value='local'>".$text['label-local']."</option>\n";
|
echo " <option value='local'>".$text['label-local']."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\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 " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo " <tr>";
|
echo " <tr>";
|
||||||
echo " <td class='vncell'>".$text['label-caller_id_name']."</td>"; //source name
|
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>";
|
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 = "<>";
|
$mos_comparison = "<>";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$mos_comparison = '';
|
$mos_comparison = '';
|
||||||
}
|
}
|
||||||
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
||||||
$mos_score = check_str($_REQUEST["mos_score"]);
|
$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
|
//build the sql where string
|
||||||
if ($missed == true) {
|
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($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($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($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 not admin or superadmin, only show own calls
|
||||||
if (!permission_exists('xml_cdr_domain')) {
|
if (!permission_exists('xml_cdr_domain')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user