コード例 #1
0
ファイル: follow.php プロジェクト: jamesrusso/Aastra_Scripts
     }
     break;
     # Update idle screen message status
 # Update idle screen message status
 case 'msg':
     # update screen message
     require_once 'AastraIPPhoneStatus.class.php';
     $object = new AastraIPPhoneStatus();
     $object->setSession('aastra-xml');
     $index = Aastra_get_status_index_Asterisk('follow');
     if ($value != '1') {
         $object->addEntry($index, '');
     } else {
         if (Aastra_is_status_uri_supported()) {
             $object->addEntry($index, Aastra_get_label('Follow-me activated', $language), '', NULL, $XML_SERVER . '&action=change_status2', 1);
             $object->addIcon('1', 'Icon:World');
         } else {
             $object->addEntry($index, Aastra_get_label('Follow-me activated', $language));
         }
     }
     break;
     # Select way to add external number
 # Select way to add external number
 case 'select_info':
     # Get Current value
     $fm = Aastra_manage_followme_Asterisk($user, 'get_all');
     # Retrieve personal numbers
     $array_user = Aastra_manage_userinfo_Asterisk($user, 'get');
     $array_user = array_flip($array_user);
     foreach ($fm['grplist'] as $i => $number) {
         if ($i < $MAX_NUMBERS) {
コード例 #2
0
ファイル: dnd.php プロジェクト: jamesrusso/Aastra_Scripts
$language = Aastra_get_language();
# Update callback
$XML_SERVER .= '?user='******'msg':
        # Update idle screen
        require_once 'AastraIPPhoneStatus.class.php';
        $object = new AastraIPPhoneStatus();
        $object->setSession('aastra-xml');
        $index = Aastra_get_status_index_Asterisk('dnd');
        if ($status == 1) {
            if (Aastra_is_status_uri_supported()) {
                $object->addEntry($index, Aastra_get_label('DND activated', $language), '', NULL, $XML_SERVER, 1);
                $object->addIcon('1', 'Icon:Prohibit');
            } else {
                $object->addEntry($index, Aastra_get_label('DND activated', $language));
            }
        } else {
            $object->addEntry($index, '');
        }
        break;
        # Switch On/Off
    # Switch On/Off
    case 'change':
        # Change DND status
        $dnd = Aastra_manage_dnd_Asterisk($user, 'change');
        # Prepare display update
        require_once 'AastraIPPhoneExecute.class.php';
        $object = new AastraIPPhoneExecute();
コード例 #3
0
ファイル: away.php プロジェクト: jamesrusso/Aastra_Scripts
     require_once 'AastraIPPhoneStatus.class.php';
     $object = new AastraIPPhoneStatus();
     $object->setSession('aastra-xml');
     $index = Aastra_get_status_index_Asterisk('away');
     if ($state == AA_PRESENCE_AVAILABLE) {
         $object->addEntry($index, '');
     } else {
         if (!$status_text[$state]) {
             $status = Aastra_get_label('Unknown', $language);
         } else {
             $status = $status_text[$state]['label'];
         }
         if (Aastra_size_display_line() > 16) {
             if (Aastra_is_status_uri_supported()) {
                 $object->addEntry($index, sprintf(Aastra_get_label('You are %s', $language), $status), '', NULL, $XML_SERVER . '&action=set_change&value1=0', 1);
                 $object->addIcon('1', 'Icon:PresenceAbsent');
             } else {
                 $object->addEntry($index, sprintf(Aastra_get_label('You are %s', $language), $status));
             }
         } else {
             $object->addEntry($index, $status);
         }
     }
     break;
     # Input default action
 # Input default action
 case 'input_prefs2':
     # Get current status
     $away = Aastra_manage_presence_Asterisk($user, 'action');
     # Retrieve personal numbers
     $array_user = Aastra_manage_userinfo_Asterisk($user, 'get');
コード例 #4
0
ファイル: cfwd.php プロジェクト: jamesrusso/Aastra_Scripts
     $object->setCancelAction($XML_SERVER . '&action=info&type=' . $type);
     break;
     # Update idle screen message status
 # Update idle screen message status
 case 'msg':
     # Update screen message
     require_once 'AastraIPPhoneStatus.class.php';
     $object = new AastraIPPhoneStatus();
     $object->setSession('aastra-xml');
     $index = Aastra_get_status_index_Asterisk('cfwd');
     if ($value == '') {
         $object->addEntry($index, '');
     } else {
         if (Aastra_is_status_uri_supported()) {
             $object->addEntry($index, Aastra_get_label('CFWD activated', $language), '', NULL, $XML_SERVER . '&action=cancel2', 1);
             $object->addIcon('1', 'Icon:CallFailed');
         } else {
             $object->addEntry($index, Aastra_get_label('CFWD activated', $language));
         }
     }
     break;
     # User information
 # User information
 case 'info':
     # Retrieve stored data
     $array_user = Aastra_manage_userinfo_Asterisk($user, 'get');
     # All indexes
     $array_index = array('cell' => array('1', Aastra_get_label('(M)', $language), '1'), 'home' => array('2', Aastra_get_label('(H)', $language), '2'), 'other' => array('3', Aastra_get_label('(O)', $language), '3'));
     # Personal phone numbers
     require_once 'AastraIPPhoneTextMenu.class.php';
     $object = new AastraIPPhoneTextMenu();