Fix the status voicemail
Moved voicemail status after missed calls. This way, it will show the status of voicemail when it goes to voicemail. There is still a field in the CDR for missed_call, and this will still be set to true for calls that go to voicemail.
This commit is contained in:
parent
5fbc6dcc03
commit
0fd4f8ba00
|
|
@ -583,12 +583,6 @@ if (!class_exists('xml_cdr')) {
|
||||||
if ($xml->variables->hangup_cause == 'NO_ANSWER') {
|
if ($xml->variables->hangup_cause == 'NO_ANSWER') {
|
||||||
$status = 'no_answer';
|
$status = 'no_answer';
|
||||||
}
|
}
|
||||||
if (substr($destination_number, 0, 3) == '*99') {
|
|
||||||
$status = 'voicemail';
|
|
||||||
}
|
|
||||||
if (isset($xml->variables->voicemail_message_seconds) && $xml->variables->voicemail_message_seconds > 0) {
|
|
||||||
$status = 'voicemail';
|
|
||||||
}
|
|
||||||
if ($xml->variables->hangup_cause == 'ORIGINATOR_CANCEL') {
|
if ($xml->variables->hangup_cause == 'ORIGINATOR_CANCEL') {
|
||||||
$status = 'cancelled';
|
$status = 'cancelled';
|
||||||
}
|
}
|
||||||
|
|
@ -604,12 +598,18 @@ if (!class_exists('xml_cdr')) {
|
||||||
if ($xml->variables->cc_side == 'agent' && $xml->variables->billsec == 0) {
|
if ($xml->variables->cc_side == 'agent' && $xml->variables->billsec == 0) {
|
||||||
$status = 'no_answer';
|
$status = 'no_answer';
|
||||||
}
|
}
|
||||||
if (!isset($status) && $xml->variables->billsec == 0) {
|
if (!isset($status) && $xml->variables->billsec == 0) {
|
||||||
$status = 'no_answer';
|
$status = 'no_answer';
|
||||||
}
|
}
|
||||||
if ($missed_call == 'true') {
|
if ($missed_call == 'true') {
|
||||||
$status = 'missed';
|
$status = 'missed';
|
||||||
}
|
}
|
||||||
|
if (substr($destination_number, 0, 3) == '*99') {
|
||||||
|
$status = 'voicemail';
|
||||||
|
}
|
||||||
|
if (!empty($xml->variables->voicemail_message_seconds)) {
|
||||||
|
$status = 'voicemail';
|
||||||
|
}
|
||||||
|
|
||||||
//set the key
|
//set the key
|
||||||
$key = 'xml_cdr';
|
$key = 'xml_cdr';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue