diff --git a/app/calls_active/app_config.php b/app/calls_active/app_config.php index 5f11229acf..ccd927cc75 100644 --- a/app/calls_active/app_config.php +++ b/app/calls_active/app_config.php @@ -23,51 +23,22 @@ $apps[$x]['permissions'][0]['name'] = "call_active_view"; $apps[$x]['permissions'][0]['menu']['uuid'] = "eba3d07f-dd5c-6b7b-6880-493b44113ade"; $apps[$x]['permissions'][0]['groups'][] = "superadmin"; + $apps[$x]['permissions'][0]['groups'][] = "admin"; - $apps[$x]['permissions'][1]['name'] = "call_active_transfer"; - $apps[$x]['permissions'][1]['groups'][] = "superadmin"; + //$apps[$x]['permissions'][1]['name'] = "call_active_transfer"; + //$apps[$x]['permissions'][1]['groups'][] = "superadmin"; $apps[$x]['permissions'][2]['name'] = "call_active_hangup"; $apps[$x]['permissions'][2]['groups'][] = "superadmin"; + $apps[$x]['permissions'][2]['groups'][] = "admin"; - $apps[$x]['permissions'][3]['name'] = "call_active_park"; - $apps[$x]['permissions'][3]['groups'][] = "superadmin"; + //$apps[$x]['permissions'][3]['name'] = "call_active_park"; + //$apps[$x]['permissions'][3]['groups'][] = "superadmin"; - $apps[$x]['permissions'][4]['name'] = "call_active_rec"; - $apps[$x]['permissions'][4]['groups'][] = "superadmin"; + //$apps[$x]['permissions'][4]['name'] = "call_active_rec"; + //$apps[$x]['permissions'][4]['groups'][] = "superadmin"; - $apps[$x]['permissions'][5]['name'] = "extension_active_view"; - $apps[$x]['permissions'][0]['menu']['uuid'] = "6dd85c19-cb6b-5cca-bf32-499bbe936f79"; - //$apps[$x]['permissions'][5]['groups'][] = "user"; - $apps[$x]['permissions'][5]['groups'][] = "admin"; + $apps[$x]['permissions'][5]['name'] = "call_active_all"; $apps[$x]['permissions'][5]['groups'][] = "superadmin"; - $apps[$x]['permissions'][6]['name'] = "extension_active_transfer"; - $apps[$x]['permissions'][6]['groups'][] = "admin"; - $apps[$x]['permissions'][6]['groups'][] = "superadmin"; - - $apps[$x]['permissions'][7]['name'] = "extension_active_hangup"; - $apps[$x]['permissions'][7]['groups'][] = "admin"; - $apps[$x]['permissions'][7]['groups'][] = "superadmin"; - - $apps[$x]['permissions'][8]['name'] = "extension_active_park"; - $apps[$x]['permissions'][8]['groups'][] = "admin"; - $apps[$x]['permissions'][8]['groups'][] = "superadmin"; - - $apps[$x]['permissions'][9]['name'] = "extension_active_rec"; - $apps[$x]['permissions'][9]['groups'][] = "admin"; - $apps[$x]['permissions'][9]['groups'][] = "superadmin"; - - $apps[$x]['permissions'][10]['name'] = "extension_active_list_view"; - $apps[$x]['permissions'][10]['menu']['uuid'] = "6dd85c19-cb6b-5cca-bf32-499bbe936f79"; - //$apps[$x]['permissions'][10]['groups'][] = "user"; - $apps[$x]['permissions'][10]['groups'][] = "admin"; - $apps[$x]['permissions'][10]['groups'][] = "superadmin"; - - $apps[$x]['permissions'][11]['name'] = "extension_active_assigned_view"; - $apps[$x]['permissions'][11]['menu']['uuid'] = "6dd85c19-cb6b-5cca-bf32-499bbe936f79"; - //$apps[$x]['permissions'][11]['groups'][] = "user"; - $apps[$x]['permissions'][11]['groups'][] = "admin"; - $apps[$x]['permissions'][11]['groups'][] = "superadmin"; - ?> \ No newline at end of file diff --git a/app/calls_active/app_languages.php b/app/calls_active/app_languages.php index 31aa670fbf..617ee2bd57 100644 --- a/app/calls_active/app_languages.php +++ b/app/calls_active/app_languages.php @@ -13,8 +13,8 @@ $text['title']['es-cl'] = "Llamadas Activas"; $text['title']['fr-fr'] = "Communications Actives"; $text['title']['pt-pt'] = "Chamadas Ativas"; $text['title']['pt-br'] = "Configurações da Conta"; -$text['title']['pl'] = "Ustawienia konta"; -$text['title']['sv-se'] = "Aktiva samtal"; +$text['title']['pl'] = "Aktywne Rozmowy"; +$text['title']['sv-se'] = "Aktiva Samtal"; $text['label-time']['en-us'] = "Time"; $text['label-time']['es-cl'] = "Tiempo"; @@ -56,6 +56,20 @@ $text['label-secure']['pt-br'] = "Seguro"; $text['label-secure']['pl'] = "Bezpieczny"; $text['label-secure']['sv-se'] = "Skydda"; +$text['label-refresh_pause']['en-us'] = "Pause Refresh"; +$text['label-refresh_pause']['es-cl'] = "Actualizar Pausa"; +$text['label-refresh_pause']['pt-pt'] = "Pausa Atualizar"; +$text['label-refresh_pause']['fr-fr'] = "Pause Actualiser"; +$text['label-refresh_pause']['pt-br'] = "Pausar atualização"; +$text['label-refresh_pause']['pl'] = "Pauzuj odÅ›wieżanie"; + +$text['label-refresh_enable']['en-us'] = "Enable Refresh"; +$text['label-refresh_enable']['es-cl'] = "Activar Actualizar"; +$text['label-refresh_enable']['pt-pt'] = "Habilitar Atualização"; +$text['label-refresh_enable']['fr-fr'] = "Activer Actualiser"; +$text['label-refresh_enable']['pt-br'] = "Habilitar atualização"; +$text['label-refresh_enable']['pl'] = "Włącz odÅ›wieżanie"; + $text['label-profile']['en-us'] = "Profile"; $text['label-profile']['es-cl'] = "Perfil"; $text['label-profile']['fr-fr'] = "Profile"; @@ -128,6 +142,13 @@ $text['label-ext']['pt-br'] = "Extensão"; $text['label-ext']['pl'] = "Numer wewnętrzny"; $text['label-ext']['sv-se'] = "Ank"; +$text['label-domain']['en-us'] = "Domain"; +$text['label-domain']['es-cl'] = "Dominio"; +$text['label-domain']['pt-pt'] = "Domínio"; +$text['label-domain']['fr-fr'] = "Domaine"; +$text['label-domain']['pt-br'] = "Dominio"; +$text['label-domain']['pl'] = "Domena"; + $text['label-destination']['en-us'] = "Dest"; $text['label-destination']['es-cl'] = "Destino"; $text['label-destination']['fr-fr'] = "Dest"; @@ -181,7 +202,7 @@ $text['description-2']['es-cl'] = "Utilice este menú para ver todas las extensi $text['description-2']['fr-fr'] = "Voir toutes les extensions, superviser et interagir avec les Communications Actives."; $text['description-2']['pt-pt'] = "Utilize este menu para ver todas as extensões, monitorizar e interagir com as chamadas activas."; $text['description-2']['pt-br'] = "A informação contem a origem, destino, duração e outros detalhes úteis da chamada."; -$text['description-2']['pl'] = "Użyj tej opcji, aby zobaczyć wszystkie numery wewnętrzne i monitorować interakcję z aktywnymi połączeniami."; +$text['description-2']['pl'] = "Użyj tej opcji, aby zobaczyć wszystkie numery wewnętrzne i monitorować interakcję z aktywnymi rozmowami."; $text['description-2']['sv-se'] = "Använd detta för att se alla anknytningar och monitorera och hantera aktiva samtal."; $text['description']['en-us'] = "Use this to monitor and interact with the active calls."; @@ -189,7 +210,7 @@ $text['description']['es-cl'] = "Utilice este menú para monitorear e interactua $text['description']['fr-fr'] = "Superviser et interagir avec les Communications Actives."; $text['description']['pt-pt'] = "Utilize este menu para monitorizar e interagir com as chamadas activas."; $text['description']['pt-br'] = "Editar informações da conta."; -$text['description']['pl'] = "Użyć tej opcji do monitorowania i interakcji z aktywnymi połączeniami."; +$text['description']['pl'] = "Użyć tej opcji do monitorowania i interakcji z aktywnymi rozmowami."; $text['description']['sv-se'] = "Använd detta för att monitorera och hantera aktiva samtal."; $text['confirm-socket']['en-us'] = "Connection to Event Socket failed."; @@ -197,7 +218,7 @@ $text['confirm-socket']['es-cl'] = "Conexión con socket fallida."; $text['confirm-socket']['fr-fr'] = "la Connexion au Event Socket a échoué."; $text['confirm-socket']['pt-pt'] = "A conexão ao Event Socket falhou."; $text['confirm-socket']['pt-br'] = "A conexão ao evento socket falhou"; -$text['confirm-socket']['pl'] = "Polaczenie do Event Socket nie powiodło się"; +$text['confirm-socket']['pl'] = "Polaczenie do Event Socket nie powiodło się"; $text['confirm-socket']['sv-se'] = "Anslutning till 'Event Socket' misslyckades"; $text['confirm-hangup']['en-us'] = "Do you really want to hangup this call?"; @@ -248,4 +269,17 @@ $text['check-available-on-demand-status']['pt-br'] = "Disponível (A pedido)"; $text['check-available-on-demand-status']['pl'] = "Dostępny (na żądanie)"; $text['check-available-on-demand-status']['sv-se'] = "Anträffbar (På Begäran) "; +$text['button-show_all']['en-us'] = "Show All"; +$text['button-show_all']['es-cl'] = "Mostrar Todos"; +$text['button-show_all']['pt-pt'] = "Mostrar Todos"; +$text['button-show_all']['fr-fr'] = "Montrer Tout"; +$text['button-show_all']['pt-br'] = "Mostrar Todos"; +$text['button-show_all']['pl'] = "Pokaż Wszystkie"; + +$text['button-back']['en-us'] = "Back"; +$text['button-back']['es-cl'] = "Volver"; +$text['button-back']['pt-pt'] = "Voltar"; +$text['button-back']['fr-fr'] = "Retour"; +$text['button-back']['pt-br'] = "Voltar"; +$text['button-back']['pl'] = "Wróć"; ?> \ No newline at end of file diff --git a/app/calls_active/app_menu.php b/app/calls_active/app_menu.php index f232429cc2..51357e2029 100644 --- a/app/calls_active/app_menu.php +++ b/app/calls_active/app_menu.php @@ -12,5 +12,6 @@ $apps[$x]['menu'][0]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1"; $apps[$x]['menu'][0]['category'] = "internal"; $apps[$x]['menu'][0]['path'] = "/app/calls_active/calls_active.php"; $apps[$x]['menu'][0]['groups'][] = "superadmin"; +$apps[$x]['menu'][0]['groups'][] = "admin"; ?> \ No newline at end of file diff --git a/app/calls_active/calls_active.php b/app/calls_active/calls_active.php index 31e6d6136e..6544f2f55a 100644 --- a/app/calls_active/calls_active.php +++ b/app/calls_active/calls_active.php @@ -37,83 +37,112 @@ else { $language = new text; $text = $language->get(); -$document['title'] = $text['title']; -require_once "resources/header.php"; -?> +//get the HTTP values and set as variables + $show = trim($_REQUEST["show"]); + if ($show != "all") { $show = ''; } - + if (window.addEventListener) { + window.addEventListener('load', requestTime, false); + } + else if (window.attachEvent) { + window.attachEvent('onload', requestTime); + } + + //refresh controls + function refresh_stop() { + clearInterval(interval_timer_id); + document.getElementById('refresh_state').innerHTML = "\"<?php\" title=\"\">"; + } + + function refresh_start() { + if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "\"<?php\" title=\"\">"; } + interval_timer_id = setInterval( function() { + url = source_url; + new loadXmlHttp(url, 'ajax_reponse'); + }, refresh); + } + + //call controls + function hangup(uuid) { + if (confirm("")) { + send_cmd('calls_exec.php?cmd=uuid_kill%20'+uuid); + } + } + + function send_cmd(url) { + if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari + xmlhttp=new XMLHttpRequest(); + } + else {// code for IE6, IE5 + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + xmlhttp.open("GET",url,false); + xmlhttp.send(null); + document.getElementById('cmd_reponse').innerHTML=xmlhttp.responseText; + } + + ".$text['title'].""; -echo "

\n"; -echo $text['description']."\n"; -echo "

\n"; - echo "
\n"; echo "\n"; echo "


"; diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php index 0b48b91138..d9948a1377 100644 --- a/app/calls_active/calls_active_inc.php +++ b/app/calls_active/calls_active_inc.php @@ -38,6 +38,10 @@ else { $language = new text; $text = $language->get(); +//get the HTTP values and set as variables + $show = trim($_REQUEST["show"]); + if ($show != "all") { $show = ''; } + //include theme config for button images include_once("themes/".$_SESSION['domain']['template']['name']."/config.php"); @@ -67,6 +71,33 @@ else { //set the array $results = json_decode($json, "true"); + //define js function call var + $onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'"; + + //show content + echo ""; + echo " "; + echo " "; + echo " "; + echo " "; + echo "
"; + echo " \"".$text['label-refresh_pause']."\""; + echo " "; + if (permission_exists('call_active_all')) { + if ($show == "all") { + echo " \n"; + } + else { + echo " \n"; + } + } + echo "
"; + + echo "".$text['title'].""; + echo "

\n"; + echo $text['description']."\n"; + echo "

\n"; + //set the alternating color for each row $c = 0; $row_style["0"] = "row_style0"; @@ -79,6 +110,9 @@ else { echo "\n"; echo "".$text['label-profile']."\n"; echo "".$text['label-created']."\n"; + if ($show == 'all') { + echo "".$text['label-domain']."\n"; + } echo "".$text['label-number']."\n"; echo "".$text['label-cid-name']."\n"; echo "".$text['label-cid-number']."\n"; @@ -90,6 +124,14 @@ else { echo "\n"; foreach ($results["rows"] as $row) { + //determine show all + if (!($show == 'all' && permission_exists('call_active_all'))) { + $foreign_call = true; + foreach ($row as $key => $value) { + if (substr_count($value, $_SESSION['domain_name']) > 0) { $foreign_call = false; } + } + if ($foreign_call) { continue; } + } //set the php variables foreach ($row as $key => $value) { $$key = $value; @@ -108,12 +150,32 @@ else { $tmp_number = $temp_array[0]; $tmp_number = str_replace("sip:", "", $tmp_number); + //get the domain + if ($show == 'all') { + if (substr_count($presence_id, '@') > 0) { + $presence_id_array = explode('@', $presence_id); + $domain_name = $presence_id_array[1]; + } + else if ($context != '') { + if (substr_count($context, '@') > 0) { + $context_array = explode('@', $context); + $domain_name = $context_array[1]; + } + else { + $domain_name = $context; + } + } + } + //remove the '+' because it breaks the call recording $cid_num = str_replace("+", "", $cid_num); echo "\n"; echo "".$sip_profile." \n"; echo "".$created." \n"; + if ($show == 'all') { + echo "".$domain_name." \n"; + } echo "".$tmp_number." \n"; echo "".$cid_name." \n"; echo "".$cid_num." \n"; diff --git a/app/calls_active/resources/images/refresh_active.gif b/app/calls_active/resources/images/refresh_active.gif new file mode 100644 index 0000000000..305457831c Binary files /dev/null and b/app/calls_active/resources/images/refresh_active.gif differ diff --git a/app/calls_active/resources/images/refresh_paused.png b/app/calls_active/resources/images/refresh_paused.png new file mode 100644 index 0000000000..38937ec1f2 Binary files /dev/null and b/app/calls_active/resources/images/refresh_paused.png differ diff --git a/app/registrations/status_registrations.php b/app/registrations/status_registrations.php index cc087d9e8b..834b59f0c8 100644 --- a/app/registrations/status_registrations.php +++ b/app/registrations/status_registrations.php @@ -103,9 +103,6 @@ require_once "resources/check_auth.php"; window.attachEvent('onload', requestTime); } - var record_count = 0; - var destination; - //refresh controls function refresh_stop() { clearInterval(interval_timer_id); @@ -122,15 +119,10 @@ require_once "resources/check_auth.php"; - \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
".date('Y-m-d-s')."
\n"; - echo " "; - echo " "; - echo ""; +\n"; + echo "\n"; + echo "


"; //get the footer require_once "resources/footer.php"; diff --git a/app/registrations/status_registrations_inc.php b/app/registrations/status_registrations_inc.php index 8a5a35215b..f8270ddd84 100644 --- a/app/registrations/status_registrations_inc.php +++ b/app/registrations/status_registrations_inc.php @@ -41,7 +41,7 @@ require_once "resources/check_auth.php"; $language = new text; $text = $language->get(); -//get the HTTP values asn set as variables +//get the HTTP values and set as variables $sip_profile_name = trim($_REQUEST["profile"]); $show = trim($_REQUEST["show"]); if ($show != "all") { $show = ''; } @@ -122,7 +122,7 @@ require_once "resources/check_auth.php"; } //show the registrations - echo "\n"; + echo "
\n"; echo "\n"; echo "
\n"; echo " ".$text['header-registrations'].": ".count($registrations)."\n"; @@ -144,7 +144,7 @@ require_once "resources/check_auth.php"; echo "
\n"; echo "
\n"; - echo "\n"; + echo "
\n"; echo "\n"; echo " \n"; echo " \n";
".$text['label-user']."".$text['label-agent']."