Aastra_propagate_changes_Asterisk('', Aastra_get_userdevice_Asterisk($user), array('follow')); } } } # Enable/disable CFWD if ($cfwd_enable) { Aastra_manage_cf_Asterisk($user, 'set', $away['act_param'][$value1]); } if ($cfwd_disable) { Aastra_manage_cf_Asterisk($user, 'cancel', ''); } if ($cfwd_enable or $cfwd_disable) { if ($AA_FREEPBX_MODE == '1') { $object->addEntry($XML_SERVER_PATH . 'cfwd.php?user='******'&action=check'); } else { Aastra_propagate_changes_Asterisk('', Aastra_get_userdevice_Asterisk($user), array('cfwd')); } } # Complete the 'Back' status if ($value1 == AA_PRESENCE_AVAILABLE) { # Delete Temp message 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)); } }
Aastra_save_user_context($user, 'follow', $data); $object->setBeep(); $object->addEntry($XML_SERVER . '&action=msg&value=' . $fm); if ($key != '') { if (Aastra_is_ledcontrol_supported()) { if ($fm == '0') { $object->AddEntry('Led: ' . $key . '=off'); } else { $object->AddEntry('Led: ' . $key . '=on'); } } } } # Send a SIP Notification if mode is device and user if (!$AA_FREEPBX_USEDEVSTATE and $AA_FREEPBX_MODE == '2') { Aastra_propagate_changes_Asterisk($user, Aastra_get_userdevice_Asterisk($user), array('follow')); } # Back to the display if ($action == 'change_status') { $object->addEntry($XML_SERVER); } else { $object->addEntry(''); } break; # Modify confirmation # Modify confirmation case 'change_grpconf': # Get Current value $fm = Aastra_manage_followme_Asterisk($user, 'get_all'); # Set new Value if ($fm['grpconf']) {
# Authenticate case 'authenticate': # Password OK if ($password == $q_pass) { # Get agent status for this queue $status = get_agent_status($queue, $agent); # Add agent to the queue Aastra_queue_add_Asterisk($agent, $queue, $status['Penalty']); # Next actions require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute(); # Update via the "check" mechanism $object->addEntry($XML_SERVER . '&action=check'); # Send a SIP Notification if mode is device and user if ($AA_FREEPBX_MODE == '2') { Aastra_propagate_changes_Asterisk($agent, Aastra_get_userdevice_Asterisk($agent), array('agent')); } # Callback for the display $object->addEntry($XML_SERVER . '&action=show_queues&queue' . $queue); } else { # Input password again require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute(); $object->addEntry($XML_SERVER . '&action=log&queue=' . $queue . '&q_pass='******'&q_desc=' . $q_desc); } break; # Show Queues # Show Queues case 'show_queues_page': $queue = ''; case 'refresh':