Added internal ignore list to voicallhistory::addContractIds()

This commit is contained in:
Frank Schubert
2024-07-08 18:28:16 +02:00
parent 8e9a9a2e1b
commit 9595309132

View File

@@ -109,10 +109,14 @@ class VoiceCallHistoryController extends mfBaseController {
public function addContractIds() {
$ignore_numbers = [
"4331641220846",
"43623237705",
"4367761737195"
"^4331641220846$",
"^43623237705$",
"^4367761737195$",
"^43664",
"^43677",
];
$unknown_numbers = [];
$missing_contracts = [];
$update_job_error = false;
@@ -124,6 +128,7 @@ class VoiceCallHistoryController extends mfBaseController {
return false;
}
// get calls without contract id
foreach(VoiceCallHistoryModel::getVoiceCallHistoryAsEntity(["contract_id" => null, "billable" => "1", "duration" => ["from" => 1]]) as $call) {
//var_dump($call);exit;
@@ -132,6 +137,11 @@ class VoiceCallHistoryController extends mfBaseController {
$number = $call->voice_account;
if(!$number) continue;
$pattern = implode("|", $ignore_numbers);
if(preg_match("/($pattern)/", $number)) {
continue;
}
// server side failed/disconnected calls
if($call->duration == 1 && $call->state == 38) continue;