Ejemplo n.º 1
0
    print "<p>" . T_("No operator") . "</p>";
    xhtml_foot();
    die;
}
$state = is_on_call($operator_id);
$btext = false;
if ($state == 4 && AUTO_POPUP) {
    $btext = "onload=\"poptastic('call.php')\"";
}
$js = array("js/popupkeep.js");
if (AUTO_LOGOUT_MINUTES !== false) {
    $js[] = "include/jquery/jquery-1.4.2.min.js";
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Status"), true, array("css/status.css"), $js, $btext, 60, false, false, false, false);
print "<div class='text'>" . get_operator_time($operator_id, DATE_TIME_FORMAT) . "</div>";
//need to determine VoIP status by confirming with the VoIP server if this operator is online
//Then confirm whether or not they are on a call (or use the database table, call to determine)
if (is_voip_enabled($operator_id)) {
    $ext = get_extension($operator_id);
    $exta = $ext;
    //Get just the start of the extension for auto dial out
    $exts = explode('/', $ext, 2);
    if (isset($exts[1])) {
        $exta = $exts[1];
    }
    $extp = get_extension_password($operator_id);
    if (get_extension_status($operator_id)) {
        print "<div class='online statusbutton'>" . T_("VoIP On") . "</div>";
    } else {
        print "<div class='offline statusbutton'><a href='voip/downloadvoipclient.php'>" . T_("VoIP Off") . "</a></div>";
Ejemplo n.º 2
0
 * Operator functions
 */
include "functions/functions.operator.php";
$operator_id = get_operator_id();
$case_id = get_case_id($operator_id);
if (is_on_call($operator_id) == 3) {
    if (isset($_GET['start'])) {
        $newtext = T_("Stop REC");
        xhtml_head(T_("Record"), true, array("css/call.css"), array("js/window.js"), "onload='toggleRec(\"{$newtext}\",\"record.php?stop=stop\",\"online\")'");
        if (is_voip_enabled($operator_id)) {
            $call_id = get_call($operator_id);
            if ($call_id) {
                include "functions/functions.voip.php";
                $v = new voip();
                $v->connect(VOIP_SERVER);
                $v->beginRecord(get_extension($operator_id), "{$case_id}-{$call_id}-{$operator_id}-" . get_operator_time($operator_id, $format = "%Y-%m-%d-%H-%i-%S"));
                print "<p>" . T_("Beginning recording...") . "</p>";
            } else {
                print "<p>" . T_("Not on a call, so not beginning a recording") . "</p>";
            }
        } else {
            print "<p>" . T_("Begin the manual recording now...") . "</p>";
        }
    } else {
        if (isset($_GET['stop'])) {
            $newtext = T_("Start REC");
            xhtml_head(T_("Record"), true, array("css/call.css"), array("js/window.js"), "onload='toggleRec(\"{$newtext}\",\"record.php?start=start\",\"offline\")'");
            if (is_voip_enabled($operator_id)) {
                include "functions/functions.voip.php";
                $v = new voip();
                $v->connect(VOIP_SERVER);