Work on missed_call field.

This commit is contained in:
FusionPBX
2022-08-04 18:37:14 -06:00
committed by GitHub
parent 3418859ee9
commit 74d034d7a9

View File

@@ -45,7 +45,6 @@
//get post or get variables from http
if (count($_REQUEST) > 0) {
$cdr_id = $_REQUEST["cdr_id"];
$missed = $_REQUEST["missed"];
$direction = $_REQUEST["direction"];
$caller_id_name = $_REQUEST["caller_id_name"];
$caller_id_number = $_REQUEST["caller_id_number"];
@@ -242,6 +241,7 @@
$sql .= "c.hangup_cause, \n";
$sql .= "c.duration, \n";
$sql .= "c.billmsec, \n";
$sql .= "c.missed_call, \n";
$sql .= "c.record_path, \n";
$sql .= "c.record_name, \n";
$sql .= "c.xml_cdr_uuid, \n";
@@ -300,10 +300,6 @@
$sql .= "and false ";
}
}
if ($missed == true) {
$sql .= "and missed_call = 1 \n";
$sql .= "and hangup_cause <> 'LOSE_RACE' ";
}
if (strlen($start_epoch) > 0 && strlen($stop_epoch) > 0) {
$sql .= "and start_epoch between :start_epoch and :stop_epoch \n";
$parameters['start_epoch'] = $start_epoch;
@@ -470,8 +466,7 @@
$sql .= "and (answer_stamp is not null and bridge_uuid is null) ";
break;
case 'missed':
$sql .= "and missed_call = '1' ";
$sql .= "and hangup_cause <> 'LOSE_RACE' ";
$sql .= "and missed_call = true ";
break;
case 'cancelled':
if ($direction == 'inbound' || $direction == 'local' || $call_result == 'missed') {