Portions created by the Initial Developer are Copyright (C) 2008-2025 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ //includes files require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once "resources/check_auth.php"; //check permissions if (permission_exists('call_active_view')) { //access granted } else { echo "access denied"; exit; } //add multi-lingual support $language = new text; $text = $language->get(); //get the HTTP values and set as variables $show = trim($_REQUEST["show"] ?? ''); if ($show != "all") { $show = ''; } //show the header $document['title'] = $text['title']; require_once "resources/header.php"; //load gateways into a session variable $sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true' "; $database = new database; $gateways = $database->select($sql, $parameters ?? null, 'all'); foreach ($gateways as $row) { $_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway']; } //ajax for refresh ?> create('/app/calls_active/calls_active_inc.php'); $_SESSION['app']['calls_active']['token']['name'] = $token['name']; $_SESSION['app']['calls_active']['token']['hash'] = $token['hash']; //show the content header echo "
\n"; echo "
".$text['title']."
".number_format($num_rows)."
\n"; echo "
\n"; echo " ".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()']).""; if (permission_exists('call_active_eavesdrop') && !empty($user['extensions'])) { if (sizeof($user['extensions']) > 1) { echo " \n"; echo " \n"; echo " \n"; } else if (sizeof($user['extensions']) == 1) { echo " \n"; } } if (permission_exists('call_active_hangup') && $rows) { echo button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'phone-slash','id'=>'btn_delete','onclick'=>"refresh_stop(); modal_open('modal-hangup','btn_hangup');"]); } if (permission_exists('call_active_all')) { if ($show == "all") { echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$theme_button_icon_back,'link'=>'calls_active.php','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); } else { echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$theme_button_icon_all,'link'=>'calls_active.php?show=all','onmouseover'=>'refresh_stop()','onmouseout'=>'refresh_start()']); } } echo "
\n"; echo "
\n"; echo "
\n"; if (permission_exists('call_active_hangup') && $rows) { echo modal::create(['id'=>'modal-hangup','type'=>'general','message'=>$text['confirm-hangups'],'actions'=>button::create(['type'=>'button','label'=>$text['label-hangup'],'icon'=>'check','id'=>'btn_hangup','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('hangup'); list_form_submit('form_list');"])]); } echo $text['description']."\n"; echo "

\n"; //show the content body echo "
\n"; echo "\n"; echo "\n"; echo "


"; //show the footer require_once "resources/footer.php"; /* // deprecated functions for this page function get_park_cmd(uuid, context) { cmd = \"uuid_transfer \"+uuid+\" -bleg *6000 xml \"+context; return escape(cmd); } function get_record_cmd(uuid, prefix, name) { cmd = \"uuid_record \"+uuid+\" start ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/\"+uuid+\".wav\"; return escape(cmd); } */ ?>