Ejemplo n.º 1
0
     # Change password
 # Change password
 case 'chg_password':
     # Input Screen
     require_once 'AastraIPPhoneInputScreen.class.php';
     $object = new AastraIPPhoneInputScreen();
     $object->setDestroyOnExit();
     # Input number
     $object->setTitle(Aastra_get_label('Password Change', $language));
     $object->setType('number');
     $object->setPassword();
     $object->setPrompt(Aastra_get_label('New password', $language));
     $object->setParameter('paused');
     $object->setURL($XML_SERVER . '&action=set_password&origin=' . $origin);
     # Back
     $object->setCancelAction($XML_SERVER . '&action=options&origin=' . $origin);
     break;
     # Play/Record Greetings
 # Play/Record Greetings
 case 'play_greetings':
 case 'rec_greetings':
     # Action
     if ($action == 'play_greetings') {
         $action = 'play';
     } else {
         $action = 'record';
     }
     # Save session
     $array = array('uri_onhook' => $XML_SERVER . '&action=options', 'user' => $user, 'type' => $msg, 'action' => $action);
     Aastra_save_session('vmail', '600', $array, $ext);
     # Return empty object
Ejemplo n.º 2
0
     $object = new AastraIPPhoneInputScreen();
     $object->setTitle(Aastra_get_label('Directory Lookup', $language));
     $object->setURL($XML_SERVER . '&action=list');
     $object->setDestroyOnExit();
     $object->setType('string');
     $object->setPrompt(Aastra_get_label('Letters in name', $language));
     $object->setParameter('lookup');
     if ($lookup != '') {
         $object->setDefault($lookup);
     }
     # Softkeys
     $object->addSoftkey('5', Aastra_get_label('List Mode', $language), $XML_SERVER . '&action=list', 1);
     $object->addSoftkey('6', Aastra_get_label('Search', $language), 'SoftKey:Submit', 2);
     $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list', 3);
     $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 4);
     $object->setCancelAction($XML_SERVER . '&action=list');
     $object->addIcon(1, 'Icon:Book');
     $object->addIcon(2, 'Icon:Search');
     $object->addIcon(3, 'Icon:ArrowLeft');
     $object->addIcon(4, 'Icon:CircleRed');
     break;
     # Preferences
 # Preferences
 case 'prefs':
     # Retrieve current configuration
     $mode = Aastra_get_user_context(Aastra_get_userdevice_Asterisk($user), 'pbx_directory');
     # Display options
     require_once 'AastraIPPhoneTextMenu.class.php';
     $object = new AastraIPPhoneTextMenu();
     $object->setDestroyOnExit();
     $object->setDefaultIndex($mode);
Ejemplo n.º 3
0
     $object->setDestroyOnExit();
     $object->setTitle($array_type[$type][0]);
     $object->setPrompt($array_type[$type][1]);
     $object->setParameter('value');
     $object->setType('number');
     $object->setURL($XML_SERVER . '&action=set_info&type=' . $type);
     $object->setDefault($array_user[$type]);
     # Softkeys
     if ($nb_softkeys) {
         if ($nb_softkeys == 6) {
             $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('10', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=info&type=' . $type);
             $object->setCancelAction($XML_SERVER . '&action=info&type=' . $type);
         }
     }
     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();
     $object->setDestroyOnExit();
     if ($is_style_textmenu) {
Ejemplo n.º 4
0
     if ($action == 'callback') {
         # Input Screen
         require_once 'AastraIPPhoneInputScreen.class.php';
         $object = new AastraIPPhoneInputScreen();
         $object->setDestroyOnExit();
         # Input number
         $object->setTitle(Aastra_get_label('Edit Number', $language));
         $object->setType('number');
         $object->setPrompt(Aastra_get_label('Number to dial', $language));
         $object->setParameter('paused');
         $object->setURL($XML_SERVER . '&action=dial&msg=' . $msg . '&cause=' . $cause . '&origin=' . $origin);
         $object->setDefault($cause);
         # Softkeys
         if ($origin == 'list') {
             $object->addSoftkey('10', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list&last_msg=' . $msg);
             $object->setCancelAction($XML_SERVER . '&action=list&last_msg=' . $msg);
         } else {
             $object->addSoftkey('10', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=detail&msg=' . $msg);
             $object->setCancelAction($XML_SERVER . '&action=detail&msg=' . $msg);
         }
     }
     break;
     # Dial
 # Dial
 case 'dial':
     # PhoneExecute
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     # Number not valid?
     if (strlen($paused) < 1 || preg_match('/[^0-9]/', $paused)) {
         $object->addEntry($XML_SERVER . '&action=callback&msg=' . $msg . '&cause=' . $cause . '&origin=' . $origin);
Ejemplo n.º 5
0
         # Softkeys
         if ($nb_softkeys) {
             if ($nb_softkeys == 6) {
                 $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
                 if ($mode == 'SINGLE') {
                     $object->addSoftkey('5', Aastra_get_label('Cancel', $language), 'SoftKey:Exit');
                 } else {
                     $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list&index=' . $index);
                 }
                 $object->addSoftkey('6', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
             } else {
                 if ($mode == 'SINGLE') {
                     $object->addSoftkey('10', Aastra_get_label('Cancel', $language), 'SoftKey:Exit');
                 } else {
                     $object->addSoftkey('10', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list&index=' . $index);
                     $object->setCancelAction($XML_SERVER . '&action=list&index=' . $index);
                 }
             }
         }
     } else {
         # Do the change
         require_once 'AastraIPPhoneExecute.class.php';
         $object = new AastraIPPhoneExecute();
         $object->addEntry($XML_SERVER . '&action=set_change&index=' . $index);
     }
     break;
     # Switch values
 # Switch values
 case 'set_change':
     # Retrieve all status
     $array_night = Aastra_manage_daynight_Asterisk('get_all', '');
Ejemplo n.º 6
0
     $object->setURL($XML_SERVER . '&action=set_number&state=' . $state . '&value1=' . AA_PRESENCE_ACT_CFWD . '&selection=' . $action);
     $object->setDefault($away['act_param'][$state]);
     # Softkeys
     if ($nb_softkeys) {
         if ($nb_softkeys == 6) {
             $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
             if ($action == 'edit_number1') {
                 $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=select_number&state=' . $state);
             } else {
                 $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=input_prefs2&state=' . $state);
             }
             $object->addSoftkey('6', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
         } else {
             if ($action == 'edit_number1') {
                 $object->addSoftkey('10', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=select_number&state=' . $state);
                 $object->setCancelAction($XML_SERVER . '&action=select_number&state=' . $state);
             } else {
                 $object->addSoftkey('10', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=input_prefs2&state=' . $state);
                 $object->setCancelAction($XML_SERVER . '&action=input_prefs2&state=' . $state);
             }
         }
     }
     break;
     # Select destination
 # Select destination
 case 'select_number':
     # 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
Ejemplo n.º 7
0
             $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
             $object->addSoftkey('2', '.', 'SoftKey:Dot');
             if ($action == 'input') {
                 $object->addSoftkey('3', Aastra_get_label('Watch List', $language), $XML_SERVER . '&action=favorites');
                 $object->addSoftkey('5', Aastra_get_label('Lookup', $language), 'SoftKey:Submit');
             } else {
                 $object->addSoftkey('4', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=favorites&selection=' . $selection);
                 $object->addSoftkey('5', Aastra_get_label('Enter', $language), 'SoftKey:Submit');
             }
             $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             if ($action == 'input') {
                 $object->addSoftkey('5', Aastra_get_label('Watch List', $language), $XML_SERVER . '&action=favorites');
             } else {
                 $object->addSoftkey('8', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=favorites&selection=' . $selection);
                 $object->setCancelAction($XML_SERVER . '&action=favorites&selection=' . $selection);
             }
             $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         }
     }
     break;
     # Display favorites
 # Display favorites
 case 'favorites':
     # Retrieve favorites
     $data = Aastra_get_user_context($user, 'stock');
     # Create list
     require_once 'AastraIPPhoneTextMenu.class.php';
     $object = new AastraIPPhoneTextMenu();
     $summary = False;
     $object->setTitle(Aastra_get_label('Watch List', $language));
Ejemplo n.º 8
0
     $object->setDefault($default);
     $object->setURL($XML_SERVER . '&action=set_logout&origin=' . $origin . '&password='******'1', Aastra_get_label('No Time', $language), $XML_SERVER . '&action=set_logout&value=&origin=' . $origin . '&password='******'4', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=' . $origin . '&password='******'5', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
             $object->addSoftKey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             $object->addSoftKey('1', Aastra_get_label('No Time', $language), $XML_SERVER . '&action=set_logout&value=&origin=' . $origin . '&password='******'9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=' . $origin . '&password='******'10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         }
     }
     $object->setCancelAction($XML_SERVER . '&action=main');
     break;
     # Set Logout time
 # Set Logout time
 case 'set_logout':
     # Process input time
     if ($value != '') {
         $timepart = substr($value, 0, 8);
         list($hour, $minute, $second) = explode(':', $timepart);
         if ($AA_FORMAT_DT == 'US') {
             $pm = substr($value, 8, 2);
             if ($pm == 'PM' or $pm == 'pm') {
                 if ($hour != '12') {
                     $hour += 12;
                 }
             } else {
Ejemplo n.º 9
0
         $object->setType('number');
         $object->setURL($XML_SERVER . '&action=authenticate&queue=' . $queue . '&q_pass='******'&q_desc=' . $q_desc);
         $object->setPassword();
         # Softkeys
         if ($nb_softkeys) {
             if ($nb_softkeys == 6) {
                 $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
                 $object->addSoftkey('4', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=show_queues&queue=' . $queue);
                 $object->addSoftkey('5', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
                 $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             } else {
                 $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=show_queues&queue=' . $queue);
                 $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             }
         }
         $object->setCancelAction($XML_SERVER . '&action=show_queues&queue=' . $queue);
     } else {
         # Add agent to selected queue
         Aastra_queue_add_Asterisk($agent, $queue, $status['Penalty']);
         $update = True;
     }
 }
 # Update needed
 if (!$object) {
     # Prepare display callback
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     # Update needed
     if ($update) {
         # Update via the "check" mechanism
         $object->addEntry($XML_SERVER . '&action=check');
Ejemplo n.º 10
0
     $input->setPassword();
     $input->setDestroyOnExit();
     $input->setDefault('');
     $input->setCancelAction($XML_SERVER);
     $input->output();
     break;
 case 'inputscreen2':
     require_once 'AastraIPPhoneInputScreen.class.php';
     $input = new AastraIPPhoneInputScreen();
     $input->setTitle('Title');
     $input->setPrompt('Enter the date');
     $input->setParameter('param');
     $input->setType('dateUS');
     $input->setURL('http://myserver.com/script.php');
     $input->setDestroyOnExit();
     $input->setCancelAction($XML_SERVER);
     $input->output();
     break;
 case 'inputscreen3':
     require_once 'AastraIPPhoneInputScreen.class.php';
     $input = new AastraIPPhoneInputScreen();
     $input->setTitle('Restricted application');
     $input->setDisplayMode('condensed');
     $input->setURL($XML_SERVER);
     $input->setDestroyOnExit();
     $input->addField('empty');
     $input->addField('string');
     $input->setFieldSelection('1');
     $input->setFieldPrompt('Username:'******'user');
     $input->setFieldSelection('1');
Ejemplo n.º 11
0
             $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
             if ($step == 1) {
                 $object->addSoftkey('3', Aastra_get_label('ABC', $language), 'SoftKey:ChangeMode');
                 $object->addSoftkey('4', Aastra_get_label('NextSpace', $language), 'SoftKey:NextSpace');
             }
             $object->addSoftkey('5', Aastra_get_label('Done', $language), 'SoftKey:Submit');
             if ($step != 1) {
                 $step--;
                 $object->addSoftkey('6', Aastra_get_label('Back', $language), $XML_SERVER . '&action=edit&selection=' . $selection . '&step=' . $step);
             } else {
                 $object->addSoftkey('6', Aastra_get_label('Back', $language), $XML_SERVER . '&action=list&selection=' . $selection);
             }
         } else {
             if ($step != 1) {
                 $step--;
                 $object->setCancelAction($XML_SERVER . '&action=edit&selection=' . $selection . '&step=' . $step);
             } else {
                 $object->setCancelAction($XML_SERVER . '&action=list&selection=' . $selection);
             }
         }
     }
     break;
     # VIEW
 # VIEW
 case 'view':
     # Real input
     if ($data[$selection]['name'] != '') {
         # At least one number
         if ($data[$selection]['work'] != '' || $data[$selection]['mobile'] != '' || $data[$selection]['home'] != '' || $data[$selection]['other'] != '') {
             # Display list as TextMenu
             require_once 'AastraIPPhoneTextMenu.class.php';
Ejemplo n.º 12
0
                         }
                         break;
                 }
                 # Softkeys
                 if ($nb_softkeys) {
                     if ($nb_softkeys == 6) {
                         $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
                         $object->addSoftkey('2', Aastra_get_label('ABC', $language), 'SoftKey:ChangeMode');
                         $object->addSoftkey('3', Aastra_get_label('NextSpace', $language), 'SoftKey:NextSpace');
                         $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&selection=' . $selection . '&action=edit&step=2&type=' . $type . '&set=' . $set . '&input1=' . $input1 . '&input2=' . $input2);
                         $object->addSoftkey('5', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
                         $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                     } else {
                         $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&selection=' . $selection . '&action=edit&step=2&type=' . $type . '&set=' . $set . '&input1=' . $input1 . '&input2=' . $input2);
                         $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                         $object->setCancelAction($XML_SERVER . '&selection=' . $selection . '&action=edit&step=2&type=' . $type . '&set=' . $set . '&input1=' . $input1 . '&input2=' . $input2);
                     }
                 } else {
                     $object->setCancelAction($XML_SERVER . '&selection=' . $selection . '&action=edit&step=2&type=' . $type . '&set=' . $set . '&input1=' . $input1 . '&input2=' . $input2);
                 }
             } else {
                 require_once 'AastraIPPhoneExecute.class.php';
                 $object = new AastraIPPhoneExecute();
                 $object->AddEntry($XML_SERVER . '&action=edit&step=2&input1=' . $input1 . '&type=' . $type . '&set=' . $set . '&selection=' . $selection);
             }
             break;
     }
     break;
     # UPDATE LED
 # UPDATE LED
 case 'led':