Exemplo n.º 1
0
             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);
         $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');
Exemplo n.º 2
0
     # Bug 3.2.1 send all the configuration twice
     $page = intval(($page - 1) / 2) + 1;
     foreach ($array_config as $key => $value) {
         if ($index >= ($page - 1) * AASTRA_MAXCONFIGURATIONS + 1 and $index <= $page * AASTRA_MAXCONFIGURATIONS) {
             $object->addEntry($key, $value);
         }
         $index++;
     }
     break;
     # Logout
 # Logout
 case 'logout':
 case 'forced_logout':
     # Update config file
     if ($action == 'logout') {
         Aastra_update_HDconfig_file(AASTRA_PATH_CACHE . 'startup_asterisk.cfg', $user);
     }
     # Remove from Parking list
     Aastra_remove_parking_Asterisk($user);
     # Remove from VM List
     $count = !Aastra_is_ledcontrol_supported();
     Aastra_remove_vmail_Asterisk('', $user, $count);
     # Retrieve Caller ID
     $callerid = Aastra_get_callerid_Asterisk($user);
     # Send an email
     Aastra_send_HDmail($header, $callerid . ' ' . $user, 'LOGOUT', $AA_EMAIL, $AA_SENDER);
     # Compute what to do
     $test = False;
     if ($header['model'] == 'Aastra6739i') {
         if (Aastra_test_phone_version('3.2.0.', 1, $header) == 0) {
             $test = True;