Update content.php (#5427)
Add "call on hold" state to panel. If a call is placed on hold it will have an orange overlay.
This commit is contained in:
@@ -189,12 +189,18 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
|||||||
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
}
|
}
|
||||||
|
else if ($ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
|
||||||
|
$ext_state = 'held';
|
||||||
|
}
|
||||||
else if ($ext['callstate'] == 'RING_WAIT' && $ext['direction'] == 'outbound') {
|
else if ($ext['callstate'] == 'RING_WAIT' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'ringing';
|
$ext_state = 'ringing';
|
||||||
}
|
}
|
||||||
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'inbound') {
|
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'inbound') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
}
|
}
|
||||||
|
else if ($ext['callstate'] == 'HELD' && $ext['direction'] == 'inbound') {
|
||||||
|
$ext_state = 'held';
|
||||||
|
}
|
||||||
if (!$format_number) {
|
if (!$format_number) {
|
||||||
$call_name = 'System';
|
$call_name = 'System';
|
||||||
$call_number = $ext['dest'];
|
$call_number = $ext['dest'];
|
||||||
@@ -227,6 +233,12 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
|||||||
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
}
|
}
|
||||||
|
else if ($ext['state'] == 'CS_CONSUME_MEDIA' && $ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
|
||||||
|
$ext_state = 'held';
|
||||||
|
}
|
||||||
|
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
|
||||||
|
$ext_state = 'held';
|
||||||
|
}
|
||||||
$dir_icon = 'inbound';
|
$dir_icon = 'inbound';
|
||||||
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
||||||
$call_number = format_phone($ext['cid_num']);
|
$call_number = format_phone($ext['cid_num']);
|
||||||
|
|||||||
Reference in New Issue
Block a user