if (!$allowed) { unset($queues[$key]); } } # Return updated queues return $queues; } ############################################################################# # Body ############################################################################# $action = Aastra_getvar_safe('action', 'show_queues'); $user = Aastra_getvar_safe('user'); $q_desc = Aastra_getvar_safe('q_desc'); $queue = Aastra_getvar_safe('queue'); $member = Aastra_getvar_safe('member'); $page = Aastra_getvar_safe('page', '1'); # Trace Aastra_trace_call('queues_asterisk', 'action=' . $action . ', user='******', queue=' . $queue . ', member=' . $member); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2', '3' => '', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get Language $language = Aastra_get_language(); # Global compatibility $nb_softkeys = Aastra_number_softkeys_supported(); $is_color_ftextscreen = Aastra_is_formattedtextscreen_color_supported(); # Check user mode if ($user == '') { # Display error require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit();
error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraCommon.php'; require_once 'AastraAsterisk.php'; ############################################################################# # Body ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action'); $value = Aastra_getvar_safe('value'); $selection = Aastra_getvar_safe('selection'); $page = Aastra_getvar_safe('page', '1'); $type = Aastra_getvar_safe('type'); # Maximum number of phones in the follow-me list $MAX_NUMBERS = 10; # Trace Aastra_trace_call('follow_asterisk', 'user='******', action=' . $action . ', value=' . $value . ', selection=' . $selection); # Test User Agent 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'); # Get global compatibility $nb_softkeys = Aastra_number_softkeys_supported(); $is_icons = Aastra_is_icons_supported(); $is_style_textmenu = Aastra_is_style_textmenu_supported(); # Initial call if ($action == '') { if ($nb_softkeys) { $action = 'main'; } else {
function Aastra_decode_HTTP_header() { global $TEST; # Debug mode if ($TEST) { # Calculate fake mac address suffix based on client's source address $fake_mac_suffix = strtoupper(substr(md5(Aastra_getvar_safe('REMOTE_ADDR', '', 'SERVER')), 0, 6)); $array = array('model' => 'Aastra57i', 'mac' => '00085D' . $fake_mac_suffix, 'firmware' => '2.5.3.26', 'ip' => Aastra_getvar_safe('REMOTE_ADDR', '', 'SERVER'), 'language' => 'en', 'rp' => False); return $array; } # User Agent $user_agent = Aastra_getvar_safe('HTTP_USER_AGENT', '', 'SERVER'); if (stristr($user_agent, 'Aastra')) { $value = preg_split('/ MAC:/', $user_agent); $fin = preg_split('/ /', $value[1]); $value[1] = preg_replace('/\\-/', '', $fin[0]); $value[2] = preg_replace('/V:/', '', $fin[1]); } else { $value[0] = 'MSIE'; $value[1] = 'NA'; $value[2] = 'NA'; } # Modification for RP phones $rp = False; if (strstr($value[0], 'RP')) { $rp = True; $value[0] = preg_replace(array('/67/', '/ RP/'), array('', ''), $value[0]); } # Modules $module[1] = Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD1', '', 'SERVER'); $module[2] = Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD2', '', 'SERVER'); $module[3] = Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD3', '', 'SERVER'); # Create array $array = array('model' => $value[0], 'mac' => $value[1], 'firmware' => $value[2], 'ip' => Aastra_getvar_safe('REMOTE_ADDR', '', 'SERVER'), 'module' => $module, 'language' => Aastra_getvar_safe('HTTP_ACCEPT_LANGUAGE', '', 'SERVER'), 'rp' => $rp); return $array; }
if ($user == '') { $header = Aastra_decode_HTTP_header(); $user = $header['mac']; } $action = Aastra_getvar_safe('action', 'input'); $source = Aastra_getvar_safe('source'); $lastn = Aastra_getvar_safe('lastn'); $firstn = Aastra_getvar_safe('firstn'); $company = Aastra_getvar_safe('company'); $lookup = Aastra_getvar_safe('lookup'); $index = Aastra_getvar_safe('index'); $page = Aastra_getvar_safe('page', '1'); $speed = Aastra_getvar_safe('speed'); $back = Aastra_getvar_safe('back'); $mode = Aastra_getvar_safe('mode'); $passwd = Aastra_getvar_safe('passwd'); # Test if Asterisk mode $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_csv_dir', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user='******', speed=' . $speed); } else { Aastra_trace_call('csv_directory', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user='******', speed=' . $speed); } # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get Language
############################################################################# # Includes ############################################################################# require_once 'AastraAsterisk.php'; ############################################################################# # Main code ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $page = Aastra_getvar_safe('page', '1'); $action = Aastra_getvar_safe('action', 'init'); $speed = Aastra_getvar_safe('speed'); $selection = Aastra_getvar_safe('selection'); $origin = Aastra_getvar_safe('origin'); $orig_s = Aastra_getvar_safe('orig_s'); $lookup = Aastra_getvar_safe('lookup', ''); # Trace Aastra_trace_call('directory_5_asterisk', 'user='******', action=' . $action . ', speed=' . $speed . ', selection=' . $selection); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '', '3' => '', '4' => '', '5' => '3.0.1.'), '0'); # Get Language $language = Aastra_get_language(); # Save return URI $XML_SERVER .= '?user='******'&origin=' . $origin; # Compute MaxLines $MaxLines = AASTRA_MAXLINES; # Initial call if ($action == 'init') { # Retrieve current configuration $mode = Aastra_get_user_context(Aastra_get_userdevice_Asterisk($user), 'pbx_directory'); if ($mode == '') {
$search = array('@<script[^>]*?>.*?</script>@si', '@<[\\/\\!]*?[^<>]*?>@si', '@([\\r\\n])[\\s]+@', '@&(quot|#34);@i', '@&(amp|#38);@i', '@&(lt|#60);@i', '@&(gt|#62);@i', '@&(nbsp|#160);@i', '@&(iexcl|#161);@i', '@&(cent|#162);@i', '@&(pound|#163);@i', '@&(copy|#169);@i', '@&#(\\d+);@e'); // evaluate as php $replace = array('', '', '\\1', '"', '&', '<', '>', ' ', chr(161), chr(162), chr(163), chr(169), 'chr(\\1)'); $string = preg_replace($search, $replace, $string); $string = preg_replace($search, $replace, $string); $string = preg_replace('/\\n/', ' ', $string); return $string; } ############################################################################# # Beginning of the active code ############################################################################# # Collect parameters $header = Aastra_decode_HTTP_header(); $user = Aastra_getvar_safe('user', $header['mac']); $index = Aastra_getvar_safe('index'); $zip = Aastra_getvar_safe('zip'); # Trace Aastra_trace_call('weather', 'zip=' . $zip . ', index=' . $index); # Test User Agent Aastra_test_phone_version('1.4.2.', 0); # Get Language $language = Aastra_get_language(); # Get global compatibility $nb_softkeys = Aastra_number_softkeys_supported(); # Callback $XML_SERVER .= '?user='******'') { # Input zip code $object = new AastraIPPhoneInputScreen(); $object->setTitle(Aastra_get_label('US Local Weather', $language));
ini_set('include_path', ini_get('include_path') . ':include:../include'); } else { ini_set('include_path', ini_get('include_path') . ';include;..\\include'); } error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraCommon.php'; require_once 'AastraIPPhoneTextScreen.class.php'; require_once 'AastraIPPhoneInputScreen.class.php'; ############################################################################# # Beginning of the active code ############################################################################# # Retrieve parameters $area = Aastra_getvar_safe('area'); # Trace Aastra_trace_call('area', 'area=' . $area); # Test User Agent Aastra_test_phone_version('1.4.2.', 0); # Get language $language = Aastra_get_language(); # Global compatibility $nb_softkeys = Aastra_number_softkeys_supported(); # Test parameter if ($area) { # Load area codes $array = Aastra_readINIfile('area_codes.txt', '#', '='); $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(sprintf(Aastra_get_label('Area code %s', $language), $area));
} else { $return = $hour . ':' . $minute; } # Return formatted text return $return; } ############################################################################# # Body ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $password = Aastra_getvar_safe('password'); $action = Aastra_getvar_safe('action', 'input'); $page = Aastra_getvar_safe('page', '1'); $value = Aastra_getvar_safe('value'); $origin = Aastra_getvar_safe('origin'); # Trace Aastra_trace_call('logout_asterisk', 'user='******', password='******', action=' . $action); # Test User Agent 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'); # Get MAC address and type of phone $header = Aastra_decode_HTTP_header(); # Save return URI $XML_SERVER .= '?user='******'2') {
Aastra_delete_temp_message_Asterisk($user); # Send message notifications if needed if ($away['notifym'] != '') { $explode = explode(',', $away['notifym']); $long = sprintf(Aastra_get_label('%s is back', $language), Aastra_get_callerid_Asterisk(Aastra_get_userdevice_Asterisk($user))); $short = sprintf(Aastra_get_label('%s is back', $language), Aastra_get_userdevice_Asterisk($user)); foreach ($explode as $data) { Aastra_send_message_Asterisk($data, $long, $short, 'Dial:' . Aastra_get_userdevice_Asterisk($user)); } } # Send voice notifications if needed if ($away['notifyv'] != '') { # Retrieve name recording $name_recording = Aastra_get_greeting_name_Asterisk($user); # Run in background so we aren't waiting for a response $cmd = '/usr/bin/php ' . Aastra_getvar_safe('DOCUMENT_ROOT', '', 'SERVER') . '/' . $AA_XMLDIRECTORY . '/asterisk/notify.php ' . $away['notifyv'] . ' ' . Aastra_get_userdevice_Asterisk($user) . ' ' . $name_recording; $cmd = escapeshellcmd($cmd); $cmd = '(' . $cmd . ') >/dev/null &'; system($cmd); } } # Update LED and idle screen if ($is_sip_notify and $AA_ISYMPHONY) { # Send a user event to aastra-daemon1 to update status Aastra_send_userevent_Asterisk('PresenceStatusChanged', Aastra_get_userdevice_Asterisk($user) . ',' . $value1); } else { $object->addEntry($XML_SERVER . '&action=check'); } # Reset return date/time if ($AA_ISYMPHONY and $value1 == AA_PRESENCE_AVAILABLE) { Aastra_send_userevent_Asterisk('PresenceReturnChanged', Aastra_get_userdevice_Asterisk($user) . ',0');
############################################################################# # Main code ############################################################################# # Retrieve parameters $confno = Aastra_getvar_safe('confno'); $action = Aastra_getvar_safe('action', 'select'); $page = Aastra_getvar_safe('page', '1'); $user_id = Aastra_getvar_safe('user_id'); $ext = Aastra_getvar_safe('ext'); $number = Aastra_getvar_safe('number', ''); $selection = Aastra_getvar_safe('selection'); if ($confno == '' and $selection != '') { $confno = $selection; } $pin = Aastra_getvar_safe('pin'); $mode = Aastra_getvar_safe('mode'); # Local variables $refresh = 1; # Trace Aastra_trace_call('meetme_asterisk', 'confno=' . $confno . ', action=' . $action . ', user_id=' . $user_id . ',selection=' . $selection . ',ext=' . $ext . ', mode=' . $mode . ', number=' . $number); # Retrieve phone information $header = Aastra_decode_HTTP_header(); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get Language $language = Aastra_get_language(); # Keep callback URI $XML_SERVER .= '?ext=' . $ext; # Authenticate user Aastra_check_signature_Asterisk($ext); # Compatibility
ini_set('include_path', ini_get('include_path') . ':include:../include'); } else { ini_set('include_path', ini_get('include_path') . ';include;..\\include'); } error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraAsterisk.php'; ############################################################################# # Active code ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'change'); $status = Aastra_getvar_safe('status'); # Trace Aastra_trace_call('dnd_asterisk', 'user='******', action=' . $action . ', status=' . $status); # Test User Agent 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=' . $user; # Depending on action switch ($action) { # Update Message status
if ($parameters['Event'] = 'QueueMember') { $queue_members[] = $parameters; } } } ############################################################################# # Body ############################################################################# $action = Aastra_getvar_safe('action', 'show_queues'); $agent = Aastra_getvar_safe('agent'); $password = Aastra_getvar_safe('password'); $q_pass = Aastra_getvar_safe('q_pass'); $q_desc = Aastra_getvar_safe('q_desc'); $queue = Aastra_getvar_safe('queue'); $page = Aastra_getvar_safe('page', '1'); $menu_set = Aastra_getvar_safe('menu_set', '1'); # Trace Aastra_trace_call('agent_asterisk', 'agent=' . $agent . ', action=' . $action . ', queue=' . $queue . ', page=' . $page); # Test User Agent 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'); # Get Language $language = Aastra_get_language(); # Keep callback $XML_SERVER .= '?agent=' . $agent; # Local variables $refresh = 1; $header = Aastra_decode_HTTP_header(); # Compatibility $is_icons = Aastra_is_icons_supported(); $nb_softkeys = Aastra_number_softkeys_supported(); if ($nb_softkeys) {
############################################################################# # Main code ############################################################################# # Collect parameters $action = trim(Aastra_getvar_safe('action')); $user = trim(Aastra_getvar_safe('user')); if ($user == '') { $header = Aastra_decode_HTTP_header(); $user = $header['mac']; } $lookup = trim(Aastra_getvar_safe('lookup')); $lastname = trim(Aastra_getvar_safe('lastname')); $firstname = trim(Aastra_getvar_safe('firstname')); $source = trim(Aastra_getvar_safe('source')); $back = trim(Aastra_getvar_safe('back')); $passwd = trim(Aastra_getvar_safe('passwd')); # Set custom error handler for E_WARNING errors in order to catch LDAP errors set_error_handler('WARNINGErrorHandler', E_WARNING); # Test if Asterisk mode $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
# Retrieve parsed data $user = Aastra_getvar_safe('user'); if ($user == '') { $header = Aastra_decode_HTTP_header(); $user = $header['mac']; } $action = Aastra_getvar_safe('action', 'list'); $selection = Aastra_getvar_safe('selection'); $value = Aastra_getvar_safe('value'); $step = Aastra_getvar_safe('step', '1'); $input1 = Aastra_getvar_safe('input1'); $input2 = Aastra_getvar_safe('input2'); $input3 = Aastra_getvar_safe('input3'); $input4 = Aastra_getvar_safe('input4'); $input5 = Aastra_getvar_safe('input5'); $mode = Aastra_getvar_safe('mode', 'dynamic'); # Check if in Asterisk mode $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_speed', 'user='******', action=' . $action . ', selection=' . $selection . ', value=' . $value . ', step=' . $step); } else { Aastra_trace_call('speed', 'user='******', action=' . $action . ', selection=' . $selection . ', value=' . $value . ', step=' . $step); } # Test User Agent 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'); # Global data
} error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraAsterisk.php'; ############################################################################# # Active code ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action'); $status = Aastra_getvar_safe('status'); $index = Aastra_getvar_safe('index'); $mode = Aastra_getvar_safe('mode'); $password = Aastra_getvar_safe('password'); # Trace Aastra_trace_call('day/night_asterisk', 'user='******', action=' . $action . ', index=' . $index . ', status=' . $status . ', password='******'1' => '1.4.2.', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get language $language = Aastra_get_language(); # Global compatibility $nb_softkeys = Aastra_number_softkeys_supported(); $is_icons = Aastra_is_icons_supported(); # Initial action if ($action == '') { # Set mode if ($index == '') { $mode = 'ALL'; } else {
} error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraCommon.php'; ############################################################################# # Private functions ############################################################################# ############################################################################# # Main code ############################################################################# # Collect parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'input'); $source = Aastra_getvar_safe('source'); # Test if Asterisk mode $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_directory', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user='******', speed=' . $speed); } else { Aastra_trace_call('directory', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user='******', speed=' . $speed); } # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get Language
if ($value['index'] == $index) { break; } } return $key; } ###################################################################### # Beginning of the active code ###################################################################### # Collect parameters $city = Aastra_getvar_safe('city'); $page = Aastra_getvar_safe('page', '1'); $selection = Aastra_getvar_safe('selection'); $action = Aastra_getvar_safe('action', 'list'); $user = Aastra_getvar_safe('user'); $rank = Aastra_getvar_safe('rank'); # Trace call to the function Aastra_trace_call('clock', 'city=' . $city . ', page=' . $page . ', action=' . $action . ', user='******', selection=' . $selection . ', rank=' . $rank); # Test User Agent Aastra_test_phone_version('1.4.2.', 0); # Get header info $header = Aastra_decode_HTTP_header(); # Get Phone language $language = Aastra_get_language(); # Set user use MAC if not set if ($user == '') { $user = $header['mac']; } # Compute MaxLines if (Aastra_is_softkeys_supported()) { $MaxLines = AASTRA_MAXLINES;
# Return result return $return; } ############################################################################# # Active code ############################################################################# # Retrieve parameters $extension = Aastra_getvar_safe('extension'); $password = Aastra_getvar_safe('password'); $tz_code = Aastra_getvar_safe('tz_code'); $tz_name = Aastra_getvar_safe('tz_name'); $action = Aastra_getvar_safe('action'); $step = Aastra_getvar_safe('step', '1'); $page = Aastra_getvar_safe('page', '1'); $lang = Aastra_getvar_safe('lang'); $cl = Aastra_getvar_safe('cl'); # No action yet if ($action == '') { # Select the right action $code = Aastra_ask_language_Asterisk(); if ($code[0]) { $action = 'language'; } else { $action = 'input'; } } # Trace Aastra_trace_call('startup_asterisk', 'extension=' . $extension . ', password='******', action=' . $action . ', page=' . $page . ', cl=' . $cl); # Get MAC address and type of phone $header = Aastra_decode_HTTP_header(); # To handle non softkey phones
function Aastra_debug($string) { global $DEBUG; # Traces? if ($DEBUG) { # Trace in the file $date = AASTRA_PATH_CACHE . date('mdY') . '.debug'; $time = date('H:i:s A'); $handle = @fopen($date, 'a'); if ($handle) { fputs($handle, $time . "\t" . Aastra_getvar_safe('HTTP_USER_AGENT', '', 'SERVER') . "\t" . Aastra_getvar_safe('SCRIPT_NAME', '', 'SERVER') . "\t" . $string . "\n"); fclose($handle); } } }
} else { ini_set('include_path', ini_get('include_path') . ';include;..\\include'); } error_reporting(E_ERROR | E_WARNING | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraCommon.php'; require_once 'AastraIPPhoneTextScreen.class.php'; require_once 'AastraIPPhoneScrollableTextMenu.class.php'; require_once 'AastraIPPhoneScrollableDirectory.class.php'; $cookie = Aastra_getvar_safe('listCookie'); $page = Aastra_getvar_safe('listPage'); $zoomIndex = Aastra_getvar_safe('zoomIndex'); $recentSelection = Aastra_getvar_safe('recentSelection'); $recentPage = Aastra_getvar_safe('recentPage'); Aastra_trace_call('LDAP directory', $_SERVER['REQUEST_URI']); # Get Language and HTTP header $language = Aastra_get_language(); $header = Aastra_decode_HTTP_header(); # Load user context $menu = Aastra_get_user_context($header['mac'], 'scrollableTextMenuData'); if (!is_object($menu)) { # If not an object: Something went wrong when fetching the user context. Display error and exit. $object = new AastraIPPhoneTextScreen(); $object->setTitle(Aastra_get_label('Server error', $language)); $object->setText(Aastra_get_label('Context not found. Check cache directory settings.', $language)); $object->output(); exit; } if (!$menu->verifyCookie($cookie)) {
ini_set('include_path', ini_get('include_path') . ';include;..\\include'); } error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraAsterisk.php'; ############################################################################# # Main code ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action'); $value = Aastra_getvar_safe('value'); $linestate = Aastra_getvar_safe('linestate'); $autopick = Aastra_getvar_safe('autopick'); # Initial action if ($action == '') { if ($linestate == 'CONNECTED') { $action = 'park'; } else { $action = 'list'; } } # Trace Aastra_trace_call('park_asterisk', 'user='******', linestate=' . $linestate); # Test User Agent 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'); # Retrieve phone information $header = Aastra_decode_HTTP_header(); # Get phone language
$os = strtolower(PHP_OS); if (strpos($os, 'win') === false) { ini_set('include_path', ini_get('include_path') . ':include:../include'); } else { ini_set('include_path', ini_get('include_path') . ';include;..\\include'); } error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraCommon.php'; require_once 'AastraIPPhoneExecute.class.php'; ############################################################################# # Retrieve parameters $number = Aastra_getvar_safe('number'); $name = Aastra_getvar_safe('name'); # Not identified yet $found = 0; # Trace Aastra_trace_call('incoming_asterisk', 'number=[' . $number . '], name=[' . $name . ']'); # VoiceMail old code if ($name == 'VoiceMail') { # Retrieve session $array = Aastra_read_session('vmail', $user); # Call initial script if ($array['uri_incoming'] != '') { $object = new AastraIPPhoneExecute(); $object->addEntry($array['uri_incoming']); $found = 1; } }
} else { ini_set('include_path', ini_get('include_path') . ';include;../include'); } error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraAsterisk.php'; ############################################################################# # Main code ############################################################################# # Retrieve parameters $ext = Aastra_getvar_safe('ext'); $pin = Aastra_getvar_safe('pin'); $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'init'); # Trace Aastra_trace_call('vmail_login-asterisk', 'action=' . $action . ', ext=' . $ext . ', user='******', pin=' . $pin); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '2.5.3', '4' => '2.5.3.', '5' => '3.0.1'), '0'); # Get Language $language = Aastra_get_language(); # Keep URL $XML_SERVER .= '?ext=' . $ext; # Compatibility with non softkey phones and 6739i $nb_softkeys = Aastra_number_softkeys_supported(); # Check if ext is configured if ($ext == '') { # Display error $action = 'error'; $err_title = Aastra_get_label('Configuration Error', $language);
# Returns a formatted string ################################################################################################### function format_line($nb_carac, $title, $value) { # Compute string $string = $title . str_repeat('.', $nb_carac - strlen($title) - strlen($value) - 1) . $value; # Return string return $string; } ########################################## # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'input'); $page = Aastra_getvar_safe('page', '1'); $selection = Aastra_getvar_safe('selection'); $symbol = strtoupper(Aastra_getvar_safe('symbol')); # Get user if not provided $header = Aastra_decode_HTTP_header(); if ($user == '') { $user = $header['mac']; } # Update URI $XML_SERVER .= '?user='******'stock', 'user='******', symbol=' . $symbol); # Test User Agent Aastra_test_phone_version('1.4.2.', 0); # Get Language $language = Aastra_get_language(); # Global compatibility $nb_softkeys = Aastra_number_softkeys_supported();
} else { $return['page'] = 0; $return['index'] = 1; } } # Return results return $return; } ########################################## # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'init'); $input = Aastra_getvar_safe('input'); $choice = Aastra_getvar_safe('choice'); $page = Aastra_getvar_safe('page', '0'); $selection = Aastra_getvar_safe('selection'); # Get user if not provided $header = Aastra_decode_HTTP_header(); if ($user == '') { $user = $header['mac']; } # Update URI $XML_SERVER .= '?user='******'currency', 'user='******', action=' . $action . ', selection=' . $selection . ', input=' . $input); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '', '3' => '', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get Language $language = Aastra_get_language(); # Retrieve user context $data = Aastra_get_user_context($user, 'currency');
############################################################################# # Retrieve parameters $ext = Aastra_getvar_safe('ext'); $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'list'); $page = Aastra_getvar_safe('page', '1'); $origin = Aastra_getvar_safe('origin'); $orig_d = Aastra_getvar_safe('orig_d'); $orig_p = Aastra_getvar_safe('orig_p'); $msg = Aastra_getvar_safe('msg'); $greet = Aastra_getvar_safe('greet'); $cause = Aastra_getvar_safe('cause', 'end'); $paused = Aastra_getvar_safe('paused', 'no'); $last_msg = Aastra_getvar_safe('last_msg'); $dpage = Aastra_getvar_safe('dpage', '1'); $dindex = Aastra_getvar_safe('dindex'); # Trace Aastra_trace_call('vmail_5_asterisk', 'ext=' . $ext . ', user='******' ,action=' . $action); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '', '3' => '', '4' => '', '5' => '3.0.1.'), '0'); # Get Language $language = Aastra_get_language(); # Keep URL $XML_SERVER .= '?ext=' . $ext . '&user='******'play_exit') { # New message to move? if ($cause != 'delete') { sscanf($msg, '%4s-%s', $msg_id, $msg_folder);
$array['trend'][$key] = '/'; } else { $array['trend'][$key] = '\\'; } } return $array; } ############################################################################# # Main program ############################################################################# # Collect user input $bdate = Aastra_getvar_safe('bdate'); $I = Aastra_getvar_safe('I', '1'); $E = Aastra_getvar_safe('E', '1'); $P = Aastra_getvar_safe('P', '1'); $user = Aastra_getvar_safe('user'); # Retrieve phone information $header = Aastra_decode_HTTP_header(); if ($user == '') { $user = $header['mac']; } # Keep return URI $XML_SERVER .= '?user='******'biorhytm', 'user='******'1.4.2.', 0); Aastra_test_php_function('imagecreate', Aastra_get_label('PHP-GD extension not installed.', $language)); $nb_softkeys = Aastra_number_softkeys_supported();
error_reporting(E_ERROR | E_PARSE); ############################################################################# # Includes ############################################################################# require_once 'AastraAsterisk.php'; ############################################################################# # Main code ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $page = Aastra_getvar_safe('page', '1'); $action = Aastra_getvar_safe('action', 'list'); $speed = Aastra_getvar_safe('speed'); $selection = Aastra_getvar_safe('selection'); $origin = Aastra_getvar_safe('origin'); $orig_s = Aastra_getvar_safe('orig_s'); # Trace Aastra_trace_call('directory_asterisk', 'user='******', action=' . $action . ', speed=' . $speed . ', selection=' . $selection); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '', '4' => '', '5' => ''), '0'); # Retrieve phone information $header = Aastra_decode_HTTP_header(); # Get 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
# Main code ############################################################################# # Retrieve parameters $ext = Aastra_getvar_safe('ext'); $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'list'); $page = Aastra_getvar_safe('page', '1'); $orig_d = Aastra_getvar_safe('orig_d'); $orig_p = Aastra_getvar_safe('orig_p'); $msg = Aastra_getvar_safe('msg'); $cause = Aastra_getvar_safe('cause', 'end'); $paused = Aastra_getvar_safe('paused', 'no'); $last_msg = Aastra_getvar_safe('last_msg'); $dpage = Aastra_getvar_safe('dpage', '1'); $dindex = Aastra_getvar_safe('dindex'); $set = Aastra_getvar_safe('set', '1'); # Trace Aastra_trace_call('vmail_4_asterisk', 'ext=' . $ext . ', user='******' ,action=' . $action); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '', '3' => '', '4' => '2.5.3.', '5' => ''), '0'); # Get Language $language = Aastra_get_language(); # Keep URL $XML_SERVER .= '?ext=' . $ext . '&user='******'play_exit') { # New message to move? if ($cause != 'delete') { sscanf($msg, '%4s-%s', $msg_id, $msg_folder);
} ############################################################################# # Active code ############################################################################# # Retrieve parameters $user = Aastra_getvar_safe('user'); $action = Aastra_getvar_safe('action', 'init'); $selection = Aastra_getvar_safe('selection'); $step = Aastra_getvar_safe('step', '1'); $input1 = Aastra_getvar_safe('input1'); $input2 = Aastra_getvar_safe('input2'); $input3 = Aastra_getvar_safe('input3'); $type = Aastra_getvar_safe('type', 'bottom'); $page = Aastra_getvar_safe('page'); $set = Aastra_getvar_safe('set', '1'); $default = Aastra_getvar_safe('default'); if ($default == '' and $page == '') { $default = $selection; } if ($page == '') { $page = '1'; } # Trace Aastra_trace_call('key_asterisk', 'user='******', action=' . $action . ', selection=' . $selection . ', step=' . $step . ', input1=' . $input1 . ', input2=' . $input2 . ', type=' . $type . ', page=' . $page . ', default=' . $default); # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Authenticate user Aastra_check_signature_Asterisk($user); # Get language $language = Aastra_get_language(); # Get MAC address and type of phone