コード例 #1
0
     # Display text
     require_once 'AastraIPPhoneTextScreen.class.php';
     $object = new AastraIPPhoneTextScreen();
     $object->setDestroyOnExit();
     $object->setTitle(Aastra_get_label('Notification Set', $language));
     $object->setText(sprintf(Aastra_get_label('You will be notified when %s returns.', $language), Aastra_get_callerid_Asterisk($selection)));
     # Softkey
     $object->addSoftkey('10', Aastra_get_label('Close', $language), $XML_SERVER . '&action=zoom&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection, 1);
     $object->addIcon(1, 'Icon:CircleRed');
     $object->setCancelAction($XML_SERVER . '&action=zoom&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection);
     break;
     # Unnotify
 # Unnotify
 case 'unnotify':
     # Add the user to the list
     Aastra_manage_presence_Asterisk($selection, 'unset', 'notify', $user);
     # Display text
     require_once 'AastraIPPhoneTextScreen.class.php';
     $object = new AastraIPPhoneTextScreen();
     $object->setDestroyOnExit();
     $object->setTitle(Aastra_get_label('Notification Cancelled', $language));
     $object->setText(sprintf(Aastra_get_label('You will NOT ANYMORE be notified when %s returns.', $language), Aastra_get_callerid_Asterisk($selection)));
     # Softkey
     $object->addSoftkey('10', Aastra_get_label('Close', $language), $XML_SERVER . '&action=zoom&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection, 1);
     $object->addIcon(1, 'Icon:CircleRed');
     $object->setCancelAction($XML_SERVER . '&action=zoom&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection);
     break;
     # Display directory
 # Display directory
 case 'list':
     # Get list of users
コード例 #2
0
ファイル: startup.php プロジェクト: jamesrusso/Aastra_Scripts
         }
     }
     # 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');
                 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']);
コード例 #3
0
ファイル: logout.php プロジェクト: jamesrusso/Aastra_Scripts
             $object->addEntry('Command: ClearDirectory');
             $object->addEntry('Command: ClearRedialList');
             $object->addEntry('Command: ClearLocal');
         } else {
             if (Aastra_is_fastreboot_supported()) {
                 $object->AddEntry('Command: FastReboot');
             } 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';
コード例 #4
0
ファイル: away.php プロジェクト: jamesrusso/Aastra_Scripts
             $object->addSoftkey('1', Aastra_get_label('Select', $language), 'SoftKey:Select');
             $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=input_prefs2&state=' . $state);
             $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=input_prefs2&state=' . $state);
             $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         }
     }
     # Cancel action
     $object->setCancelAction($XML_SERVER . '&action=input_prefs2&state=' . $state);
     break;
     # Record Temp message
 # Record Temp message
 case 'rec_msg':
     # Get current status
     $away = Aastra_manage_presence_Asterisk($user, 'get');
     # Next step
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     # Test if phone can dial
     if (!Aastra_is_dialuri_supported()) {
         # No display change
         $object->addEntry('');
         $object->output(True);
         # Disable DND if needed
         $dnd = Aastra_manage_dnd_Asterisk($user, 'get');
         if ($away['action'][$away['status']] == AA_PRESENCE_ACT_DND or $dnd == 1) {
             $dnd = 1;
             Aastra_manage_dnd_Asterisk($user, 'disable');
         }
         # Disable Follow-me if needed
コード例 #5
0
                 }
                 $object->addLine($value[0]);
                 $index++;
             }
             $object->setScrollEnd();
         }
     }
 } else {
     # Use a TextScreen
     require_once 'AastraIPPhoneTextScreen.class.php';
     $object = new AastraIPPhoneTextScreen();
     # Internal call
     if ($callerid_type == 'internal') {
         # Presence enabled
         if ($AA_PRESENCE_STATE) {
             $away = Aastra_manage_presence_Asterisk($number, 'get', 'status');
             $object->setTitle($callerid);
             $object->setText('Ext.' . $number);
             if ($away['status'] != AA_PRESENCE_AVAILABLE) {
                 $line = Aastra_format_presence_dt_Asterisk($away['return']);
                 $dt = $line[0];
                 if ($line[1] != '') {
                     $dt .= ' ' . $line[1];
                 }
                 $text = sprintf(Aastra_get_label('Currently %s. %s.', $language), $status_text[$away['status']]['label'], $dt);
             } else {
                 $text = sprintf(Aastra_get_label('Currently %s.', $language), $status_text[$away['status']]['label']);
             }
             $object->setText($text);
         } else {
             $object->setTitle($callerid);