case 'msg': # Update idle screen require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); $status_index = Aastra_get_status_index_Asterisk('daynight_' . $index); if ($status == 1) { if ($array_config_daynight[$index]['label_night'] != '') { $display = sprintf($array_config_daynight[$index]['label_night'], $index, Aastra_get_daynight_name_Asterisk($index)); } else { $display = sprintf(Aastra_get_label('Night Mode (%d)', $language), $index); } } else { $display = ''; } $object->addEntry($status_index, $display); break; # Key label # Key label case 'label': # Retrieve key $data = Aastra_get_user_context($user, 'daynight'); $key = $data['key'][$index]; # Update key label require_once 'AastraIPPhoneConfiguration.class.php'; $object = new AastraIPPhoneConfiguration(); if ($status == 1) { $object->addEntry($key . ' label', Aastra_get_label('Day Mode', $language)); } else { $object->addEntry($key . ' label', Aastra_get_label('Night Mode', $language)); }
$temp = $fm['grplist'][$selection]; $fm['grplist'][$selection] = $fm['grplist'][$selection + 1]; $fm['grplist'][$selection + 1] = $temp; Aastra_manage_followme_Asterisk($user, 'set_grplist', $fm['grplist']); } break; # Update idle screen message status # Update idle screen message status case 'msg': # update screen message require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); $index = Aastra_get_status_index_Asterisk('follow'); if ($value != '1') { $object->addEntry($index, ''); } else { if (Aastra_is_status_uri_supported()) { $object->addEntry($index, Aastra_get_label('Follow-me activated', $language), '', NULL, $XML_SERVER . '&action=change_status2', 1); $object->addIcon('1', 'Icon:World'); } else { $object->addEntry($index, Aastra_get_label('Follow-me activated', $language)); } } break; # Select way to add external number # Select way to add external number case 'select_info': # Get Current value $fm = Aastra_manage_followme_Asterisk($user, 'get_all'); # Retrieve personal numbers
# Set status to Disconnected if ($AA_PRESENCE_STATE and $action != 'forced_logout' and !$AA_ISYMPHONY) { if (Aastra_manage_presence_Asterisk($user, 'status') == AA_PRESENCE_AVAILABLE) { Aastra_manage_presence_Asterisk($user, 'set', 'status', AA_PRESENCE_DISCONNECTED); $away = Aastra_manage_presence_Asterisk($user, 'action'); switch ($away['action'][AA_PRESENCE_DISCONNECTED]) { case AA_PRESENCE_ACT_FM: Aastra_manage_followme_Asterisk($user, 'enable'); break; case AA_PRESENCE_ACT_CFWD: Aastra_manage_cf_Asterisk($user, 'set', $away['act_param'][AA_PRESENCE_DISCONNECTED]); break; } } } break; # Purge Message status # Purge Message status case 'purge_msg': require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); $array = Aastra_get_status_index_Asterisk(''); foreach ($array as $key => $value) { $object->addEntry($key, ''); } break; } # Display XML Object $object->output(); exit;
$object->setDefault($default_time); $object->setURL($XML_SERVER . '&action=set_date_time&value1=' . $value1); $object->setCancelAction($XML_SERVER . '&action=set_date_time&value1=' . $value1); } } break; # Update idle screen message status # Update idle screen message status case 'msg': # update screen message require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); $index = Aastra_get_status_index_Asterisk('away'); if ($state == AA_PRESENCE_AVAILABLE) { $object->addEntry($index, ''); } else { if (!$status_text[$state]) { $status = Aastra_get_label('Unknown', $language); } else { $status = $status_text[$state]['label']; } if (Aastra_size_display_line() > 16) { if (Aastra_is_status_uri_supported()) { $object->addEntry($index, sprintf(Aastra_get_label('You are %s', $language), $status), '', NULL, $XML_SERVER . '&action=set_change&value1=0', 1); $object->addIcon('1', 'Icon:PresenceAbsent'); } else { $object->addEntry($index, sprintf(Aastra_get_label('You are %s', $language), $status)); } } else { $object->addEntry($index, $status);
# Get language $language = Aastra_get_language(); # Update callback $XML_SERVER .= '?user='******'msg': # Update idle screen require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); $index = Aastra_get_status_index_Asterisk('dnd'); if ($status == 1) { if (Aastra_is_status_uri_supported()) { $object->addEntry($index, Aastra_get_label('DND activated', $language), '', NULL, $XML_SERVER, 1); $object->addIcon('1', 'Icon:Prohibit'); } else { $object->addEntry($index, Aastra_get_label('DND activated', $language)); } } else { $object->addEntry($index, ''); } break; # Switch On/Off # Switch On/Off case 'change': # Change DND status $dnd = Aastra_manage_dnd_Asterisk($user, 'change'); # Prepare display update require_once 'AastraIPPhoneExecute.class.php';
$object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=info&type=' . $type); } } # Cancel Action (back) $object->setCancelAction($XML_SERVER . '&action=info&type=' . $type); break; # Update idle screen message status # Update idle screen message status case 'msg': # Update screen message require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); $index = Aastra_get_status_index_Asterisk('cfwd'); if ($value == '') { $object->addEntry($index, ''); } else { if (Aastra_is_status_uri_supported()) { $object->addEntry($index, Aastra_get_label('CFWD activated', $language), '', NULL, $XML_SERVER . '&action=cancel2', 1); $object->addIcon('1', 'Icon:CallFailed'); } else { $object->addEntry($index, Aastra_get_label('CFWD activated', $language)); } } break; # User information # User information case 'info': # Retrieve stored data $array_user = Aastra_manage_userinfo_Asterisk($user, 'get'); # All indexes
$ftext->addLine('Formatted Screen', 'double', 'center', 'red'); $ftext->setScrollStart(); $ftext->addLine('Scrolled text1'); $ftext->addLine('Scrolled text2'); $ftext->addLine('Scrolled text3'); $ftext->addLine('Scrolled text4'); $ftext->addLine('Scrolled text5'); $ftext->setScrollEnd(); $ftext->addLine('Footer', NULL, 'center'); $ftext->addSoftkey('10', 'Exit', 'SoftKey:Exit'); $ftext->output(); break; case 'status1': require_once 'AastraIPPhoneStatus.class.php'; $status = new AastraIPPhoneStatus(); $status->setTriggerDestroyOnExit(); $status->setSession('Session'); $status->addEntry('1', 'Message 1'); $status->addEntry('2', 'Message 2'); $status->output(); break; case 'status2': require_once 'AastraIPPhoneStatus.class.php'; $status = new AastraIPPhoneStatus(); $status->setSession('Session'); $status->setTriggerDestroyOnExit(); $status->addEntry('1', ''); $status->addEntry('2', ''); $status->output(); break; }
} # Call parked? if ($found == 0 and $number != 'Paging' and $number != '') { # Translate user if needed $user = Aastra_get_userdevice_Asterisk($user); # Check if call has been parked $park = Aastra_check_park_Asterisk($user, $number); # Display orbit if ($park != '') { # Display current status require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('Park'); $object->setBeep(); if (Aastra_size_display_line() > 16) { $object->addEntry('1', sprintf(Aastra_get_label('Call Parked at %s', $language), $park), 'alert', 5); } else { $object->addEntry('1', sprintf(Aastra_get_label('Parked at %s', $language), $park), 'alert', 5); } # Bug 3.2.1 if (Aastra_test_phone_version('3.2.1.', '1') == 0) { sleep(4); } # End of search $found = 1; } } # No match whatsoever if ($found == 0) { require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute();
$object->AddEntry(''); } break; # UPDATE MSG # UPDATE MSG case 'msg': # Retrieve session $array = Aastra_read_session('key'); $temp = unserialize(base64_decode($array['keys'])); # Update configuration if (count($temp[2]) != 0) { require_once 'AastraIPPhoneStatus.class.php'; $object = new AastraIPPhoneStatus(); $object->setSession('aastra-xml'); foreach ($temp[2] as $value) { $object->addEntry(Aastra_get_status_index_Asterisk($value), ''); } } else { require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute(); $object->AddEntry(''); } break; # DO NOTHING # DO NOTHING case 'nothing': # Do Nothing require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute(); $object->setBeep(); $object->AddEntry('');