Call Summary fix voicemails name and extra row
This commit is contained in:
parent
d5f39cf0b2
commit
a35de4aba3
|
|
@ -34,7 +34,7 @@
|
||||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||||
$apps[$x]['destinations'][$y]['label'] = "voicemails";
|
$apps[$x]['destinations'][$y]['label'] = "voicemails";
|
||||||
$apps[$x]['destinations'][$y]['name'] = "voicemails";
|
$apps[$x]['destinations'][$y]['name'] = "voicemails";
|
||||||
$apps[$x]['destinations'][$y]['sql'] = "select voicemail_uuid, voicemail_uuid as uuid, voicemail_id as destination, '*99' || voicemail_id as extension, voicemail_description as description from v_voicemails";
|
$apps[$x]['destinations'][$y]['sql'] = "select voicemail_uuid, voicemail_uuid as uuid, voicemail_id as destination, '*99' || voicemail_id as extension, voicemail_description as description, voicemail_description as name from v_voicemails";
|
||||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and voicemail_enabled = 'true' ";
|
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and voicemail_enabled = 'true' ";
|
||||||
$apps[$x]['destinations'][$y]['order_by'] = "voicemail_id asc ";
|
$apps[$x]['destinations'][$y]['order_by'] = "voicemail_id asc ";
|
||||||
$apps[$x]['destinations'][$y]['field']['uuid'] = "voicemail_uuid";
|
$apps[$x]['destinations'][$y]['field']['uuid'] = "voicemail_uuid";
|
||||||
|
|
|
||||||
|
|
@ -243,9 +243,16 @@
|
||||||
$array["callflow"] = array_reverse($array["callflow"]);
|
$array["callflow"] = array_reverse($array["callflow"]);
|
||||||
|
|
||||||
//add the final call flow destination to the call flow array
|
//add the final call flow destination to the call flow array
|
||||||
if ($call_direction == 'inbound' || $call_direction == 'local') {
|
//when call_direction is inbound
|
||||||
|
//when destination_number is not same as the last row
|
||||||
|
//when last destination is not voicemail *99ext
|
||||||
|
//count the array $i-1 finds the last record
|
||||||
|
//count the array $i is the next record
|
||||||
|
if ($call_direction == 'inbound') {
|
||||||
$i = count($array["callflow"]);
|
$i = count($array["callflow"]);
|
||||||
if (!empty($array["callflow"]) && $array["callflow"][$i-1]["destination_number"] != $destination_number) {
|
if (!empty($array["callflow"])
|
||||||
|
&& $array["callflow"][$i-1]["destination_number"] != $destination_number
|
||||||
|
&& substr($array["callflow"][$i-1]["caller_profile"]["destination_number"], 0, 3) != '*99') {
|
||||||
$array["callflow"][$i]["caller_profile"]["destination_number"] = $destination_number;
|
$array["callflow"][$i]["caller_profile"]["destination_number"] = $destination_number;
|
||||||
$array["callflow"][$i]["caller_profile"]["network_addr"] = $network_address;
|
$array["callflow"][$i]["caller_profile"]["network_addr"] = $network_address;
|
||||||
$array["callflow"][$i]["caller_profile"]["caller_id_name"] = $caller_id_name;
|
$array["callflow"][$i]["caller_profile"]["caller_id_name"] = $caller_id_name;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue