Exemple #1
0
             } else {
                 $object->addSoftkey(10, Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             }
         }
     }
     break;
     # Poor man's dial
 # Poor man's dial
 case 'dial':
     # Do nothing
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     $object->addEntry('');
     $object->output(True);
     # Dial the number
     Aastra_dial_number_Asterisk($user, $value);
     exit;
     break;
     # Parked calls
 # Parked calls
 case 'list':
     # Get Parked calls
     $park = Aastra_get_parked_calls_Asterisk();
     $count = count($park);
     # Update display
     if ($count == 0) {
         # No park calls
         require_once 'AastraIPPhoneTextScreen.class.php';
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         $object->setTitle(Aastra_get_label('Parked Calls', $language));
$language = Aastra_get_language();
# Save return URI
$XML_SERVER .= '?user='******'&origin=' . $origin;
# Compute MaxLines
$MaxLines = AASTRA_MAXLINES;
# Process action
switch ($action) {
    # Poor man's dial
    case 'dial':
        # Do nothing
        require_once 'AastraIPPhoneExecute.class.php';
        $object = new AastraIPPhoneExecute();
        $object->addEntry('');
        $object->output(True);
        # Dial the number
        Aastra_dial_number_Asterisk($user, $selection);
        exit;
        break;
        # Display Speed dial
    # Display Speed dial
    case 'select':
        # Get user context
        $conf_speed = Aastra_get_user_context(Aastra_get_userdevice_Asterisk($user), 'speed');
        # Find first available spot
        $found = 0;
        $i = 0;
        while ($found == 0 and $i < $MaxLines) {
            if ($conf_speed[$i]['name'] == '') {
                $found = 1;
            }
            $i++;