Example #1
0
} else {
    $ocultar = "false";
}
if (isset($_SESSION['QSTATS']['filter'])) {
    $filter = $_SESSION['QSTATS']['filter'];
} else {
    $filter = "";
}
$am = new AsteriskManager();
$am->connect($manager_host, $manager_user, $manager_secret);
$channels = get_channels($am);
foreach ($channels as $ch => $chv) {
    list($chan, $ses) = split("-", $ch, 2);
    $inuse["{$chan}"] = $ch;
}
$queues = get_queues($am, $channels);
foreach ($queues as $key => $val) {
    $queue[] = $key;
}
///QUEUES
//echo $lang[$language]['agent_status']." <br/><br/>";
$color['unavailable'] = "flesh_off.png";
$color['unknown'] = "#dadada";
$color['busy'] = "flesh_inc.png";
$color['dialout'] = "#d0303f";
$color['ringing'] = "flesh_ringing.png";
$color['not in use'] = "flesh_free.png";
$color['paused'] = "#000000";
foreach ($filter_queues as $qn) {
    if ($filter == "" || stristr($qn, $filter)) {
        $contador = 1;
Example #2
0
     } 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':
     $refresh = 0;
 case 'show_queues':
     # Retrieve the list of queues
     $queues = get_queues($agent);
     $agents = get_agent_status('', $agent);
     # Display list of queues or error
     if (sizeof($queues)) {
         # Check if at least one queue allowed
         foreach ($queues as $key => $value) {
             if (!$value['Allowed']) {
                 unset($queues[$key]);
             }
         }
         # At least one queue allowed for the user
         if (sizeof($queues)) {
             # Retrieve the size of the display
             $chars_supported = Aastra_size_display_line();
             if (Aastra_is_style_textmenu_supported()) {
                 $chars_supported--;