# Display error message require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('Message forward', $language)); $object->setText(Aastra_get_label('No other user with voicemail configured on the platform.', $language)); $object->addSoftkey('6', Aastra_get_label('Close', $language), $XML_SERVER . '&action=detail&msg=' . $msg); } break; # Submit forward # Submit forward case 'dsubmit': # Decode current Message sscanf($msg, '%4s-%s', $msg_id, $msg_folder); # Retrieve cached data $array = Aastra_read_session('vmail', $ext); $directory = unserialize(base64_decode($array['directory'])); # Forward to all selected foreach ($directory as $key => $value) { if ($value['select']) { Aastra_forward_to_user_Asterisk($user, $value['number'], $msg_id, $msg_folder, 'INBOX'); } } # Display message $action = 'flash'; $flash_next = $XML_SERVER . '&action=detail&msg=' . $msg; $flash_text = Aastra_get_label('Message forwarded to the selected user(s).', $language); break; } # Post-process action switch ($action) {
# 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; } } # ALERT SYSTEM if (file_exists('../alert/alert.php') and $name == 'Alert Server') { # Call initial script $object = new AastraIPPhoneExecute(); $object->addEntry($XML_SERVER_PATH . '../alert/alert.php?action=display&mac=' . $number); $object->addEntry($XML_SERVER_PATH . '../alert/alert.php?action=msg&mac=' . $number); $object->addEntry($XML_SERVER_PATH . '../alert/alert.php?action=key&mac=' . $number); $object->addEntry($XML_SERVER_PATH . '../alert/alert.php?action=led&mac=' . $number);
$object->addSoftkey('4', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=zoom'); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=zoom', 1); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 2); $object->setCancelAction($XML_SERVER . '&action=zoom'); $object->addIcon(1, 'Icon:PresenceNotAvailable'); $object->addIcon(2, 'Icon:CircleRed'); } } break; # Set speed dial # Set speed dial case 'set_speed': # Retrieve session $array = Aastra_read_session('csv_directory'); $temp = unserialize(base64_decode($array['csv_directory'])); $directory = $temp[1]; # Update global variable $XML_SERVER .= '&lookup=' . $lookup . '&lastn=' . $lastn . '&firstn=' . $firstn . '&index=' . $index . '&page=' . $page . '&company=' . $company; # Get user context if ($asterisk) { $conf_speed = Aastra_get_user_context(Aastra_get_userdevice_Asterisk($user), 'speed'); } else { $conf_speed = Aastra_get_user_context($user, 'speed'); } # Save the new speed dial if ($ARRAY_USER['display'] == 'firstlast') { $name = $directory[$index]['first'] . ' ' . $directory[$index]['last']; } else { $name = $directory[$index]['last'] . ' ' . $directory[$index]['first'];
require_once 'AastraIPPhoneConfiguration.class.php'; $object = new AastraIPPhoneConfiguration(); foreach ($temp[1] as $value) { $object->addEntry($value['param'], $value['value']); } } 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;