Track Voicemail Message Success/Failure in CDR
Track whether or not a message was actually left in the voicemail box. Previously we only knew that voicemail answered, now we know whether the caller left a message. Callers who didn't leave a message now show up in the "Cancelled" call filter in xml_cdr.php Bonus: Fixed a bug with the originating_leg_uuid that was breaking extension summary from a previous commit and some other minor bugs/typos.
This commit is contained in:
@@ -417,7 +417,7 @@
|
||||
$sql .= "and hangup_cause like :hangup_cause ";
|
||||
$parameters['hangup_cause'] = '%'.$hangup_cause.'%';
|
||||
}
|
||||
elseif (!permission_exists('xml_cdr_lose_race') && permission_exists('xml_cdr_enterprise_leg')) {
|
||||
elseif (!permission_exists('xml_cdr_lose_race') && !permission_exists('xml_cdr_enterprise_leg')) {
|
||||
$sql .= "and hangup_cause != 'LOSE_RACE' ";
|
||||
}
|
||||
//exclude enterprise ring group legs
|
||||
@@ -437,10 +437,20 @@
|
||||
break;
|
||||
case 'cancelled':
|
||||
if ($direction == 'inbound' || $direction == 'local' || $call_result == 'missed') {
|
||||
$sql = "and (answer_stamp is null and bridge_uuid is null and sip_hangup_disposition <> 'send_refuse') ";
|
||||
$sql .= "
|
||||
and ((
|
||||
answer_stamp is null
|
||||
and bridge_uuid is null
|
||||
and sip_hangup_disposition <> 'send_refuse'
|
||||
)
|
||||
or (
|
||||
answer_stamp is not null
|
||||
and bridge_uuid is null
|
||||
and voicemail_message = false
|
||||
))";
|
||||
}
|
||||
else if ($direction == 'outbound') {
|
||||
$sql = "and (answer_stamp is null and bridge_uuid is not null) ";
|
||||
$sql .= "and (answer_stamp is null and bridge_uuid is not null) ";
|
||||
}
|
||||
else {
|
||||
$sql .= "
|
||||
@@ -454,6 +464,12 @@
|
||||
direction = 'outbound'
|
||||
and answer_stamp is null
|
||||
and bridge_uuid is not null
|
||||
)
|
||||
or (
|
||||
(direction = 'inbound' or direction = 'local')
|
||||
and answer_stamp is not null
|
||||
and bridge_uuid is null
|
||||
and voicemail_message = false
|
||||
))";
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user