Use elseif instead of a series of if statements.

This commit is contained in:
FusionPBX 2021-06-15 13:44:14 -06:00 committed by GitHub
parent 6d536ce4d7
commit bcd7482e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -340,13 +340,13 @@ if (!class_exists('xml_cdr')) {
//set missed calls
$missed_call = 'false';
if ($xml->variables->cc_side != "agent" && strlen($xml->variables->originating_leg_uuid) == 0 && $xml->variables->call_direction != 'outbound' && strlen($xml->variables->answer_stamp) == 0) {
$missed_call = 'true';
}
if ($xml->variables->missed_call == 'true') {
$missed_call = 'true';
}
if ($xml->variables->voicemail_action == "save" && strlen($xml->variables->bridge_uuid) > 0) {
elseif ($xml->variables->cc_side != "agent" && strlen($xml->variables->originating_leg_uuid) == 0 && $xml->variables->call_direction != 'outbound' && strlen($xml->variables->answer_stamp) == 0) {
$missed_call = 'true';
}
elseif ($xml->variables->voicemail_action == "save" && strlen($xml->variables->bridge_uuid) > 0) {
$missed_call = 'true';
}