From 4de4bb89f4a5b46060f55c5130a19f701d399e89 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Mon, 28 Dec 2015 15:48:18 +0300 Subject: [PATCH] Fix. Do not cast dialed number to int in `Operator Panel` app. This make problems with numbers starting with `0` e.g. (001) Also this makes problem with too long numbers which does not fit to int type. --- app/operator_panel/index_inc.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/operator_panel/index_inc.php b/app/operator_panel/index_inc.php index e28c3f4425..2c58342155 100644 --- a/app/operator_panel/index_inc.php +++ b/app/operator_panel/index_inc.php @@ -173,8 +173,8 @@ foreach ($activity as $extension => $ext) { $call_number = $ext['dest']; } else { - $call_name = $activity[(int) $ext['dest']]['effective_caller_id_name']; - $call_number = format_phone((int) $ext['dest']); + $call_name = $activity[$ext['dest']]['effective_caller_id_name']; + $call_number = format_phone($ext['dest']); } $dir_icon = 'outbound'; } @@ -182,13 +182,13 @@ foreach ($activity as $extension => $ext) { if ($ext['callstate'] == 'ACTIVE') { $ext_state = 'active'; if ($ext['direction'] == 'inbound') { - $call_name = $activity[(int) $ext['dest']]['effective_caller_id_name']; - $call_number = format_phone((int) $ext['dest']); + $call_name = $activity[$ext['dest']]['effective_caller_id_name']; + $call_number = format_phone($ext['dest']); $dir_icon = 'outbound'; } else if ($ext['direction'] == 'outbound') { - $call_name = $activity[(int) $ext['cid_num']]['effective_caller_id_name']; - $call_number = format_phone((int) $ext['cid_num']); + $call_name = $activity[$ext['cid_num']]['effective_caller_id_name']; + $call_number = format_phone($ext['cid_num']); $dir_icon = 'inbound'; } } @@ -201,8 +201,8 @@ foreach ($activity as $extension => $ext) { $ext_state = 'active'; } $dir_icon = 'inbound'; - $call_name = $activity[(int) $ext['cid_num']]['effective_caller_id_name']; - $call_number = format_phone((int) $ext['cid_num']); + $call_name = $activity[$ext['cid_num']]['effective_caller_id_name']; + $call_number = format_phone($ext['cid_num']); } else { unset($ext_state, $dir_icon, $call_name, $call_number);