Пример #1
0
# Wait 5 seconds to begin for not much other reason than this lets
# you test the functionality with your own extension
sleep(5);
# Collect arguments
$notifications = $argv[1];
$notify = explode(',', $notifications);
$extension = $argv[2];
$vars['__EXTENSION'] = $extension;
if ($argc == 4) {
    $vars['NAME_RECORDING'] = $argv[3];
}
# Connect to the AGI
$asm = new AGI_AsteriskManager();
$asm->connect();
# Get language
$language = Aastra_get_language();
# Notify each phone
for ($i = 0; $i < sizeof($notify); $i++) {
    $vars['__REALCALLERIDNUM'] = $notify[$i];
    $state = $asm->ExtensionState($notify[$i], 'default');
    if ($state['Status'] != 0) {
        $vars['NOTIFY_VM'] = 'true';
    }
    while (list($key, $val) = each($vars)) {
        $vars_arr[] = "{$key}={$val}";
    }
    if (Aastra_compare_version_Asterisk('1.6')) {
        $vars = implode(',', $vars_arr);
    } else {
        $vars = implode('|', $vars_arr);
    }
 function AastraIPPhoneScrollableTextMenu()
 {
     # Get Language
     $this->_language = Aastra_get_language();
     # Decode HTTP header
     $this->_header = Aastra_decode_HTTP_header();
     # Generate new cookie
     $this->_cookie = $this->_generateCookie();
     # Generate Scroll Handler reference
     global $XML_HTTP, $AA_XML_SERVER, $AA_XMLDIRECTORY;
     $this->_scrollHandlerReference = $XML_HTTP . $AA_XML_SERVER . "/" . $AA_XMLDIRECTORY . "/include/AastraIPPhoneScrollHandler.php?listCookie=" . $this->_cookie;
     # Calculate max linex
     $this->_calculateMaxLines();
     # Modify some values for 6739i
     if (Aastra_number_softkeys_supported() == 10) {
         $this->_exitKeyPosition = 10;
         $this->_nextKeyPosition = 8;
         $this->_previousKeyPosition = 7;
         $this->_selectKeyPosition = 3;
     }
 }
Пример #3
0
                     $object->addLine('');
                 }
                 $object->addLine(sprintf(Aastra_get_label('I=%+.3f %s', $language), $array['day']['I'], $array['trend']['I']));
                 $object->addLine(sprintf(Aastra_get_label('E=%+.3f %s', $language), $array['day']['E'], $array['trend']['E']));
                 $object->addLine(sprintf(Aastra_get_label('P=%+.3f %s', $language), $array['day']['P'], $array['trend']['P']));
             } else {
                 $object->setScrollStart('2');
                 $object->addLine(sprintf(Aastra_get_label('I=%+.3f %s', $language), $array['day']['I'], $array['trend']['I']));
                 $object->addLine(sprintf(Aastra_get_label('E=%+.3f %s', $language), $array['day']['E'], $array['trend']['E']));
                 $object->addLine(sprintf(Aastra_get_label('P=%+.3f %s', $language), $array['day']['P'], $array['trend']['P']));
                 $object->setScrollEnd();
             }
         } else {
             # create object
             $object = new AastraIPPhoneTextScreen();
             $object->setTitle(Aastra_get_language('BIORHYTHMS', $language));
             $object->setText(sprintf(Aastra_get_label('I=%+.3f, E=%+.3f, P=%+.3f', $language), $array['day']['I'], $array['day']['E'], $array['day']['P']));
         }
     }
 }
 # Common parameters
 $object->setDestroyOnExit();
 if ($nb_softkeys) {
     if ($nb_softkeys == 6) {
         $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER);
         $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     } else {
         $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER);
         $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     }
 }
Пример #4
0
$asterisk = False;
if (file_exists('../include/AastraAsterisk.php')) {
    $asterisk = True;
    require_once 'AastraAsterisk.php';
}
# Log call to the application
if ($asterisk) {
    Aastra_trace_call('asterisk_LDAP_dir', 'source=' . $source . ', action=' . $action . ', user='******', lookup=' . $lookup . ', lastname=' . $lastname . ', firstname=' . $firstname);
} else {
    Aastra_trace_call('LDAP_directory', 'source=' . $source . ', action=' . $action . ', user='******', lookup=' . $lookup . ', lastname=' . $lastname . ', firstname=' . $firstname);
}
# Test User Agent
# PROV
#Aastra_test_phone_versions(array('1'=>'','2'=>'','3'=>'2.5.3.','4'=>'2.5.3.','5'=>'3.0.1.'),'0');
# Get Language
$LANGUAGE = Aastra_get_language();
# Get global compatibility
$nb_softkeys = Aastra_number_softkeys_supported();
$is_style_textmenu = Aastra_is_style_textmenu_supported();
$is_textmenu_wrapitem = Aastra_is_textmenu_wrapitem_supported();
# Update URI
$XML_SERVER .= '?user='******'&source=' . $source . '&back=' . $back;
# Get ldap parameters
$error = False;
$ARRAY_CONFIG = Aastra_readINIfile(AASTRA_CONFIG_DIRECTORY . 'directory.conf', '#', '=');
if ($ARRAY_CONFIG[$source]['hostname'] != '') {
    if ($ARRAY_CONFIG[$source]['speed'] == '0') {
        $SPEED = False;
    } else {
        $SPEED = True;
    }