*/ include "db.inc.php"; /** * Authentication */ require "auth-interviewer.php"; /** * XHTML functions */ include "functions/functions.xhtml.php"; /** * Operator functions */ include "functions/functions.operator.php"; $operator_id = get_operator_id(); $state = is_on_call($operator_id); $js = array("js/popup.js"); if (browser_ie()) { $js[] = "js/window_ie6_interface2.js"; } else { $js[] = "js/window_interface2.js"; } if (AUTO_LOGOUT_MINUTES !== false) { $js[] = "include/jquery/jquery-1.4.2.min.js"; $js[] = "js/childnap.js"; } xhtml_head(T_("Status"), false, array("include/bootstrap/css/bootstrap.min.css", "css/status_interface2.css"), $js); $ca = get_call_attempt($operator_id, false); if ($ca) { $respondent_id = get_respondent_id($ca); $case_id = get_case_id($operator_id);
include "config.inc.php"; /** * XHTML functions */ include "functions/functions.xhtml.php"; /** * Authentication */ require "auth-interviewer.php"; /** * 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 {
/** * Authentication */ require "auth-interviewer.php"; /** * XHTML functions */ include "functions/functions.xhtml.php"; /** * Operator functions */ include "functions/functions.operator.php"; xhtml_head(T_("Supervisor")); //display introduction text $operator_id = get_operator_id(); $callstatus = is_on_call($operator_id); if ($callstatus == 3) { print "<p>" . T_("Please wait till you have ended this call to call the supervisor") . "</p>"; /* if (is_voip_enabled($operator_id)) { if (isset($_GET['callsupervisor'])) { include("functions/functions.voip.php"); $v = new voip(); $v->connect(VOIP_SERVER); if (strcmp($_GET['callsupervisor'],"hangup") == 0) { $v->hangup(get_extension($operator_id)); print "<p>" . T_("You may now close this window") . "</p>"; }
echo T_("Please click on:") . " " . T_("Call/Hangup") . " " . T_("to display call script"); ?> </h1> <?php //auto dial, if set should check for numbers to call. If one or more, set a timer for calling the first available number //if none - timer should end the case // //if the user clicks on call / hangup the timer should stop if (AUTO_DIAL_SECONDS !== false) { include_once "functions/functions.operator.php"; $operator_id = get_operator_id(); $call_attempt_id = get_call_attempt($operator_id, false); $case_id = get_case_id($operator_id); $contact_phone_id = false; //first check we aren't already on a call if (is_on_call($operator_id) == false) { //check if voip is enabled and available if (is_voip_enabled($operator_id)) { if (get_extension_status($operator_id)) { //if we are on an appointment, we will just call the specified number for the appointment $appointment_id = is_on_appointment($call_attempt_id); if ($appointment_id) { $sql = "SELECT c.contact_phone_id\r\n FROM contact_phone as c, appointment as a\r\n WHERE a.appointment_id = '{$appointment_id}'\r\n AND a.contact_phone_id = c.contact_phone_id"; $contact_phone_id = $db->GetOne($sql); } else { //determine whether we should make any more calls based on the last call outcome $sql = "SELECT o.tryanother, o.require_note\r\n FROM `call` as c, `outcome` as o\r\n WHERE c.call_attempt_id = '{$call_attempt_id}'\r\n AND c.outcome_id = o.outcome_id\r\n ORDER BY call_id DESC\r\n LIMIT 1"; $rs = $db->GetRow($sql); if (empty($rs) || $rs['tryanother'] == 1) { $rn = 0; if (!empty($rs) && $rs['require_note'] == 1) {