When call goes to voicemail mark it as missed.

Add additional labels and change isset answer_stamp to use billsec greater than zero.
This commit is contained in:
FusionPBX 2022-08-05 13:19:35 -06:00 committed by GitHub
parent 0a45b7acf1
commit e0b37ae834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -375,18 +375,26 @@ if (!class_exists('xml_cdr')) {
//set missed calls
if (isset($xml->variables->missed_call)) {
//marked as missed
$missed_call = $xml->variables->missed_call;
}
elseif (isset($xml->variables->fax_success)) {
//fax server
$missed_call = 'false';
}
elseif ($xml->variables->hangup_cause = 'LOSE_RACE') {
//ring group or multi destination bridge statement
$missed_call = 'false';
}
elseif ($xml->variables->hangup_cause = 'NO_ANSWER' && isset($xml->variables->originating_leg_uuid)) {
//ring group or multi destination bridge statement
$missed_call = 'false';
}
elseif (isset($xml->variables->answer_stamp)) {
elseif (substr($xml->variables->destination_number, 0, 3) == '*99') {
//voicemail
$missed_call = 'false';
}
elseif (isset($xml->variables->billsec) && $xml->variables->billsec > 0) {
//answered call
$missed_call = 'false';
}