CDR: TTA min/max search support.
This commit is contained in:
parent
a77bf9883b
commit
c08313fbaf
|
|
@ -76,6 +76,8 @@
|
||||||
$remote_media_ip = $_REQUEST["remote_media_ip"];
|
$remote_media_ip = $_REQUEST["remote_media_ip"];
|
||||||
$network_addr = $_REQUEST["network_addr"];
|
$network_addr = $_REQUEST["network_addr"];
|
||||||
$bridge_uuid = $_REQUEST["network_addr"];
|
$bridge_uuid = $_REQUEST["network_addr"];
|
||||||
|
$tta_min = $_REQUEST['tta_min'];
|
||||||
|
$tta_max = $_REQUEST['tta_max'];
|
||||||
$order_by = $_REQUEST["order_by"];
|
$order_by = $_REQUEST["order_by"];
|
||||||
$order = $_REQUEST["order"];
|
$order = $_REQUEST["order"];
|
||||||
if (is_array($_SESSION['cdr']['field'])) {
|
if (is_array($_SESSION['cdr']['field'])) {
|
||||||
|
|
@ -166,6 +168,8 @@
|
||||||
$param .= "&bridge_uuid=".urlencode($bridge_uuid);
|
$param .= "&bridge_uuid=".urlencode($bridge_uuid);
|
||||||
$param .= "&mos_comparison=".urlencode($mos_comparison);
|
$param .= "&mos_comparison=".urlencode($mos_comparison);
|
||||||
$param .= "&mos_score=".urlencode($mos_score);
|
$param .= "&mos_score=".urlencode($mos_score);
|
||||||
|
$param .= "&tta_min=".urlencode($tta_min);
|
||||||
|
$param .= "&tta_max=".urlencode($tta_max);
|
||||||
if (is_array($_SESSION['cdr']['field'])) {
|
if (is_array($_SESSION['cdr']['field'])) {
|
||||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||||
$array = explode(",", $field);
|
$array = explode(",", $field);
|
||||||
|
|
@ -182,6 +186,7 @@
|
||||||
$param .= "&order_by=".urlencode($order_by)."&order=".urlencode($order);
|
$param .= "&order_by=".urlencode($order_by)."&order=".urlencode($order);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//create the sql query to get the xml cdr records
|
//create the sql query to get the xml cdr records
|
||||||
if (strlen($order_by) == 0) { $order_by = "start_stamp"; }
|
if (strlen($order_by) == 0) { $order_by = "start_stamp"; }
|
||||||
if (strlen($order) == 0) { $order = "desc"; }
|
if (strlen($order) == 0) { $order = "desc"; }
|
||||||
|
|
@ -485,6 +490,14 @@
|
||||||
$sql .= "and leg = :leg ";
|
$sql .= "and leg = :leg ";
|
||||||
$parameters['leg'] = $leg;
|
$parameters['leg'] = $leg;
|
||||||
}
|
}
|
||||||
|
if (is_numeric($tta_min)) {
|
||||||
|
$sql .= "and (c.answer_epoch - c.start_epoch) >= :tta_min ";
|
||||||
|
$parameters['tta_min'] = $tta_min;
|
||||||
|
}
|
||||||
|
if (is_numeric($tta_max)) {
|
||||||
|
$sql .= "and (c.answer_epoch - c.start_epoch) <= :tta_max ";
|
||||||
|
$parameters['tta_max'] = $tta_max;
|
||||||
|
}
|
||||||
//end where
|
//end where
|
||||||
if (strlen($order_by) > 0) {
|
if (strlen($order_by) > 0) {
|
||||||
$sql .= order_by($order_by, $order);
|
$sql .= order_by($order_by, $order);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue