Use isset and if statements
Changed ifelse to if statement to make sure it evaluates each condition.
This commit is contained in:
@@ -479,38 +479,36 @@ if (!class_exists('xml_cdr')) {
|
|||||||
//marked as missed
|
//marked as missed
|
||||||
$missed_call = $xml->variables->missed_call;
|
$missed_call = $xml->variables->missed_call;
|
||||||
}
|
}
|
||||||
elseif (isset($xml->variables->fax_success)) {
|
if (isset($xml->variables->fax_success)) {
|
||||||
//fax server
|
//fax server
|
||||||
$missed_call = 'false';
|
$missed_call = 'false';
|
||||||
}
|
}
|
||||||
elseif ($xml->variables->hangup_cause == 'LOSE_RACE') {
|
if (isset($xml->variables->hangup_cause) && $xml->variables->hangup_cause == 'LOSE_RACE') {
|
||||||
//ring group or multi destination bridge statement
|
//ring group or multi destination bridge statement
|
||||||
$missed_call = 'false';
|
$missed_call = 'false';
|
||||||
}
|
}
|
||||||
elseif ($xml->variables->hangup_cause == 'NO_ANSWER' && isset($xml->variables->originating_leg_uuid)) {
|
if (isset($xml->variables->hangup_cause) && $xml->variables->hangup_cause == 'NO_ANSWER' && isset($xml->variables->originating_leg_uuid)) {
|
||||||
//ring group or multi destination bridge statement
|
//ring group or multi destination bridge statement
|
||||||
$missed_call = 'false';
|
$missed_call = 'false';
|
||||||
}
|
}
|
||||||
elseif (substr($xml->variables->destination_number, 0, 3) == '*99') {
|
if (isset($xml->variables->destination_number) && substr($xml->variables->destination_number, 0, 3) == '*99') {
|
||||||
//voicemail
|
//voicemail
|
||||||
$missed_call = 'true';
|
$missed_call = 'true';
|
||||||
}
|
}
|
||||||
elseif (isset($xml->variables->voicemail_message) && $xml->variables->voicemail_message == true) {
|
if (isset($xml->variables->voicemail_message) && $xml->variables->voicemail_message == true) {
|
||||||
//voicemail
|
//voicemail
|
||||||
$missed_call = 'true';
|
$missed_call = 'true';
|
||||||
}
|
}
|
||||||
elseif (isset($xml->variables->billsec) && $xml->variables->billsec > 0) {
|
if (isset($xml->variables->billsec) && $xml->variables->billsec > 0) {
|
||||||
//answered call
|
//answered call
|
||||||
$missed_call = 'false';
|
$missed_call = 'false';
|
||||||
}
|
}
|
||||||
elseif (isset($xml->variables->cc_side) && $xml->variables->cc_side == 'agent') {
|
if (isset($xml->variables->cc_side) && $xml->variables->cc_side == 'agent') {
|
||||||
//call center
|
//call center
|
||||||
$missed_call = 'false';
|
$missed_call = 'false';
|
||||||
}
|
}
|
||||||
elseif (isset($xml->variables->cc_side)
|
if (isset($xml->variables->cc_side) && $xml->variables->cc_side == 'member'
|
||||||
&& $xml->variables->cc_side == 'member'
|
&& isset($xml->variables->cc_cause) && $xml->variables->cc_cause == 'cancel') {
|
||||||
&& isset($xml->variables->cc_cause)
|
|
||||||
&& $xml->variables->cc_cause == 'cancel') {
|
|
||||||
//call center
|
//call center
|
||||||
$missed_call = 'true';
|
$missed_call = 'true';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user