Beispiel #1
0
 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) {
         $last++;
     }
     # 3.2.1 bug double all the configuration messages
Beispiel #2
0
             } else {
                 $object->addEntry('Command: Reset');
             }
         }
     }
     # 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, '');
     }
Beispiel #3
0
             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':
     # Display user message
     if (Aastra_is_formattedtextscreen_supported()) {
         require_once 'AastraIPPhoneFormattedTextScreen.class.php';
Beispiel #4
0
     # Default is Current status
 # Default is Current status
 case 'main':
     # Authenticate user
     Aastra_check_signature_Asterisk($user);
     # Retrieve personal numbers
     $array_user = Aastra_manage_userinfo_Asterisk($user, 'get');
     $change = 'change';
     foreach ($array_user as $key => $value) {
         if ($value != '') {
             $change = 'select';
         }
         break;
     }
     # Retrieve current status
     $cf = Aastra_manage_cf_Asterisk($user, $action, $value);
     # Softkeys?
     if ($nb_softkeys) {
         # Textscreen for softkey phones
         require_once 'AastraIPPhoneTextScreen.class.php';
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         $object->setTitle(sprintf(Aastra_get_label('Call Forward for %s', $language), Aastra_get_userdevice_Asterisk($user)));
         if ($cf == '') {
             $object->setText(Aastra_get_label('Call Forward is currently deactivated.', $language));
             $object->addSoftkey('1', Aastra_get_label('Activate', $language), $XML_SERVER . '&action=' . $change);
         } else {
             $array_user = array_flip($array_user);
             $text = sprintf(Aastra_get_label('Call Forward is currently set to %s', $language), $cf);
             if ($array_user[$cf] != '') {
                 $array_label = array('cell' => Aastra_get_label('Cell', $language), 'home' => Aastra_get_label('Home', $language), 'other' => Aastra_get_label('Other', $language));