LICENSE: GPLv2 # # make sure you have added a user to the vicidial_users MySQL table with at least # user_level 1 or greater to access this page. Also you need to have the login # and pass of a phone listed in the asterisk.phones table. The page grabs the # server info and other details from this login and pass # # Other scripts that this application depends on: # - active_list_refresh.php: displays active/live channels and phones # - manager_send.php: sends Actions to be executed on Asterisk servers # - live_exten_check.php: checks to see if user's phone is on a live call # - call_log_display.php: retrieves log of inbound and outbound calls # - voicemail_check.php: retrieves counts of new and old messages # - inbound_popup.php: opens upon live_inbound call coming in # - conf_exten_check.php: checks to see if and calls are in a specific conf # - park_calls_display.php: retrieves list of parked calls # - vdc_db_query.php: Changes values in the DB for non-calling records # # CHANGES # 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web # 50323-1411 - First build version display-only # 50331-1040 - Second-build, added phone login and hangup/hijack display # 50401-1006 - Trunk/Local Hangup functions enabled # 50404-1056 - Trunk/Local Hijack functions enabled # 50404-1459 - Simple live calls display and grabs updated time from server # 50405-1221 - Reorganized the display and layers, added some images # 50406-1005 - Added In/Out call log display to MAIN panel # 50407-1254 - Start/Stop Recording on live calls enabled # 50422-1101 - Activated Check Voicemail button and new/old messages count # 50428-1449 - Added dial from log and basic live_inbound call popup # 50429-1455 - Modified inbound popup code for IE and to add more functions # 50502-1442 - Added basic method to transfer live calls somewhere else # 50503-1205 - Added web_client_sessions entry for more security of subscripts # 50503-1537 - Added basic conferences display # 50509-1132 - Added conference connected list and hangup/xfer for them # 50511-1129 - Added registration of conference rooms and added manual dial # 50523-1342 - Added Conference recording and send DTMF # 50523-1622 - Added Local Dial window frame for calling local extensions # 50524-1456 - Added ability to park call and display number of parked calls # 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls # 50525-1224 - Added ability to place outbound call from within conferene # 50531-1225 - Added ability to do dual transfers to meetme rooms from Main # 50711-1229 - removed HTTP authentication in favor of user/pass vars # 50711-1610 - Added Zap monitoring to Trunk/Local Action screens # 50804-1604 - Minor bug fix in inbound_popup functions # 50818-1715 - Added pretty login section # 50913-1137 - Added custom outbound_cid from phones table # 51110-1430 - Fixed non-standard http port issue # 60103-1421 - Added code for favorite extensions chooser # 60104-1347 - Added basic layout for favorites editing frame # 60105-1124 - Finished Favorites frame and added DB submission # 60112-1622 - Several formatting changes # 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES # 60619-1103 - Added variable filters to close security holes for login form # require("dbconnect.php"); #require_once("htglobalize.php"); ### If you have globals turned off uncomment these lines if (isset($_GET["user"])) {$user=$_GET["user"];} elseif (isset($_POST["user"])) {$user=$_POST["user"];} if (isset($_GET["pass"])) {$pass=$_GET["pass"];} elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} if (!isset($phone_login)) { if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} } if (!isset($phone_pass)) { if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} } $forever_stop=0; $user_abb = "$user$user$user$user"; while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $version = '1.1.12'; $build = '60619-1103'; ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); if ($force_logout) { if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); } echo "Usted ahora ha registrado hacia fuera. Gracias\n"; exit; } $StarTtime = date("U"); $NOW_TIME = date("Y-m-d H:i:s"); $FILE_TIME = date("Ymd-His"); $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); $past_month_date = date("Y-m-d H:i:s",$month_old); $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; $US='_'; $CL=':'; $fp = fopen ("./astguiclient_auth_entries.txt", "a"); $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); $script_name = getenv("SCRIPT_NAME"); $server_name = getenv("SERVER_NAME"); $server_port = getenv("SERVER_PORT"); if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} else {$HTTPprotocol = 'http://';} if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} else {$server_port = "$CL$server_port";} $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; $agcDIR = $agcPAGE; $agcDIR = eregi_replace('astguiclient.php','',$agcDIR); if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); echo "web client astGUIclient: Conexión\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Español
\n"; echo "
\n"; echo "\n"; echo "


"; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
Conexión
 
Conexión Del Usuario:
Contraseña Del Usuario:
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; exit; } else { if($auth>0) { $office_no=strtoupper($user); $password=strtoupper($pass); $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); fclose($fp); } else { fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); fclose($fp); } } header ("Content-type: text/html; charset=utf-8"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 echo "\n"; echo "\n"; echo "\n"; if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) { echo "web client astGUIclient: Conexión Del Teléfono\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n";echo "
English Español
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "


"; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
Conexión Del Teléfono
 
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; exit; } else { $authphone=0; $stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; if (!$authphone) { echo "web client astGUIclient: Conexión Del Teléfono\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Español
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "


"; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
Conexión Del Teléfono
 
Disculpe, la conexión del teléfono y contraseña no están activos en este sistema, intentelo otra vez por favor:
 
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; exit; } else { echo "web client astGUIclient\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; $dialplan_number=$row[1]; $voicemail_id=$row[2]; $phone_ip=$row[3]; $computer_ip=$row[4]; $server_ip=$row[5]; $phone_login=$row[6]; $phone_pass=$row[7]; $status=$row[8]; $active=$row[9]; $phone_type=$row[10]; $fullname=$row[11]; $company=$row[12]; $picture=$row[13]; $messages=$row[14]; $old_messages=$row[15]; $protocol=$row[16]; $local_gmt=$row[17]; $ASTmgrUSERNAME=$row[18]; $ASTmgrSECRET=$row[19]; $login_user=$row[20]; $login_pass=$row[21]; $login_campaign=$row[22]; $park_on_extension=$row[23]; $conf_on_extension=$row[24]; $VICIDiaL_park_on_extension=$row[25]; $VICIDiaL_park_on_filename=$row[26]; $monitor_prefix=$row[27]; $recording_exten=$row[28]; $voicemail_exten=$row[29]; $voicemail_dump_exten=$row[30]; $ext_context=$row[31]; $dtmf_send_extension=$row[32]; $call_out_number_group=$row[33]; $client_browser=$row[34]; $install_directory=$row[35]; $local_web_callerID_URL=$row[36]; $VICIDiaL_web_URL=$row[37]; $AGI_call_logging_enabled=$row[38]; $user_switching_enabled=$row[39]; $conferencing_enabled=$row[40]; $admin_hangup_enabled=$row[41]; $admin_hijack_enabled=$row[42]; $admin_monitor_enabled=$row[43]; $call_parking_enabled=$row[44]; $updater_check_enabled=$row[45]; $AFLogging_enabled=$row[46]; $QUEUE_ACTION_enabled=$row[47]; $CaLLerID_popup_enabled=$row[48]; $voicemail_button_enabled=$row[49]; $enable_fast_refresh=$row[50]; $fast_refresh_rate=$row[51]; $enable_persistant_mysql=$row[52]; $auto_dial_next_number=$row[53]; $VDstop_rec_after_each_call=$row[54]; $DBX_server=$row[55]; $DBX_database=$row[56]; $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; $outbound_cid=$row[65]; $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); $session_ext = eregi_replace("[^a-z0-9]", "", $extension); if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} $session_rand = (rand(1,9999999) + 10000000); $session_name = "$StarTtime$US$session_ext$session_rand"; $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $favorites_present=$row[0]; if ($favorites_present > 0) { $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $favorites_list=$row[0]; $h=0; $favorites_listX = eregi_replace("'",'',$favorites_list); $favorites = explode(',',$favorites_listX); $favorites_count = count($favorites); $favorites_listX=''; $o=0; while ($favorites_count > $o) { $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; $rslt=mysql_query($stmt, $link); $rowx=mysql_fetch_row($rslt); $favorites_names[$o] = $rowx[0]; $favorites_listX .= "$rowx[1]/$favorites[$o],"; $o++; } echo "\n"; echo "\n"; } else { echo "\n"; } ### gather phone extensions and fullnames for favorites editor ### $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $exten_ct = mysql_num_rows($rslt); $favlistCT=0; $nofavlistCT=0; while ($favlistCT < $exten_ct) { $row=mysql_fetch_row($rslt); $favlist[$favlistCT]= "$row[0] - $row[1]"; $favlistCT++; } } } ?> \n"; ?>
SALIR
\n"; ?>
Pantalla Principal Pantalla Lineas Activas Pantalla de Conferencias Comprobar buzón de voz Llamada Activa

Logout
TRUNK COLGAR

Active Trunks Menu
Colgar Trunk   |   Capturar Trunk   |   Escuchar Trunk   |   Recarga   |   Volver a la pantalla principal
Colgar Local

Menú Local Activa
Colgar Local   |   Capturar Local   |   Escuchar Local   |   Recarga   |   Volver a la pantalla principal
TRANSFERIR LLAMADA ACTIVA
Canal que va a ser transferido: Canal
Extensiones:
Menú Extensiones

Envíe a la extensión seleccionada

Enviar al buzón de voz seleccionada

Envíe a este número:


Recarga


Volver a la pantalla principal

Conferencias:
(Pinchar en un número de abajo para enviar a una conferencia)
Enviar mi canal también
Menú de Conferencias
Marcar a Extensiones LOCALES
Teléfono llamando desde: Canal
Extensiones:
Menú Extensiones

Llamar extensión seleccionada

Llamar buzón de voz seleccionado

Recarga


Volver a la pantalla principal

LLAMADAS APARCADAS:
Volver a la pantalla principal

 
BUZÓN DE VOZ     NUEVO:     VIEJO:             MARCADO MANUAL       DIAL
LLAMADAS APARCADAS: 0                MARCAR EXTENSIONES LOCALES
LLAMADAS SALIENTES:
LLAMADAS ENTRANTES:
versión astGUIclient del tela-cliente: CONSTRUCCION:
$h) { if (strlen($favorites[$h])>1) { echo "\n"; } $h++; } ?>
FAVORITOS       corrija
$favorites[$h] - $favorites_names[$h]
 
FAVORITOS

 
SOMETA LOS CAMBIOS de los FAVORITOS - requiere registro de estado de la máquina
DE NUEVO A VENTANA PRINCIPAL - no haga caso de los cambios realizados
PAUSA | COMIENZO     Actualizar la tarifa: 1000 ms Más rápido | Más lento

Inizializando..
Extensiones Activas
ACTUALIZAR | ORDEN |
Líneas de salida
ACTUALIZAR | ORDEN |
Extensiones Locales
ACTUALIZAR | ORDEN |
Los Datos Van Aquí

Los Datos Van Aquí

Acciones en Trunk
Los Datos Van Aquí

Acción Local
Lista De las Conferencias
Pinchar a la izquierda del número de una sala de conferencias para obtener información