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:
Stephen Forster
2020-08-28 01:58:35 +02:00
committed by GitHub
parent cd4f709a20
commit 1a18863b2a

View File

@@ -189,12 +189,18 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
$ext_state = 'active';
}
else if ($ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
$ext_state = 'held';
}
else if ($ext['callstate'] == 'RING_WAIT' && $ext['direction'] == 'outbound') {
$ext_state = 'ringing';
}
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'inbound') {
$ext_state = 'active';
}
else if ($ext['callstate'] == 'HELD' && $ext['direction'] == 'inbound') {
$ext_state = 'held';
}
if (!$format_number) {
$call_name = 'System';
$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') {
$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';
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
$call_number = format_phone($ext['cid_num']);