Example #1
0
 if ($action == 'override') {
     # Send a SIP notify
     if (Aastra_is_user_registered_Asterisk($extension)) {
         if (Aastra_is_dynamic_sip_supported($ext_array[$extension]) or $ext_array[$extension]['model'] == 'Aastra8000i') {
             $notify_type = 'aastra-xml';
             $notify = Aastra_get_user_context($extension, 'notify');
             $notify['forced_logout'] = '1';
             Aastra_save_user_context($extension, 'notify', $notify);
         } else {
             Aastra_delete_mac($ext_array[$extension]['mac']);
             $notify_type = 'aastra-check-cfg';
         }
         Aastra_send_SIP_notify_Asterisk($notify_type, array($extension));
     } else {
         if ($ext_array[$extension]['model'] != 'Aastra8000i') {
             Aastra_delete_mac($ext_array[$extension]['mac']);
         }
     }
     # Send an email
     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);
Example #2
0
     for ($i = 1; $i <= $last; $i++) {
         $object->addEntry($XML_SERVER . '&action=configuration&page=' . $i);
     }
     $object->addEntry($array_config['action uri startup']);
     # Clear the critical keys
     Aastra_save_user_context($user, 'cfwd', NULL);
     Aastra_save_user_context($user, 'dnd', NULL);
     Aastra_save_user_context($user, 'daynight', NULL);
     Aastra_save_user_context($user, 'away', NULL);
     Aastra_save_user_context($user, 'agent', NULL);
     Aastra_save_user_context($user, 'follow', NULL);
     Aastra_save_user_context($user, 'parking', NULL);
     Aastra_save_user_context($user, 'vmail', NULL);
 } else {
     # Erase mac.cfg
     Aastra_delete_mac($header['mac']);
     # Reboot needed
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     # Bug 673i
     if ($header['model'] != 'Aastra6739i') {
         $object->addEntry($XML_SERVER . '&action=display');
     } else {
         $object->setTriggerDestroyOnExit();
     }
     if (Aastra_is_local_reset_supported() and $header['model'] != 'Aastra6739i') {
         $object->addEntry('Command: ClearCallersList');
         $object->addEntry('Command: ClearDirectory');
         $object->addEntry('Command: ClearRedialList');
         $object->addEntry('Command: ClearLocal');
     } else {