Add additional error handling
This commit is contained in:
@@ -1058,7 +1058,9 @@ if (!class_exists('xml_cdr')) {
|
|||||||
if (!empty($call_flow_array)) {
|
if (!empty($call_flow_array)) {
|
||||||
foreach ($call_flow_array as $row) {
|
foreach ($call_flow_array as $row) {
|
||||||
//get the application array
|
//get the application array
|
||||||
$app = find_app($destination_array, urldecode($row["caller_profile"]["destination_number"]));
|
if (!empty($destination_array) && !empty($row["caller_profile"]["destination_number"])) {
|
||||||
|
$app = find_app($destination_array, urldecode($row["caller_profile"]["destination_number"]));
|
||||||
|
}
|
||||||
|
|
||||||
//call centers
|
//call centers
|
||||||
if ($app['application'] == 'call_centers') {
|
if ($app['application'] == 'call_centers') {
|
||||||
@@ -1110,9 +1112,11 @@ if (!class_exists('xml_cdr')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//valet park
|
//valet park
|
||||||
if (substr($row["caller_profile"]["destination_number"], 0, 4) == 'park'
|
if (!empty($row["caller_profile"]["destination_number"])
|
||||||
or (substr($row["caller_profile"]["destination_number"], 0, 3) == '*59'
|
&& (substr($row["caller_profile"]["destination_number"], 0, 4) == 'park'
|
||||||
&& strlen($row["caller_profile"]["destination_number"]) == 5)) {
|
or (substr($row["caller_profile"]["destination_number"], 0, 3) == '*59'
|
||||||
|
&& strlen($row["caller_profile"]["destination_number"]) == 5))
|
||||||
|
) {
|
||||||
|
|
||||||
//add items to the app array
|
//add items to the app array
|
||||||
$app['application'] = 'dialplans';
|
$app['application'] = 'dialplans';
|
||||||
@@ -1123,12 +1127,12 @@ if (!class_exists('xml_cdr')) {
|
|||||||
//set the call park status
|
//set the call park status
|
||||||
if (strpos($row["caller_profile"]["transfer_source"], 'park+') !== false) {
|
if (strpos($row["caller_profile"]["transfer_source"], 'park+') !== false) {
|
||||||
//$app['status'] = 'In '.$row["caller_profile"]["callee_id_name"].' '.$row["caller_profile"]["callee_id_number"];
|
//$app['status'] = 'In '.$row["caller_profile"]["callee_id_name"].' '.$row["caller_profile"]["callee_id_number"];
|
||||||
$app['status'] = 'In ('.$row["caller_profile"]["callee_id_number"].')';
|
$app['status'] = 'In '.$row["caller_profile"]["callee_id_number"];
|
||||||
//$app['status'] = 'In';
|
//$app['status'] = 'In';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//$app['status'] = 'Out '.$row["caller_profile"]["callee_id_name"].' '.$row["caller_profile"]["callee_id_number"];
|
//$app['status'] = 'Out '.$row["caller_profile"]["callee_id_name"].' '.$row["caller_profile"]["callee_id_number"];
|
||||||
$app['status'] = 'Out ('.$row["caller_profile"]["callee_id_number"].')';
|
$app['status'] = 'Out '.$row["caller_profile"]["callee_id_number"];
|
||||||
//$app['status'] = 'Out';
|
//$app['status'] = 'Out';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user