Aastra_send_HDmail($ext_array[$extension], $callerid, 'FORCED LOGOUT', $AA_EMAIL, $AA_SENDER); } # Update config file Aastra_update_HDconfig_file(AASTRA_PATH_CACHE . 'startup_asterisk.cfg', $extension, $header); # Save signature Aastra_store_signature($extension); # Send an email Aastra_send_HDmail($header, $callerid . ' ' . $extension, 'LOGIN', $AA_EMAIL, $AA_SENDER); # Set status to Available if ($AA_FREEPBX_MODE == '1' and $AA_PRESENCE_STATE) { if (Aastra_manage_presence_Asterisk($extension, 'status') == AA_PRESENCE_DISCONNECTED) { Aastra_manage_presence_Asterisk($extension, 'set', 'status', AA_PRESENCE_AVAILABLE); $away = Aastra_manage_presence_Asterisk($extension, 'action'); switch ($away['action'][AA_PRESENCE_DISCONNECTED]) { case AA_PRESENCE_ACT_FM: Aastra_manage_followme_Asterisk($extension, 'disable'); break; case AA_PRESENCE_ACT_CFWD: Aastra_manage_cf_Asterisk($extension, 'cancel'); break; } } } # Depending on dynamic SIP if (Aastra_is_dynamic_sip_supported()) { # Read MAC.cfg $array_temp = Aastra_readCFGfile(AASTRA_TFTP_DIRECTORY . '/' . $header['mac'] . '.cfg', '#', ':'); $array_temp['']['sip line1 password'] = preg_replace('/"/', '', $array_temp['']['sip line1 password']); # How many pages? $last = intval(count($array_temp['']) / AASTRA_MAXCONFIGURATIONS); if (count($array_temp['']) - $last * AASTRA_MAXCONFIGURATIONS != 0) {
$object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('1', Aastra_get_label('Clear', $language), $XML_SERVER . '&action=clear_info'); $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); $object->setCancelAction($XML_SERVER); } } break; # Default is Current status # Default is Current status case 'main': # Authenticate user Aastra_check_signature_Asterisk($user); # Display current status $array_fm = Aastra_manage_followme_Asterisk($user, 'get_all'); # Check if configured if ($array_fm['status'] == '2') { # Error: Not configured require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('Follow-me', $language)); $object->setText(Aastra_get_label('This feature is not configured for your phone. Please contact your administrator.', $language)); if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } }
$vmail_options = Aastra_get_user_context($user, 'vmail-options'); if ($vmail_options['auto_answer'] == '') { $vmail_options['auto_answer'] = '1'; Aastra_save_user_context($ext, 'vmail-options', $vmail_options); } if ($vmail_options['auto_answer'] == '1') { Aastra_originate_Asterisk('Local/' . Aastra_get_userdevice_Asterisk($user) . '@from-internal', 's', 'record-temp-vm', 1, '', Aastra_get_label('RecordTemporary', $language) . ' <0>', array('_USER='******'_ALERT_INFO=info=alert-autoanswer')); } else { Aastra_originate_Asterisk('Local/' . Aastra_get_userdevice_Asterisk($user) . '@from-internal', 's', 'record-temp-vm', 1, '', Aastra_get_label('RecordTemporary', $language) . ' <0>', array('_USER='******'enable'); } if ($follow == 1) { Aastra_manage_followme_Asterisk($user, 'enable'); } if ($cfwd != '') { Aastra_manage_cf_Asterisk($user, 'set', $cfwd); } } else { # Save session $array = array('uri_onhook' => $XML_SERVER, 'user' => $user, 'type' => 'temp', 'action' => 'record'); Aastra_save_session('vmail', '600', $array, $user); # Dial special number $object->addEntry('Dial:vmail'); } break; # Display # Display case 'display_back':