コード例 #1
0
         $object->setDestroyOnExit();
         if ($status == 1) {
             $object->setTitle(sprintf(Aastra_get_label('Night Mode (%d)', $language), $index));
         } else {
             $object->setTitle(sprintf(Aastra_get_label('Day Mode (%d)', $language), $index));
         }
         $object->setText(Aastra_get_label('Activated', $language));
         $object->addSoftKey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     }
     break;
     # Idle screen message
 # Idle screen message
 case 'msg':
     # Update idle screen
     require_once 'AastraIPPhoneStatus.class.php';
     $object = new AastraIPPhoneStatus();
     $object->setSession('aastra-xml');
     $status_index = Aastra_get_status_index_Asterisk('daynight_' . $index);
     if ($status == 1) {
         if ($array_config_daynight[$index]['label_night'] != '') {
             $display = sprintf($array_config_daynight[$index]['label_night'], $index, Aastra_get_daynight_name_Asterisk($index));
         } else {
             $display = sprintf(Aastra_get_label('Night Mode (%d)', $language), $index);
         }
     } else {
         $display = '';
     }
     $object->addEntry($status_index, $display);
     break;
     # Key label
 # Key label
コード例 #2
0
ファイル: follow.php プロジェクト: jamesrusso/Aastra_Scripts
     if ($selection == count($fm['grplist']) - 1) {
         $object->setBeep();
     } else {
         # Move down the element
         $temp = $fm['grplist'][$selection];
         $fm['grplist'][$selection] = $fm['grplist'][$selection + 1];
         $fm['grplist'][$selection + 1] = $temp;
         Aastra_manage_followme_Asterisk($user, 'set_grplist', $fm['grplist']);
     }
     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
コード例 #3
0
ファイル: logout.php プロジェクト: jamesrusso/Aastra_Scripts
        # 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, '');
        }
        break;
}
# Display XML Object
$object->output();
exit;
コード例 #4
0
ファイル: away.php プロジェクト: jamesrusso/Aastra_Scripts
                 $object->setType('timeInt');
             }
             $object->setPrompt(Aastra_get_label('Enter Time', $language));
             $object->setParameter('value2');
             $object->setDefault($default_time);
             $object->setURL($XML_SERVER . '&action=set_date_time&value1=' . $value1);
             $object->setCancelAction($XML_SERVER . '&action=set_date_time&value1=' . $value1);
         }
     }
     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('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 {
コード例 #5
0
ファイル: dnd.php プロジェクト: jamesrusso/Aastra_Scripts
Aastra_test_phone_versions(array('1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0');
# Authenticate user
if ($action == 'change') {
    Aastra_check_signature_Asterisk($user);
}
# Get language
$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
コード例 #6
0
ファイル: cfwd.php プロジェクト: jamesrusso/Aastra_Scripts
             $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
             $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=info&type=' . $type);
             $object->addSoftkey('6', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
         } else {
             $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=info&type=' . $type);
         }
     }
     # Cancel Action (back)
     $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
コード例 #7
0
        $ftext->addLine('Formatted Screen', 'double', 'center', 'red');
        $ftext->setScrollStart();
        $ftext->addLine('Scrolled text1');
        $ftext->addLine('Scrolled text2');
        $ftext->addLine('Scrolled text3');
        $ftext->addLine('Scrolled text4');
        $ftext->addLine('Scrolled text5');
        $ftext->setScrollEnd();
        $ftext->addLine('Footer', NULL, 'center');
        $ftext->addSoftkey('10', 'Exit', 'SoftKey:Exit');
        $ftext->output();
        break;
    case 'status1':
        require_once 'AastraIPPhoneStatus.class.php';
        $status = new AastraIPPhoneStatus();
        $status->setTriggerDestroyOnExit();
        $status->setSession('Session');
        $status->addEntry('1', 'Message 1');
        $status->addEntry('2', 'Message 2');
        $status->output();
        break;
    case 'status2':
        require_once 'AastraIPPhoneStatus.class.php';
        $status = new AastraIPPhoneStatus();
        $status->setSession('Session');
        $status->setTriggerDestroyOnExit();
        $status->addEntry('1', '');
        $status->addEntry('2', '');
        $status->output();
        break;
}
コード例 #8
0
ファイル: onhook.php プロジェクト: jamesrusso/Aastra_Scripts
    $object = new AastraIPPhoneExecute();
    $object->addEntry($XML_SERVER_PATH . '/away.php?user='******'Paging' and $number != '') {
    # Translate user if needed
    $user = Aastra_get_userdevice_Asterisk($user);
    # Check if call has been parked
    $park = Aastra_check_park_Asterisk($user, $number);
    # Display orbit
    if ($park != '') {
        # Display current status
        require_once 'AastraIPPhoneStatus.class.php';
        $object = new AastraIPPhoneStatus();
        $object->setSession('Park');
        $object->setBeep();
        if (Aastra_size_display_line() > 16) {
            $object->addEntry('1', sprintf(Aastra_get_label('Call Parked at %s', $language), $park), 'alert', 5);
        } else {
            $object->addEntry('1', sprintf(Aastra_get_label('Parked at %s', $language), $park), 'alert', 5);
        }
        # Bug 3.2.1
        if (Aastra_test_phone_version('3.2.1.', '1') == 0) {
            sleep(4);
        }
        # End of search
        $found = 1;
    }
}
コード例 #9
0
ファイル: key.php プロジェクト: jamesrusso/Aastra_Scripts
     } else {
         require_once 'AastraIPPhoneExecute.class.php';
         $object = new AastraIPPhoneExecute();
         $object->AddEntry('');
     }
     break;
     # UPDATE MSG
 # UPDATE MSG
 case 'msg':
     # Retrieve session
     $array = Aastra_read_session('key');
     $temp = unserialize(base64_decode($array['keys']));
     # Update configuration
     if (count($temp[2]) != 0) {
         require_once 'AastraIPPhoneStatus.class.php';
         $object = new AastraIPPhoneStatus();
         $object->setSession('aastra-xml');
         foreach ($temp[2] as $value) {
             $object->addEntry(Aastra_get_status_index_Asterisk($value), '');
         }
     } else {
         require_once 'AastraIPPhoneExecute.class.php';
         $object = new AastraIPPhoneExecute();
         $object->AddEntry('');
     }
     break;
     # DO NOTHING
 # DO NOTHING
 case 'nothing':
     # Do Nothing
     require_once 'AastraIPPhoneExecute.class.php';