updated language builds

updated INSTALL file

git-svn-id: svn://192.168.202.10@236 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-08-29 20:45:45 +00:00
parent 927ee7b15e
commit 00f06be90b
158 changed files with 11538 additions and 3716 deletions
+7 -1
View File
@@ -1,7 +1,13 @@
################ INSTALL
Short installation instructions for astGUIclient 2.0 tree will go here.
For in-depth installation instructions read the docs/SCRATCH_INSTALL.txt file
For more brief install instructions read the docs/BASE_INSTALL.txt file
For Requirements of astGUIclient/VICIDIAL read the docs/REQUIREMENTS.txt file
To place the astGUIclient/VICIDIAL files where they belong on the server:
run the install.pl script from this directory:
perl install.pl
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+15 -9
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ $agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
$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);
if ($WeBRooTWritablE > 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);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
-125
View File
@@ -1,125 +0,0 @@
<?
define ('ADAY', (60*60*24));
$CdayARY = getdate();
$Cmon = $CdayARY['mon'];
$Cyear = $CdayARY['year'];
$CTODAY = date("Y-m");
$CTODAYmday = date("j");
$CINC=0;
$Cmonths = Array('January','February','March','April','May','June',
'July','August','September','October','November','December');
$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
$CCAL_OUT = '';
$CCAL_OUT .= "<table border=0 cellpadding=2 cellspacing=2>";
while ($CINC < 12)
{
if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) )
{$CCAL_OUT .= "<tr>";}
$CCAL_OUT .= "<td valign=top>";
$CYyear = $Cyear;
$Cmonth= ($Cmon + $CINC);
if ($Cmonth > 12)
{
$Cmonth = ($Cmonth - 12);
$CYyear++;
}
$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear);
$CfirstdayARY = getdate($Cstart);
#echo "|$Cmon|$Cmonth|$CINC|\n";
$CPRNTDAY = date("Y-m", $Cstart);
$CCAL_OUT .= "<table border=1 cellpadding=1 bordercolor=\"000000\" cellspacing=\"0\">";
$CCAL_OUT .= "<tr>";
$CCAL_OUT .= "<td colspan=7 bordercolor=\"#ffffff\" bgcolor=\"#FFFFCC\">";
$CCAL_OUT .= "<div align=center><font color=\"#000066\"><b><font face=\"Arial, Helvetica, sans-serif\" size=2>";
$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]";
$CCAL_OUT .= "</font></b></font></div>";
$CCAL_OUT .= "</td>";
$CCAL_OUT .= "</tr>";
foreach($Cdays as $Cday)
{
$CDCLR="#ffffff";
$CCAL_OUT .= "<td bordercolor=\"$CDCLR\">";
$CCAL_OUT .= "<div align=center><font color=\"#000066\"><b><font face=\"Arial, Helvetica, sans-serif\" size=1>";
$CCAL_OUT .= "$Cday";
$CCAL_OUT .= "</font></b></font></div>";
$CCAL_OUT .= "</td>";
}
for( $Ccount=0;$Ccount<(6*7);$Ccount++)
{
$Cdayarray = getdate($Cstart);
if((($Ccount) % 7) == 0)
{
if($Cdayarray['mon'] != $CfirstdayARY['mon'])
break;
$CCAL_OUT .= "</tr><tr>";
}
if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth)
{
$CCAL_OUT .= "<td bordercolor=\"#ffffff\"><font color=\"#000066\"><b><font face=\"Arial, Helvetica, sans-serif\" size=\"1\">&nbsp;</font></b></font></td>";
}
else
{
if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) )
{
$CPRNTmday = $Cdayarray['mday'];
if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";}
$CBL = "<a href=\"#\" onclick=\"CB_date_pick('$CPRNTDAY-$CPRNTmday');return false;\">";
$CEL = "</a>";
$CCAL_OUT .= "<td bgcolor=\"#CCFFCC\" bordercolor=\"#CCFFCC\">";
$CCAL_OUT .= "<div align=center><font face=\"Arial, Helvetica, sans-serif\" size=1>";
$CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL";
$CCAL_OUT .= "</font></div>";
$CCAL_OUT .= "</td>";
$Cstart += ADAY;
}
else
{
$CDCLR="#ffffff";
if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) )
{
$CDCLR="#CCCCCC";
$CBL = '';
$CEL = '';
}
else
{
$CPRNTmday = $Cdayarray['mday'];
if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";}
$CBL = "<a href=\"#\" onclick=\"CB_date_pick('$CPRNTDAY-$CPRNTmday');return false;\">";
$CEL = "</a>";
}
$CCAL_OUT .= "<td bgcolor=\"$CDCLR\" bordercolor=\"#ffffff\">";
$CCAL_OUT .= "<div align=center><font face=\"Arial, Helvetica, sans-serif\" size=1>";
$CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL";
$CCAL_OUT .= "</font></div>";
$CCAL_OUT .= "</td>";
$Cstart += ADAY;
}
}
}
$CCAL_OUT .= "</tr>";
$CCAL_OUT .= "</table>";
$CCAL_OUT .= "</td>";
if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) )
{$CCAL_OUT .= "</tr>";}
$CINC++;
}
$CCAL_OUT .= "</table>";
echo "$CCAL_OUT\n";
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+37 -4
View File
@@ -1,15 +1,48 @@
<?
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
$DBCagc = file("/etc/astguiclient.conf");
foreach ($DBCagc as $DBCline)
{
$DBCline = preg_replace("/ |>|\n|\r|\t|\#.*|;.*/","",$DBCline);
if (ereg("^PATHlogs", $DBCline))
{$PATHlogs = $DBCline; $PATHlogs = preg_replace("/.*=/","",$PATHlogs);}
if (ereg("^PATHweb", $DBCline))
{$WeBServeRRooT = $DBCline; $WeBServeRRooT = preg_replace("/.*=/","",$WeBServeRRooT);}
if (ereg("^VARDB_server", $DBCline))
{$VARDB_server = $DBCline; $VARDB_server = preg_replace("/.*=/","",$VARDB_server);}
if (ereg("^VARDB_database", $DBCline))
{$VARDB_database = $DBCline; $VARDB_database = preg_replace("/.*=/","",$VARDB_database);}
if (ereg("^VARDB_user", $DBCline))
{$VARDB_user = $DBCline; $VARDB_user = preg_replace("/.*=/","",$VARDB_user);}
if (ereg("^VARDB_pass", $DBCline))
{$VARDB_pass = $DBCline; $VARDB_pass = preg_replace("/.*=/","",$VARDB_pass);}
if (ereg("^VARDB_port", $DBCline))
{$VARDB_port = $DBCline; $VARDB_port = preg_replace("/.*=/","",$VARDB_port);}
}
$link=mysql_connect("localhost", "cron", "1234");
mysql_select_db("asterisk");
}
else
{
#defaults for DB connection
$VARDB_server = 'localhost';
$VARDB_user = 'cron';
$VARDB_pass = '1234';
$VARDB_database = '1234';
$WeBServeRRooT = '/usr/local/apache2/htdocs';
}
$link=mysql_connect("$VARDB_server", "$VARDB_user", "$VARDB_pass");
mysql_select_db("$VARDB_database");
$local_DEF = 'Local/';
$conf_silent_prefix = '7';
$local_AMP = '@';
$ext_context = 'demo';
$recording_exten = '8309';
$WeBServeRRooT = '/usr/local/apache2/htdocs';
$WeBRooTWritablE = '1';
?>
-73
View File
@@ -1,73 +0,0 @@
--- /usr/src/astguiclient_snapshot_2006-04-10/VICIDIAL_web/admin.php 2006-02-27 15:58:50.000000000 -0800
+++ /var/www/html/vicidial/admin.php 2006-04-10 23:12:19.000000000 -0700
@@ -3320,15 +3320,38 @@
$o=0;
while ($statuses_to_print > $o)
{
- $rowx=mysql_fetch_row($rsltx);
- $leads_in_list = ($leads_in_list + $rowx[2]);
+ $rowx=mysql_fetch_row($rsltx);
+
+ $lead_list['count'] = ($lead_list['count'] + $rowx[2]);
+ if ($rowx[1] == 'N')
+ {
+ $since_reset = 'N';
+ $since_resetX = 'Y';
+ }
+ else
+ {
+ $since_reset = 'Y';
+ $since_resetX = 'N';
+ }
+ $lead_list[$since_reset][$rowx[0]] = $rowx[2];
+ $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
+ #If opposite side is not set, it may not in the future so give it a value of zero
+ if (!isset($lead_list[$since_resetX][$rowx[0]]))
+ {
+ $lead_list[$since_resetX][$rowx[0]]=0;
+ }
+ $o++;
+ }
+ $o=0;
+ while (list($dispo,) = each($lead_list[$since_reset]))
+ {
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
- if ($rowx[0] == 'CBHOLD')
+ if ($dispo == 'CBHOLD')
{
$CLB="<a href=\"$PHP_SELF?ADD=811&list_id=$list_id\">";
$CLE="</a>";
@@ -3338,24 +3361,12 @@
$CLB='';
$CLE='';
}
-
- if ($rowx[1] == 'N')
- {
- $leads_in_list_N = ($leads_in_list_N + $rowx[2]);
- echo "<tr $bgcolor><td><font size=1>$CLB$rowx[0]$CLE</td><td><font size=1> </td><td><font size=1>$rowx[2]</td></tr>\n";
- }
- else
- {
- $leads_in_list_Y = ($leads_in_list_Y + $rowx[2]);
- echo "<tr $bgcolor><td><font size=1>$CLB$rowx[0]$CLE</td><td><font size=1>$rowx[2]</td><td><font size=1> </td></tr>\n";
-
- }
-
- $o++;
+ echo "<tr $bgcolor><td><font size=1>$CLB$dispo$CLE</td><td><font size=1>".$lead_list['Y'][$dispo]."</td><td><font size=1>".$lead_list['N'][$dispo]." </td></tr>\n";
+ $o++;
}
-echo "<tr><td><font size=1>SUBTOTALS</td><td><font size=1>$leads_in_list_Y</td><td><font size=1>$leads_in_list_N</td></tr>\n";
-echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=2 align=center><font size=1>$leads_in_list</td></tr>\n";
+echo "<tr><td><font size=1>SUBTOTALS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
+echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=2 align=center><font size=1>$lead_list[count]</td></tr>\n";
echo "</table></center><br>\n";
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$ChannelA[$loop_count] = "$row[0]";
$ChannelB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelBtrunk: $ChannelA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "One of these variables is not valid:\n";
echo "Channel $channel must be greater than 2 characters\n";
echo "ExtraChannel $extrachannel must be greater than 2 characters\n";
echo "queryCID $queryCID must be greater than 14 characters\n";
echo "exten $exten must be set\n";
echo "ext_context $ext_context must be set\n";
echo "ext_priority $ext_priority must be set\n";
echo "\nRedirect Action not sent\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect command not inserted\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Campaign $campaign is not valid\n";
echo "lead_id $lead_id is not valid\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If CALLBK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHOLD", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservation on the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservation on the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
+249 -59
View File
@@ -112,6 +112,18 @@
# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC
# 60619-1047 - Added variable filters to close security holes for login form
# 60804-1710 - fixed scheduled CALLBK for other languages build
# 60808-1145 - Added consultative transfers with customer data
# 60808-2232 - Added campaign name to pulldown for login screen
# 60809-1603 - Added option to locally transfer consult xfers
# 60809-1732 - Added recheck of transferred channels before customer gone mesg
# 60810-1011 - Fixed CXFER leave 3way call bugs
# 60816-1602 - Added ALLCALLS recording delay option allcalls_delay
# 60816-1716 - Fixed customer time display bug and client DST setting
# 60821-1555 - Added option to omit phone_code on dialout of leads
# 60821-1628 - Added ALLFORCE recording option
# 60821-1643 - Added no_delete_sessions option to not delete sessions
# 60822-0512 - Changed phone number fields to be maxlength of 12
# 60829-1531 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
require("dbconnect.php");
@@ -157,8 +169,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
$forever_stop=0;
$version = '1.1.86';
$build = '60804-1710';
$version = '2.0.97';
$build = '60829-1531';
if ($force_logout)
{
@@ -166,6 +178,7 @@ if ($force_logout)
exit;
}
$isdst = date("I");
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
$tsNOW_TIME = date("YmdHis");
@@ -174,6 +187,7 @@ $CIDdate = date("ymdHis");
$month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y"));
$past_month_date = date("Y-m-d H:i:s",$month_old);
$random = (rand(1000000, 9999999) + 10000000);
$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
@@ -186,6 +200,11 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$agentcallsstatus = '0'; # set to 1 to show agent status and call count
$campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name on login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
$clientDST = '1'; # set to 1 to check for DST on server for agent time
$no_delete_sessions = '0'; # set to 1 to not delete sessions at logout
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -223,7 +242,7 @@ if ($campaign_login_list > 0)
$camp_form_code = "<select size=1 name=VD_campaign>\n";
$camp_form_code .= "<option value=\"\"></option>\n";
$stmt="SELECT campaign_id from vicidial_campaigns where active='Y' order by campaign_id";
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' order by campaign_id";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
@@ -231,15 +250,19 @@ $o=0;
while ($camps_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ($show_campname_pulldown)
{$campname = " - $rowx[1]";}
else
{$campname = '';}
if ($VD_campaign)
{
if (eregi("$VD_campaign",$rowx[0]))
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]$campname</option>\n";}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
$o++;
}
$camp_form_code .= "</select>\n";
@@ -261,7 +284,7 @@ echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Re-Login </TD>";
echo "</TR>\n";
@@ -300,7 +323,7 @@ if ($user_login_first == 1)
#echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
#echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>User Login</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Campaign Login </TD>";
echo "</TR>\n";
@@ -338,7 +361,7 @@ if ($user_login_first == 1)
echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login </TD>";
echo "</TR>\n";
@@ -375,7 +398,7 @@ echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Phone Login </TD>";
echo "</TR>\n";
@@ -394,7 +417,8 @@ exit;
}
else
{
$fp = fopen ("./vicidial_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./vicidial_auth_entries.txt", "a");}
$VDloginDISPLAY=0;
if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) )
@@ -427,9 +451,11 @@ $VDloginDISPLAY=0;
$VU_vicidial_recording=$row[7];
$VU_vicidial_transfers=$row[8];
$VU_closer_default_blended=$row[9];
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
$user_abb = "$VD_login$VD_login$VD_login$VD_login";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
@@ -513,7 +539,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the statuses to be dialed for your campaign as well as other campaign settings
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -547,6 +573,8 @@ $VDloginDISPLAY=0;
$wrapup_message=$row[27];
$closer_campaigns=$row[28];
$use_internal_dnc=$row[29];
$allcalls_delay=$row[30];
$omit_phone_code=$row[31];
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -597,8 +625,11 @@ $VDloginDISPLAY=0;
}
else
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
}
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Login incorrect, please try again<BR>";
}
@@ -616,7 +647,7 @@ $VDloginDISPLAY=0;
echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>$VDdisplayMESSAGE</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Campaign Login </TD>";
echo "</TR>\n";
@@ -655,7 +686,7 @@ if (!$authphone)
echo "<INPUT TYPE=HIDDEN NAME=VD_login VALUE=\"$VD_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_pass VALUE=\"$VD_pass\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_campaign VALUE=\"$VD_campaign\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login Error</TD>";
echo "</TR>\n";
@@ -740,6 +771,10 @@ else
$DBX_pass=$row[58];
$DBX_port=$row[59];
if ($clientDST)
{
$local_gmt = ($local_gmt + $isdst);
}
if ($protocol == 'EXTERNAL')
{
$protocol = 'Local';
@@ -795,6 +830,11 @@ else
$session_rand = (rand(1,9999999) + 10000000);
$session_name = "$StarTtimE$US$session_ext$session_rand";
if ($webform_sessionname)
{$webform_sessionname = "&session_name=$session_name";}
else
{$webform_sessionname = '';}
$stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
@@ -1313,6 +1353,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var previous_called_count = '';
var hot_keys_active = 0;
var all_record = 'NO';
var all_record_count = 0;
var LeaDDispO = '';
var LeaDPreVDispO = '';
var AgaiNHanguPChanneL = '';
@@ -1320,8 +1361,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var AgainCalLSecondS = '';
var AgaiNCalLCID = '';
var CB_count_check = 60;
var agentcallsstatus = '<? echo $agentcallsstatus ?>';
var campagentstatctmax = '<? echo $campagentstatctmax ?>';
var agentcallsstatus = '<? echo $agentcallsstatus ?>'
var campagentstatctmax = '<? echo $campagentstatctmax ?>'
var campagentstatct = '0';
var manual_dial_in_progress = 0;
var auto_dial_alt_dial = 0;
@@ -1339,7 +1380,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var wrapup_message = '<? echo $wrapup_message ?>';
var wrapup_counter = 0;
var wrapup_waiting = 0;
var use_internal_dnc = '<? echo $use_internal_dnc ?>'
var use_internal_dnc = '<? echo $use_internal_dnc ?>';
var allcalls_delay = '<? echo $allcalls_delay ?>';
var omit_phone_code = '<? echo $omit_phone_code ?>';
var no_delete_sessions = '<? echo $no_delete_sessions ?>';
var webform_session = '<? echo $webform_sessionname ?>';
var local_consult_xfers = '<? echo $local_consult_xfers ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\"Pause\"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -1480,18 +1526,26 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var manual_number = document.vicidial_form.xfernumber.value;
var manual_string = manual_number.toString();
}
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("XFER","g");
if (manual_string.match(regXFvars))
{
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
var donothing=1;
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
}
}
}
}
@@ -1527,8 +1581,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
var regCXFvars = new RegExp("CXFER","g");
var tasknum_string = tasknum.toString();
if (tasknum_string.match(regCXFvars))
{
var Ctasknum = tasknum_string.replace(regCXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '990009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
}
var regAXFvars = new RegExp("AXFER","g");
if (tasknum_string.match(regAXFvars))
{
var Ctasknum = tasknum_string.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
if (taskprefix == 'NO') {var orig_prefix = '';}
else {var orig_prefix = agc_dial_prefix;}
if (taskreverse == 'YES')
@@ -1849,7 +1923,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = recording_exten;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('StopMonitorConf','" + taskconfrec + "','" + filename + "');return false;\"><IMG SRC=\"./images/vdc_LB_stoprecording.gif\" border=0 alt=\"Stop Recording\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
if (taskconfrectype == 'StopMonitorConf')
{
@@ -1857,7 +1939,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = session_id;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + taskconfrec + "','');return false;\"><IMG SRC=\"./images/vdc_LB_startrecording.gif\" border=0 alt=\"Start Recording\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
confmonitor_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + taskconfrectype + "&format=text&channel=" + channelrec + "&filename=" + filename + "&exten=" + query_recording_exten + "&ext_context=" + ext_context + "&ext_priority=1";
xmlhttp.open('POST', 'manager_send.php');
@@ -1927,18 +2016,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
var queryCID = "XBvdcW" + epoch_sec + user_abb;
var blindxferdialstring = document.vicidial_form.xfernumber.value;
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("XFER","g");
if (blindxferdialstring.match(regXFvars))
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
var regAXFvars = new RegExp("AXFER","g");
if (blindxferdialstring.match(regAXFvars))
{
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
var Ctasknum = blindxferdialstring.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
blindxferdialstring = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
}
}
}
}
@@ -1996,7 +2103,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "VXvdcW" + epoch_sec + user_abb;
var redirectdestination = "NEXTAVAILABLE";
var redirectXTRAvalue = XDchannel;
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectXtra&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue;
var redirecttype_test = document.vicidial_form.xfernumber.value;
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
var regRXFvars = new RegExp("CXFER","g");
if ( (redirecttype_test.match(regRXFvars)) && (local_consult_xfers > 0) )
{var redirecttype = 'RedirectXtraCX';}
else
{var redirecttype = 'RedirectXtra';}
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail;
}
if (taskvar == 'ParK')
{
@@ -2136,7 +2250,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) )
{
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + session_id + "','');return false;\"><IMG SRC=\"./images/vdc_LB_startrecording.gif\" border=0 alt=\"Start Recording\"></a>";
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
@@ -2527,6 +2641,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialNext(mdnCBid,mdnBDleadid,mdnDiaLCodE,mdnPhonENumbeR,mdnStagE)
{
all_record = 'NO';
all_record_count=0;
document.getElementById("DiaLControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_dialnextnumber_OFF.gif\" border=0 alt=\"Dial Next Number\">";
if (document.vicidial_form.LeadPreview.checked==true)
{
@@ -2562,7 +2677,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc ;
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLnext_query);
@@ -2663,7 +2778,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
// $VICIDIAL_web_QUERY_STRING =~ s/ /+/gi;
// $VICIDIAL_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi;
@@ -2698,7 +2814,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"./images/vdc_LB_hangupcustomer.gif\" border=0 alt=\"Hangup Customer\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2837,6 +2953,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialOnly(taskaltnum)
{
all_record = 'NO';
all_record_count=0;
if (taskaltnum == 'ALTPhoneE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
@@ -2876,7 +2993,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid;
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLonly_query);
@@ -2903,7 +3020,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"./images/vdc_LB_hangupcustomer.gif\" border=0 alt=\"Hangup Customer\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2999,11 +3116,75 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function ReChecKCustoMerChaN()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
recheckVDAI_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ACTION=VDADREcheckINCOMING" + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(recheckVDAI_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var recheck_incoming = null;
recheck_incoming = xmlhttp.responseText;
// alert(xmlhttp.responseText);
var recheck_VDIC_array=recheck_incoming.split("\n");
if (recheck_VDIC_array[0] == '1')
{
var reVDIC_data_VDAC=recheck_VDIC_array[1].split("|");
if (reVDIC_data_VDAC[3] == lastcustchannel)
{
// do nothing
}
else
{
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
lastcustserverip = reVDIC_data_VDAC[4];
custchannellive = 1;
}
}
}
}
delete xmlhttp;
}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function check_for_auto_incoming()
{
all_record = 'NO';
all_record_count=0;
document.vicidial_form.lead_id.value = '';
var xmlhttp=false;
/*@cc_on @*/
@@ -3197,7 +3378,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -3213,7 +3395,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("WebFormSpan").innerHTML = "<a href=\"" + VDIC_web_form_address + web_form_vars + "\" target=\"vdcwebform\" onMouseOver=\"WebFormRefresH();\"><IMG SRC=\"./images/vdc_LB_webform.gif\" border=0 alt=\"Web Form\"></a>\n";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (CalL_ScripT_id.length > 0) )
@@ -3303,7 +3485,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -4174,7 +4357,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol;
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(VDlogout_query);
@@ -4487,7 +4670,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.vicidial_form.LeadLookuP.checked=true;
document.getElementById("sessionIDspan").innerHTML = session_id;
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
@@ -4548,6 +4731,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (logout_stop_timeouts==1) {WaitingForNextStep=1;}
if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();}
if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();}
if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();}
if (wrapup_seconds > 0)
{
@@ -4632,8 +4816,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (all_record == 'YES')
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
if (all_record_count < allcalls_delay)
{all_record_count++;}
else
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
all_record_count=0;
}
}
@@ -5073,7 +5263,7 @@ echo "</head>\n";
<td align=left><font class="body_text"><input type=text size=7 maxlength=10 name=MDDiaLCodE class="cust_form" value="1">&nbsp; (This is usually a 1 in the USA-Canada)</td>
</tr><tr>
<td align=right><font class="body_text"> Phone Number: </td>
<td align=left><font class="body_text"><input type=text size=12 maxlength=10 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (10 digits max - digits only)</td>
<td align=left><font class="body_text"><input type=text size=14 maxlength=12 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (12 digits max - digits only)</td>
</tr><tr>
<td align=right><font class="body_text"> Search Existing Leads: </td>
<td align=left><font class="body_text"><input type=checkbox name=LeadLookuP size=1 value="0">&nbsp; (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)</td>
@@ -5336,7 +5526,7 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<span id="SpacerSpanC"><IMG SRC="./images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #FFCCFF" id="HangupControl"><IMG SRC="./images/vdc_LB_hangupcustomer_OFF.gif" border=0 alt="Hangup Customer"></span><BR>
<span id="SpacerSpanD"><IMG SRC="./images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="./images/vdc_LB_senddtmf.gif" border=0 alt="Send DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value=""></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="./images/vdc_LB_senddtmf.gif" border=0 alt="Send DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value="" maxlength=50></span><BR>
</center>
</font>
</td>
@@ -5372,7 +5562,7 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<td align=left><font class="body_text"><input type=text size=20 name=province maxlength=50 class="cust_form" value="">&nbsp; Vendor ID: <input type=text size=15 name=vendor_lead_code maxlength=20 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Phone: </td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=10 class="cust_form" value="">&nbsp; DialCode: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Alt. Phone: <input type=text size=11 name=alt_phone maxlength=10 class="cust_form" value=""></td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=12 class="cust_form" value="">&nbsp; DialCode: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Alt. Phone: <input type=text size=11 name=alt_phone maxlength=12 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Show: </td>
<td align=left><font class="body_text"><input type=text size=20 name=security_phrase maxlength=100 class="cust_form" value="">&nbsp; Email: <input type=text size=25 name=email maxlength=70 class="cust_form" value=""></td>
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+15 -9
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICIDISCAR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIDISCAR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICIDISCAR|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIDISCAR|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$CanalA[$loop_count] = "$row[0]";
$CanalB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $CanalA[$counter] ~";
echo "CanalB: $CanalB[$counter] ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $CanalA[$counter] ~";
echo "CanalB: $CanalB[$counter] ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $CanalA[$counter] ~";
echo "CanalB: $CanalB[$counter] ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $CanalA[$counter] ~";
echo "CanalB: $CanalB[$counter] ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanalA: $CanalA[$counter] ~";
echo "CanalB: $CanalB[$counter] ~";
echo "CanalBtrunk: $CanalA[$counter]|";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "ExtraCanal $extrachannel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
echo "ext_priority $ext_priority Deve ser definido\n";
echo "\nRedirect Action não enviado\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect comando não inserido\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX comando enviado para Canal $channelligado$call_server_ip and \nHungup $extrachannelligado$server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Campanha $campaign não é válido\n";
echo "lead_id $lead_id não é válido\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If CHAMADABK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHVELHO", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservationligadothe vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservationligadothe vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
+251 -61
View File
@@ -112,6 +112,18 @@
# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC
# 60619-1047 - Added variable filters to close security holes for login form
# 60804-1710 - fixed scheduled CALLBK for other languages build
# 60808-1145 - Added consultative transfers with customer data
# 60808-2232 - Added campaign name to pulldown for login screen
# 60809-1603 - Added option to locally transfer consult xfers
# 60809-1732 - Added recheck of transferred channels before customer gone mesg
# 60810-1011 - Fixed CXFER leave 3way call bugs
# 60816-1602 - Added ALLCALLS recording delay option allcalls_delay
# 60816-1716 - Fixed customer time display bug and client DST setting
# 60821-1555 - Added option to omit phone_code on dialout of leads
# 60821-1628 - Added ALLFORCE recording option
# 60821-1643 - Added no_delete_sessions option to not delete sessions
# 60822-0512 - Changed phone number fields to be maxlength of 12
# 60829-1531 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
require("dbconnect.php");
@@ -157,8 +169,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
$forever_stop=0;
$version = '1.1.86';
$build = '60804-1710';
$version = '2.0.97';
$build = '60829-1531';
if ($force_logout)
{
@@ -166,6 +178,7 @@ if ($force_logout)
exit;
}
$isdst = date("I");
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
$tsNOW_TIME = date("YmdHis");
@@ -174,6 +187,7 @@ $CIDdate = date("ymdHis");
$month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y"));
$past_month_date = date("Y-m-d H:i:s",$month_old);
$random = (rand(1000000, 9999999) + 10000000);
$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
@@ -186,6 +200,11 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$agentcallsstatus = '0'; # set to 1 to show agent status and call count
$campagentstatctmax = '0'; # Number of segundos for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign nameligadologin pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
$clientDST = '1'; # set to 1 to check for DSTligadoserver for agent time
$no_delete_sessions = '0'; # set to 1 to not delete sessions at logout
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -223,7 +242,7 @@ if ($campaign_login_list > 0)
$camp_form_code = "<select size=1 name=VD_campaign>\n";
$camp_form_code .= "<option value=\"\"></option>\n";
$stmt="SELECT campaign_id from vicidial_campaigns where active='Y' order by campaign_id";
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' order by campaign_id";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
@@ -231,15 +250,19 @@ $o=0;
while ($camps_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ($show_campname_pulldown)
{$campname = " - $rowx[1]";}
else
{$campname = '';}
if ($VD_campaign)
{
if (eregi("$VD_campaign",$rowx[0]))
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]$campname</option>\n";}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
$o++;
}
$camp_form_code .= "</select>\n";
@@ -261,7 +284,7 @@ echo "<!-- ILPV -->\n";
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_br/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Brazil <img src=\"../agc/images/br.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Re-Login </TD>";
echo "</TR>\n";
@@ -300,7 +323,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
#echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
#echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>Login do Usuário</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login da Campanha </TD>";
echo "</TR>\n";
@@ -338,7 +361,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_br/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Brazil <img src=\"../agc/images/br.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n"; echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login </TD>";
echo "</TR>\n";
@@ -375,7 +398,7 @@ echo "<!-- ILPV -->\n";
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_br/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Brazil <img src=\"../agc/images/br.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login do Telefone </TD>";
echo "</TR>\n";
@@ -394,7 +417,8 @@ exit;
}
else
{
$fp = fopen ("./vicidial_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./vicidial_auth_entries.txt", "a");}
$VDloginDISPLAY=0;
if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) )
@@ -427,9 +451,11 @@ $VDloginDISPLAY=0;
$VU_vicidial_recording=$row[7];
$VU_vicidial_transfers=$row[8];
$VU_closer_default_blended=$row[9];
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
$user_abb = "$VD_login$VD_login$VD_login$VD_login";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
@@ -513,7 +539,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the statuses to be dialed for your campaign as well as other campaign settings
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -547,6 +573,8 @@ $VDloginDISPLAY=0;
$wrapup_message=$row[27];
$closer_campaigns=$row[28];
$use_internal_dnc=$row[29];
$allcalls_delay=$row[30];
$omit_phone_code=$row[31];
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -597,8 +625,11 @@ $VDloginDISPLAY=0;
}
else
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
}
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Usuário incorreto, por favor tente novamente<BR>";
}
@@ -616,7 +647,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>$VDdisplayMESSAGE</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login da Campanha </TD>";
echo "</TR>\n";
@@ -655,7 +686,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
echo "<INPUT TYPE=HIDDEN NAME=VD_login VALUE=\"$VD_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_pass VALUE=\"$VD_pass\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_campaign VALUE=\"$VD_campaign\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login Error</TD>";
echo "</TR>\n";
@@ -740,6 +771,10 @@ else
$DBX_pass=$row[58];
$DBX_port=$row[59];
if ($clientDST)
{
$local_gmt = ($local_gmt + $isdst);
}
if ($protocol == 'EXTERNAL')
{
$protocol = 'Local';
@@ -795,6 +830,11 @@ else
$session_rand = (rand(1,9999999) + 10000000);
$session_name = "$StarTtimE$US$session_ext$session_rand";
if ($webform_sessionname)
{$webform_sessionname = "&session_name=$session_name";}
else
{$webform_sessionname = '';}
$stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
@@ -1000,8 +1040,8 @@ $CTODAY = date("Y-m");
$CTODAYmday = date("j");
$CINC=0;
$Cmonths = Array('January','February','March','April','May','June',
'July','August','September','October','November','December');
$Cmonths = Array('Janeiro','February','Março','Abril','Pode','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro');
$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
$CCAL_OUT = '';
@@ -1313,6 +1353,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var previous_called_count = '';
var hot_keys_active = 0;
var all_record = 'NO';
var all_record_count = 0;
var LeaDDispO = '';
var LeaDPreVDispO = '';
var AgaiNHanguPChanneL = '';
@@ -1320,8 +1361,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var AgainCalLSecondS = '';
var AgaiNCalLCID = '';
var CB_count_check = 60;
var agentcallsstatus = '<? echo $agentcallsstatus ?>';
var campagentstatctmax = '<? echo $campagentstatctmax ?>';
var agentcallsstatus = '<? echo $agentcallsstatus ?>'
var campagentstatctmax = '<? echo $campagentstatctmax ?>'
var campagentstatct = '0';
var manual_dial_in_progress = 0;
var auto_dial_alt_dial = 0;
@@ -1339,7 +1380,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var wrapup_message = '<? echo $wrapup_message ?>';
var wrapup_counter = 0;
var wrapup_waiting = 0;
var use_internal_dnc = '<? echo $use_internal_dnc ?>'
var use_internal_dnc = '<? echo $use_internal_dnc ?>';
var allcalls_delay = '<? echo $allcalls_delay ?>';
var omit_phone_code = '<? echo $omit_phone_code ?>';
var no_delete_sessions = '<? echo $no_delete_sessions ?>';
var webform_session = '<? echo $webform_sessionname ?>';
var local_consult_xfers = '<? echo $local_consult_xfers ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"../agc/images/vdc_LB_pause_OFF_ptbr.gif\" border=0 alt=\"Pausa\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"../agc/images/vdc_LB_resume_ptbr.gif\" border=0 alt=\"Início\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"../agc/images/vdc_LB_pause_ptbr.gif\" border=0 alt=\"Pausa\"></a><IMG SRC=\"../agc/images/vdc_LB_resume_OFF_ptbr.gif\" border=0 alt=\"Início\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"../agc/images/vdc_LB_pause_OFF_ptbr.gif\" border=0 alt=\"Pausa\"><IMG SRC=\"../agc/images/vdc_LB_resume_OFF_ptbr.gif\" border=0 alt=\"Início\">";
@@ -1480,18 +1526,26 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var manual_number = document.vicidial_form.xfernumber.value;
var manual_string = manual_number.toString();
}
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("TRANFERENCIA","g");
if (manual_string.match(regXFvars))
{
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
var donothing=1;
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
}
}
}
}
@@ -1527,8 +1581,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
var regCXFvars = new RegExp("CTRANFERENCIA","g");
var tasknum_string = tasknum.toString();
if (tasknum_string.match(regCXFvars))
{
var Ctasknum = tasknum_string.replace(regCXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '990009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
}
var regAXFvars = new RegExp("ATRANFERENCIA","g");
if (tasknum_string.match(regAXFvars))
{
var Ctasknum = tasknum_string.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
if (taskprefix == 'NO') {var orig_prefix = '';}
else {var orig_prefix = agc_dial_prefix;}
if (taskreverse == 'YES')
@@ -1849,7 +1923,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = recording_exten;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('StopMonitorConf','" + taskconfrec + "','" + filename + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_stoprecording_ptbr.gif\" border=0 alt=\"Parar Gravação\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Inicia Gravação\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
if (taskconfrectype == 'StopMonitorConf')
{
@@ -1857,7 +1939,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = session_id;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + taskconfrec + "','');return false;\"><IMG SRC=\"../agc/images/vdc_LB_startrecording_ptbr.gif\" border=0 alt=\"Inicia Gravação\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Inicia Gravação\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
confmonitor_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + taskconfrectype + "&format=text&channel=" + channelrec + "&filename=" + filename + "&exten=" + query_recording_exten + "&ext_context=" + ext_context + "&ext_priority=1";
xmlhttp.open('POST', 'manager_send.php');
@@ -1927,18 +2016,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
var queryCID = "XBvdcW" + epoch_sec + user_abb;
var blindxferdialstring = document.vicidial_form.xfernumber.value;
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("TRANFERENCIA","g");
if (blindxferdialstring.match(regXFvars))
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
var regAXFvars = new RegExp("ATRANFERENCIA","g");
if (blindxferdialstring.match(regAXFvars))
{
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
var Ctasknum = blindxferdialstring.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
blindxferdialstring = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
}
}
}
}
@@ -1996,7 +2103,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "VXvdcW" + epoch_sec + user_abb;
var redirectdestination = "NEXTAVAILABLE";
var redirectXTRAvalue = XDchannel;
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectXtra&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue;
var redirecttype_test = document.vicidial_form.xfernumber.value;
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
var regRXFvars = new RegExp("CTRANFERENCIA","g");
if ( (redirecttype_test.match(regRXFvars)) && (local_consult_xfers > 0) )
{var redirecttype = 'RedirectXtraCX';}
else
{var redirecttype = 'RedirectXtra';}
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail;
}
if (taskvar == 'ParK')
{
@@ -2136,7 +2250,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) )
{
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + session_id + "','');return false;\"><IMG SRC=\"../agc/images/vdc_LB_startrecording_ptbr.gif\" border=0 alt=\"Inicia Gravação\"></a>";
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Inicia Gravação\">";
}
@@ -2527,6 +2641,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialNext(mdnCBid,mdnBDleadid,mdnDiaLCodE,mdnPhonENumbeR,mdnStagE)
{
all_record = 'NO';
all_record_count=0;
document.getElementById("DiaLControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif\" border=0 alt=\"Discar proximo número\">";
if (document.vicidial_form.LeadPreview.checked==true)
{
@@ -2562,7 +2677,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc ;
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLnext_query);
@@ -2663,7 +2778,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
// $VICIDISCAR_web_QUERY_STRING =~ s/ /+/gi;
// $VICIDISCAR_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi;
@@ -2698,7 +2814,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"../agc/images/vdc_LB_hangupcustomer_ptbr.gif\" border=0 alt=\"Desligar Cliente\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2837,6 +2953,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialOnly(taskaltnum)
{
all_record = 'NO';
all_record_count=0;
if (taskaltnum == 'ALTTelefoneE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
@@ -2876,7 +2993,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid;
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLonly_query);
@@ -2903,7 +3020,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"../agc/images/vdc_LB_hangupcustomer_ptbr.gif\" border=0 alt=\"Desligar Cliente\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2999,11 +3116,75 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function ReChecKCustoMerChaN()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
recheckVDAI_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ACTION=VDADREcheckINCOMING" + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(recheckVDAI_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var recheck_incoming = null;
recheck_incoming = xmlhttp.responseText;
// alert(xmlhttp.responseText);
var recheck_VDIC_array=recheck_incoming.split("\n");
if (recheck_VDIC_array[0] == '1')
{
var reVDIC_data_VDAC=recheck_VDIC_array[1].split("|");
if (reVDIC_data_VDAC[3] == lastcustchannel)
{
// do nothing
}
else
{
// alert("Canal has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
lastcustserverip = reVDIC_data_VDAC[4];
custchannellive = 1;
}
}
}
}
delete xmlhttp;
}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function check_for_auto_incoming()
{
all_record = 'NO';
all_record_count=0;
document.vicidial_form.lead_id.value = '';
var xmlhttp=false;
/*@cc_on @*/
@@ -3197,7 +3378,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -3213,7 +3395,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("WebFormSpan").innerHTML = "<a href=\"" + VDIC_web_form_address + web_form_vars + "\" target=\"vdcwebform\" onMouseOver=\"WebFormRefresH();\"><IMG SRC=\"../agc/images/vdc_LB_webform_ptbr.gif\" border=0 alt=\"Web Form\"></a>\n";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (CalL_ScripT_id.length > 0) )
@@ -3303,7 +3485,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -4174,7 +4357,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol;
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(VDlogout_query);
@@ -4487,7 +4670,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.vicidial_form.LeadLookuP.checked=true;
document.getElementById("sessionIDspan").innerHTML = session_id;
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Inicia Gravação\">";
}
@@ -4548,6 +4731,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (logout_stop_timeouts==1) {WaitingForNextStep=1;}
if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();}
if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();}
if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();}
if (wrapup_segundos > 0)
{
@@ -4632,8 +4816,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (all_record == 'YES')
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
if (all_record_count < allcalls_delay)
{all_record_count++;}
else
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
all_record_count=0;
}
}
@@ -5073,7 +5263,7 @@ echo "</head>\n";
<td align=left><font class="body_text"><input type=text size=7 maxlength=10 name=MDDiaLCodE class="cust_form" value="1">&nbsp; (Normalmente é 1 nos EUA-Canada)</td>
</tr><tr>
<td align=right><font class="body_text"> Telefone Number: </td>
<td align=left><font class="body_text"><input type=text size=12 maxlength=10 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (Maximo de 10 digitos - apenas número)</td>
<td align=left><font class="body_text"><input type=text size=14 maxlength=12 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (12 digits max - digits only)</td>
</tr><tr>
<td align=right><font class="body_text"> Ligações Existentes Da Busca: </td>
<td align=left><font class="body_text"><input type=checkbox name=LeadLookuP size=1 value="0">&nbsp; (Esta opção se verificado tentará encontrar o número de telefone no sistema antes de introduzi-lo como uma ligação nova)</td>
@@ -5336,7 +5526,7 @@ ID da gravação: <font class="body_small"><span id="RecorDID"></span></font><BR
<span id="SpacerSpanC"><IMG SRC="../agc/images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #FFCCFF" id="HangupControl"><IMG SRC="../agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif" border=0 alt="Desligar Cliente"></span><BR>
<span id="SpacerSpanD"><IMG SRC="../agc/images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="../agc/images/vdc_LB_senddtmf_ptbr.gif" border=0 alt="Enviar DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value=""></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="../agc/images/vdc_LB_senddtmf_ptbr.gif" border=0 alt="Enviar DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value="" maxlength=50></span><BR>
</center>
</font>
</td>
@@ -5372,7 +5562,7 @@ ID da gravação: <font class="body_small"><span id="RecorDID"></span></font><BR
<td align=left><font class="body_text"><input type=text size=20 name=province maxlength=50 class="cust_form" value="">&nbsp; ID do Vendedor: <input type=text size=15 name=vendor_lead_code maxlength=20 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Telefone: </td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=10 class="cust_form" value="">&nbsp; Codigo de Area: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Telefone Alternativo: <input type=text size=11 name=alt_phone maxlength=10 class="cust_form" value=""></td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=12 class="cust_form" value="">&nbsp; Codigo de Area: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Telefone Alternativo: <input type=text size=11 name=alt_phone maxlength=12 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Mostrar: </td>
<td align=left><font class="body_text"><input type=text size=20 name=security_phrase maxlength=100 class="cust_form" value="">&nbsp; Email: <input type=text size=25 name=email maxlength=70 class="cust_form" value=""></td>
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+25 -19
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICIVORWAHLKNOPF|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIVORWAHLKNOPF|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICIVORWAHLKNOPF|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIVORWAHLKNOPF|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
@@ -484,15 +490,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_de.gif";
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
image_livecall_ON.src="../agc/images/agc_live_call_ON_de.gif";
image_livecall_ON.src="../agc/images/agc_live_call_ON.gif";
var image_voicemail_OFF = new Image();
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF_de.gif";
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF.gif";
var image_voicemail_ON = new Image();
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON_de.gif";
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON.gif";
var image_voicemail_BLINK = new Image();
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK_de.gif";
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK.gif";
var favorites = new Array();
var favorites_names = new Array();
var favorites_busy = new Array();
@@ -2713,11 +2719,11 @@ echo "</head>\n";
<? echo "Willkommen $LOGfullname, Ihr Telefon: $fullname - $protocol/$extension auf $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_de.gif" ALT="Hauptverkleidung" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines_de.gif" ALT="Aktive Linien Verkleidung" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences_de.gif" ALT="Konferenz-Verkleidung" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON_de.gif" NAME=voicemail ALT="Überprüfen Sie Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF_de.gif" NAME=livecall ALT="Leben Anruf" WIDTH=109 HEIGHT=30 Border=0></TD>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Hauptverkleidung" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines.gif" ALT="Aktive Linien Verkleidung" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences.gif" ALT="Konferenz-Verkleidung" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON.gif" NAME=voicemail ALT="Überprüfen Sie Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF.gif" NAME=livecall ALT="Leben Anruf" WIDTH=109 HEIGHT=30 Border=0></TD>
</TR></TABLE>
</SPAN>
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$FührungA[$loop_count] = "$row[0]";
$FührungB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "FührungA: $FührungA[$counter] ~";
echo "FührungB: $FührungB[$counter] ~";
echo "FührungA: $ChanneLA[$counter] ~";
echo "FührungB: $ChanneLB[$counter] ~";
echo "FührungBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "FührungA: $FührungA[$counter] ~";
echo "FührungB: $FührungB[$counter] ~";
echo "FührungA: $ChanneLA[$counter] ~";
echo "FührungB: $ChanneLB[$counter] ~";
echo "FührungBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "FührungA: $FührungA[$counter] ~";
echo "FührungB: $FührungB[$counter] ~";
echo "FührungA: $ChanneLA[$counter] ~";
echo "FührungB: $ChanneLB[$counter] ~";
echo "FührungBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "FührungA: $FührungA[$counter] ~";
echo "FührungB: $FührungB[$counter] ~";
echo "FührungA: $ChanneLA[$counter] ~";
echo "FührungB: $ChanneLB[$counter] ~";
echo "FührungBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "FührungA: $FührungA[$counter] ~";
echo "FührungB: $FührungB[$counter] ~";
echo "FührungBtrunk: $FührungA[$counter]|";
echo "FührungA: $ChanneLA[$counter] ~";
echo "FührungB: $ChanneLB[$counter] ~";
echo "FührungBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Führung $channel muß als 2 Buchstaben grösser sein\n";
echo "ExtraFührung $extrachannel muß als 2 Buchstaben grösser sein\n";
echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
echo "ext_priority $ext_priority muß eingestellt werden\n";
echo "\nRedirect Action nicht gesendet\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Führung $channel ist nicht Phasen auf $call_server_ip, Redirect Befehl nicht eingesetzt\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Führung $channel ist nicht Phasen auf $server_ip, Redirect Befehl nicht eingesetzt\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect Befehl nicht eingesetzt\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX Befehl gesendet für Führung $channel auf $call_server_ip and \nHungup $extrachannel auf $server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Kampagne $campaign ist unzulässig\n";
echo "lead_id $lead_id ist unzulässig\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If ANRUFBK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHALT", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservation auf the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservation auf the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+15 -9
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICIΚΛΗΣΗ|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIΚΛΗΣΗ|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICIΚΛΗΣΗ|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIΚΛΗΣΗ|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$ΚανάλιA[$loop_count] = "$row[0]";
$ΚανάλιB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ΚανάλιA[$counter] ~";
echo "ΚανάλιB: $ΚανάλιB[$counter] ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ΚανάλιA[$counter] ~";
echo "ΚανάλιB: $ΚανάλιB[$counter] ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ΚανάλιA[$counter] ~";
echo "ΚανάλιB: $ΚανάλιB[$counter] ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ΚανάλιA[$counter] ~";
echo "ΚανάλιB: $ΚανάλιB[$counter] ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ΚανάλιA[$counter] ~";
echo "ΚανάλιB: $ΚανάλιB[$counter] ~";
echo "ΚανάλιBtrunk: $ΚανάλιA[$counter]|";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "ExtraΚανάλι $extrachannel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
echo "ext_priority $ext_priority πρέπει να τεθεί\n";
echo "\nRedirect Action μην σταλμένος\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect εντολή που δεν έγινε εισαγωγή\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip and \nHungup $extrachannel στο $server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Εκστρατεία $campaign δεν ισχύει\n";
echo "lead_id $lead_id δεν ισχύει\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If ΚΛΗΣΗBK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHΠΑΛΑΙΟ", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservation στο the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservation στο the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
+251 -61
View File
@@ -112,6 +112,18 @@
# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC
# 60619-1047 - Added variable filters to close security holes for login form
# 60804-1710 - fixed scheduled CALLBK for other languages build
# 60808-1145 - Added consultative transfers with customer data
# 60808-2232 - Added campaign name to pulldown for login screen
# 60809-1603 - Added option to locally transfer consult xfers
# 60809-1732 - Added recheck of transferred channels before customer gone mesg
# 60810-1011 - Fixed CXFER leave 3way call bugs
# 60816-1602 - Added ALLCALLS recording delay option allcalls_delay
# 60816-1716 - Fixed customer time display bug and client DST setting
# 60821-1555 - Added option to omit phone_code on dialout of leads
# 60821-1628 - Added ALLFORCE recording option
# 60821-1643 - Added no_delete_sessions option to not delete sessions
# 60822-0512 - Changed phone number fields to be maxlength of 12
# 60829-1531 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
require("dbconnect.php");
@@ -157,8 +169,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
$forever_stop=0;
$version = '1.1.86';
$build = '60804-1710';
$version = '2.0.97';
$build = '60829-1531';
if ($force_logout)
{
@@ -166,6 +178,7 @@ if ($force_logout)
exit;
}
$isdst = date("I");
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
$tsNOW_TIME = date("YmdHis");
@@ -174,6 +187,7 @@ $CIDdate = date("ymdHis");
$month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y"));
$past_month_date = date("Y-m-d H:i:s",$month_old);
$random = (rand(1000000, 9999999) + 10000000);
$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
@@ -186,6 +200,11 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$agentcallsstatus = '0'; # set to 1 to show agent status and call count
$campagentstatctmax = '0'; # Number of δευτερόλεπτα for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name στο login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
$clientDST = '1'; # set to 1 to check for DST στο server for agent time
$no_delete_sessions = '0'; # set to 1 to not delete sessions at logout
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -223,7 +242,7 @@ if ($campaign_login_list > 0)
$camp_form_code = "<select size=1 name=VD_campaign>\n";
$camp_form_code .= "<option value=\"\"></option>\n";
$stmt="SELECT campaign_id from vicidial_campaigns where active='Y' order by campaign_id";
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' order by campaign_id";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
@@ -231,15 +250,19 @@ $o=0;
while ($camps_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ($show_campname_pulldown)
{$campname = " - $rowx[1]";}
else
{$campname = '';}
if ($VD_campaign)
{
if (eregi("$VD_campaign",$rowx[0]))
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]$campname</option>\n";}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
$o++;
}
$camp_form_code .= "</select>\n";
@@ -261,7 +284,7 @@ echo "<!-- ILPV -->\n";
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_el/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Ελληνικά <img src=\"../agc/images/el.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Επανασύνδεση </TD>";
echo "</TR>\n";
@@ -300,7 +323,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
#echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
#echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>Σύνδεση χρήστη</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Σύνδεση εκστρατείας </TD>";
echo "</TR>\n";
@@ -338,7 +361,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_el/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Ελληνικά <img src=\"../agc/images/el.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n"; echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Σύνδεση </TD>";
echo "</TR>\n";
@@ -375,7 +398,7 @@ echo "<!-- ILPV -->\n";
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_el/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Ελληνικά <img src=\"../agc/images/el.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Σύνδεση Τηλεφώνου </TD>";
echo "</TR>\n";
@@ -394,7 +417,8 @@ exit;
}
else
{
$fp = fopen ("./vicidial_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./vicidial_auth_entries.txt", "a");}
$VDloginDISPLAY=0;
if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) )
@@ -427,9 +451,11 @@ $VDloginDISPLAY=0;
$VU_vicidial_recording=$row[7];
$VU_vicidial_transfers=$row[8];
$VU_closer_default_blended=$row[9];
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
$user_abb = "$VD_login$VD_login$VD_login$VD_login";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
@@ -513,7 +539,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the statuses to be dialed for your campaign as well as other campaign settings
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -547,6 +573,8 @@ $VDloginDISPLAY=0;
$wrapup_message=$row[27];
$closer_campaigns=$row[28];
$use_internal_dnc=$row[29];
$allcalls_delay=$row[30];
$omit_phone_code=$row[31];
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -597,8 +625,11 @@ $VDloginDISPLAY=0;
}
else
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
}
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Η σύνδεση δεν είναι σωστή, παρακαλώ προσπαθήστε πάλι<BR>";
}
@@ -616,7 +647,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>$VDdisplayMESSAGE</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Σύνδεση εκστρατείας </TD>";
echo "</TR>\n";
@@ -655,7 +686,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
echo "<INPUT TYPE=HIDDEN NAME=VD_login VALUE=\"$VD_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_pass VALUE=\"$VD_pass\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_campaign VALUE=\"$VD_campaign\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Σύνδεση Error</TD>";
echo "</TR>\n";
@@ -740,6 +771,10 @@ else
$DBX_pass=$row[58];
$DBX_port=$row[59];
if ($clientDST)
{
$local_gmt = ($local_gmt + $isdst);
}
if ($protocol == 'EXTERNAL')
{
$protocol = 'Local';
@@ -795,6 +830,11 @@ else
$session_rand = (rand(1,9999999) + 10000000);
$session_name = "$StarTtimE$US$session_ext$session_rand";
if ($webform_sessionname)
{$webform_sessionname = "&session_name=$session_name";}
else
{$webform_sessionname = '';}
$stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
@@ -1000,8 +1040,8 @@ $CTODAY = date("Y-m");
$CTODAYmday = date("j");
$CINC=0;
$Cmonths = Array('January','February','March','April','May','June',
'July','August','September','October','November','December');
$Cmonths = Array('Φεβρουάριος','February','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος');
$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
$CCAL_OUT = '';
@@ -1313,6 +1353,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var previous_called_count = '';
var hot_keys_active = 0;
var all_record = 'NO';
var all_record_count = 0;
var LeaDDispO = '';
var LeaDPreVDispO = '';
var AgaiNHanguPChanneL = '';
@@ -1320,8 +1361,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var AgainCalLSecondS = '';
var AgaiNCalLCID = '';
var CB_count_check = 60;
var agentcallsstatus = '<? echo $agentcallsstatus ?>';
var campagentstatctmax = '<? echo $campagentstatctmax ?>';
var agentcallsstatus = '<? echo $agentcallsstatus ?>'
var campagentstatctmax = '<? echo $campagentstatctmax ?>'
var campagentstatct = '0';
var manual_dial_in_progress = 0;
var auto_dial_alt_dial = 0;
@@ -1339,7 +1380,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var wrapup_message = '<? echo $wrapup_message ?>';
var wrapup_counter = 0;
var wrapup_waiting = 0;
var use_internal_dnc = '<? echo $use_internal_dnc ?>'
var use_internal_dnc = '<? echo $use_internal_dnc ?>';
var allcalls_delay = '<? echo $allcalls_delay ?>';
var omit_phone_code = '<? echo $omit_phone_code ?>';
var no_delete_sessions = '<? echo $no_delete_sessions ?>';
var webform_session = '<? echo $webform_sessionname ?>';
var local_consult_xfers = '<? echo $local_consult_xfers ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"../agc/images/vdc_LB_pause_OFF_el.gif\" border=0 alt=\"Παύση\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"../agc/images/vdc_LB_resume_el.gif\" border=0 alt=\"Επανάληψη\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"../agc/images/vdc_LB_pause_el.gif\" border=0 alt=\"Παύση\"></a><IMG SRC=\"../agc/images/vdc_LB_resume_OFF_el.gif\" border=0 alt=\"Επανάληψη\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"../agc/images/vdc_LB_pause_OFF_el.gif\" border=0 alt=\"Παύση\"><IMG SRC=\"../agc/images/vdc_LB_resume_OFF_el.gif\" border=0 alt=\"Επανάληψη\">";
@@ -1480,18 +1526,26 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var manual_number = document.vicidial_form.xfernumber.value;
var manual_string = manual_number.toString();
}
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("XFER","g");
if (manual_string.match(regXFvars))
{
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
var donothing=1;
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
}
}
}
}
@@ -1527,8 +1581,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
var regCXFvars = new RegExp("CXFER","g");
var tasknum_string = tasknum.toString();
if (tasknum_string.match(regCXFvars))
{
var Ctasknum = tasknum_string.replace(regCXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '990009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
}
var regAXFvars = new RegExp("AXFER","g");
if (tasknum_string.match(regAXFvars))
{
var Ctasknum = tasknum_string.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
if (taskprefix == 'NO') {var orig_prefix = '';}
else {var orig_prefix = agc_dial_prefix;}
if (taskreverse == 'YES')
@@ -1849,7 +1923,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = recording_exten;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('StopMonitorConf','" + taskconfrec + "','" + filename + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_stoprecording_el.gif\" border=0 alt=\"Στάση ηχογράφισης\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Εναρξη ηχογράφισης\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
if (taskconfrectype == 'StopMonitorConf')
{
@@ -1857,7 +1939,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = session_id;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + taskconfrec + "','');return false;\"><IMG SRC=\"../agc/images/vdc_LB_startrecording_el.gif\" border=0 alt=\"Εναρξη ηχογράφισης\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Εναρξη ηχογράφισης\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
confmonitor_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + taskconfrectype + "&format=text&channel=" + channelrec + "&filename=" + filename + "&exten=" + query_recording_exten + "&ext_context=" + ext_context + "&ext_priority=1";
xmlhttp.open('POST', 'manager_send.php');
@@ -1927,18 +2016,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
var queryCID = "XBvdcW" + epoch_sec + user_abb;
var blindxferdialstring = document.vicidial_form.xfernumber.value;
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("XFER","g");
if (blindxferdialstring.match(regXFvars))
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
var regAXFvars = new RegExp("AXFER","g");
if (blindxferdialstring.match(regAXFvars))
{
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
var Ctasknum = blindxferdialstring.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
blindxferdialstring = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
}
}
}
}
@@ -1996,7 +2103,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "VXvdcW" + epoch_sec + user_abb;
var redirectdestination = "NEXTAVAILABLE";
var redirectXTRAvalue = XDchannel;
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectXtra&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue;
var redirecttype_test = document.vicidial_form.xfernumber.value;
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
var regRXFvars = new RegExp("CXFER","g");
if ( (redirecttype_test.match(regRXFvars)) && (local_consult_xfers > 0) )
{var redirecttype = 'RedirectXtraCX';}
else
{var redirecttype = 'RedirectXtra';}
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail;
}
if (taskvar == 'ParK')
{
@@ -2136,7 +2250,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) )
{
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + session_id + "','');return false;\"><IMG SRC=\"../agc/images/vdc_LB_startrecording_el.gif\" border=0 alt=\"Εναρξη ηχογράφισης\"></a>";
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Εναρξη ηχογράφισης\">";
}
@@ -2527,6 +2641,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialNext(mdnCBid,mdnBDleadid,mdnDiaLCodE,mdnPhonENumbeR,mdnStagE)
{
all_record = 'NO';
all_record_count=0;
document.getElementById("DiaLControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_dialnextnumber_OFF_el.gif\" border=0 alt=\"Κλήση επόμενου αριθμού\">";
if (document.vicidial_form.LeadPreview.checked==true)
{
@@ -2562,7 +2677,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc ;
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLnext_query);
@@ -2663,7 +2778,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
// $VICIΚΛΗΣΗ_web_QUERY_STRING =~ s/ /+/gi;
// $VICIΚΛΗΣΗ_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi;
@@ -2698,7 +2814,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"../agc/images/vdc_LB_hangupcustomer_el.gif\" border=0 alt=\"΄Κλείσιμο Πελάτη\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2837,6 +2953,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialOnly(taskaltnum)
{
all_record = 'NO';
all_record_count=0;
if (taskaltnum == 'ALTΤηλE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
@@ -2876,7 +2993,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid;
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLonly_query);
@@ -2903,7 +3020,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"../agc/images/vdc_LB_hangupcustomer_el.gif\" border=0 alt=\"΄Κλείσιμο Πελάτη\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2999,11 +3116,75 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function ReChecKCustoMerChaN()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
recheckVDAI_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ACTION=VDADREcheckINCOMING" + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(recheckVDAI_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var recheck_incoming = null;
recheck_incoming = xmlhttp.responseText;
// alert(xmlhttp.responseText);
var recheck_VDIC_array=recheck_incoming.split("\n");
if (recheck_VDIC_array[0] == '1')
{
var reVDIC_data_VDAC=recheck_VDIC_array[1].split("|");
if (reVDIC_data_VDAC[3] == lastcustchannel)
{
// do nothing
}
else
{
// alert("Κανάλι has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
lastcustserverip = reVDIC_data_VDAC[4];
custchannellive = 1;
}
}
}
}
delete xmlhttp;
}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function check_for_auto_incoming()
{
all_record = 'NO';
all_record_count=0;
document.vicidial_form.lead_id.value = '';
var xmlhttp=false;
/*@cc_on @*/
@@ -3197,7 +3378,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -3213,7 +3395,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("WebFormSpan").innerHTML = "<a href=\"" + VDIC_web_form_address + web_form_vars + "\" target=\"vdcwebform\" onMouseOver=\"WebFormRefresH();\"><IMG SRC=\"../agc/images/vdc_LB_webform_el.gif\" border=0 alt=\"Σελίδα Διαδικτύου\"></a>\n";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (CalL_ScripT_id.length > 0) )
@@ -3303,7 +3485,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -4174,7 +4357,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol;
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(VDlogout_query);
@@ -4487,7 +4670,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.vicidial_form.LeadLookuP.checked=true;
document.getElementById("sessionIDspan").innerHTML = session_id;
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Εναρξη ηχογράφισης\">";
}
@@ -4548,6 +4731,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (logout_stop_timeouts==1) {WaitingForNextStep=1;}
if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();}
if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();}
if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();}
if (wrapup_δευτερόλεπτα > 0)
{
@@ -4632,8 +4816,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (all_record == 'YES')
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
if (all_record_count < allcalls_delay)
{all_record_count++;}
else
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
all_record_count=0;
}
}
@@ -5073,7 +5263,7 @@ echo "</head>\n";
<td align=left><font class="body_text"><input type=text size=7 maxlength=10 name=MDDiaLCodE class="cust_form" value="1">&nbsp; (Αυτό είναι συνήθως ένα 1 στις ΗΠΑ)</td>
</tr><tr>
<td align=right><font class="body_text"> Τηλ Number: </td>
<td align=left><font class="body_text"><input type=text size=12 maxlength=10 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (10 ψηφία μόνο)</td>
<td align=left><font class="body_text"><input type=text size=14 maxlength=12 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (12 digits max - digits only)</td>
</tr><tr>
<td align=right><font class="body_text"> Αναζήτηση Οδηγών: </td>
<td align=left><font class="body_text"><input type=checkbox name=LeadLookuP size=1 value="0">&nbsp; (Η επιλογή αυτή επιτρέπει να βρει τον αριθμό στο σύστημα προτού γίνει εισαγωγή ως νέος οδηγός)</td>
@@ -5336,7 +5526,7 @@ if ( ($alt_phone_dialing) and ($auto_dial_level==0) )
<span id="SpacerSpanC"><IMG SRC="../agc/images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #FFCCFF" id="HangupControl"><IMG SRC="../agc/images/vdc_LB_hangupcustomer_OFF_el.gif" border=0 alt="΄Κλείσιμο Πελάτη"></span><BR>
<span id="SpacerSpanD"><IMG SRC="../agc/images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="../agc/images/vdc_LB_senddtmf_el.gif" border=0 alt="Στείλε DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value=""></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="../agc/images/vdc_LB_senddtmf_el.gif" border=0 alt="Στείλε DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value="" maxlength=50></span><BR>
</center>
</font>
</td>
@@ -5372,7 +5562,7 @@ if ( ($alt_phone_dialing) and ($auto_dial_level==0) )
<td align=left><font class="body_text"><input type=text size=20 name=province maxlength=50 class="cust_form" value="">&nbsp; ID προμηθευτού: <input type=text size=15 name=vendor_lead_code maxlength=20 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Τηλ: </td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=10 class="cust_form" value="">&nbsp; Κωδικός Κλήσης: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Εναλ/κό Τηλ: <input type=text size=11 name=alt_phone maxlength=10 class="cust_form" value=""></td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=12 class="cust_form" value="">&nbsp; Κωδικός Κλήσης: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Εναλ/κό Τηλ: <input type=text size=11 name=alt_phone maxlength=12 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Παρουσίαση: </td>
<td align=left><font class="body_text"><input type=text size=20 name=security_phrase maxlength=100 class="cust_form" value="">&nbsp; Ηλεκτρονικό ταχυδρομείο: <input type=text size=25 name=email maxlength=70 class="cust_form" value=""></td>
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+15 -9
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\
$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);
if ($WeBRooTWritablE > 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);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$ChannelA[$loop_count] = "$row[0]";
$ChannelB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "ChannelA: $ChannelA[$counter] ~";
echo "ChannelB: $ChannelB[$counter] ~";
echo "ChannelBtrunk: $ChannelA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "One of these variables is not valid:\n";
echo "Channel $channel must be greater than 2 characters\n";
echo "ExtraChannel $extrachannel must be greater than 2 characters\n";
echo "queryCID $queryCID must be greater than 14 characters\n";
echo "exten $exten must be set\n";
echo "ext_context $ext_context must be set\n";
echo "ext_priority $ext_priority must be set\n";
echo "\nRedirect Action not sent\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect command not inserted\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Campaign $campaign is not valid\n";
echo "lead_id $lead_id is not valid\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If CALLBK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHOLD", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservation on the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservation on the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
+249 -59
View File
@@ -112,6 +112,18 @@
# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC
# 60619-1047 - Added variable filters to close security holes for login form
# 60804-1710 - fixed scheduled CALLBK for other languages build
# 60808-1145 - Added consultative transfers with customer data
# 60808-2232 - Added campaign name to pulldown for login screen
# 60809-1603 - Added option to locally transfer consult xfers
# 60809-1732 - Added recheck of transferred channels before customer gone mesg
# 60810-1011 - Fixed CXFER leave 3way call bugs
# 60816-1602 - Added ALLCALLS recording delay option allcalls_delay
# 60816-1716 - Fixed customer time display bug and client DST setting
# 60821-1555 - Added option to omit phone_code on dialout of leads
# 60821-1628 - Added ALLFORCE recording option
# 60821-1643 - Added no_delete_sessions option to not delete sessions
# 60822-0512 - Changed phone number fields to be maxlength of 12
# 60829-1531 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
require("dbconnect.php");
@@ -157,8 +169,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
$forever_stop=0;
$version = '1.1.86';
$build = '60804-1710';
$version = '2.0.97';
$build = '60829-1531';
if ($force_logout)
{
@@ -166,6 +178,7 @@ if ($force_logout)
exit;
}
$isdst = date("I");
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
$tsNOW_TIME = date("YmdHis");
@@ -174,6 +187,7 @@ $CIDdate = date("ymdHis");
$month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y"));
$past_month_date = date("Y-m-d H:i:s",$month_old);
$random = (rand(1000000, 9999999) + 10000000);
$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
@@ -186,6 +200,11 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$agentcallsstatus = '0'; # set to 1 to show agent status and call count
$campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name on login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
$clientDST = '1'; # set to 1 to check for DST on server for agent time
$no_delete_sessions = '0'; # set to 1 to not delete sessions at logout
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -223,7 +242,7 @@ if ($campaign_login_list > 0)
$camp_form_code = "<select size=1 name=VD_campaign>\n";
$camp_form_code .= "<option value=\"\"></option>\n";
$stmt="SELECT campaign_id from vicidial_campaigns where active='Y' order by campaign_id";
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' order by campaign_id";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
@@ -231,15 +250,19 @@ $o=0;
while ($camps_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ($show_campname_pulldown)
{$campname = " - $rowx[1]";}
else
{$campname = '';}
if ($VD_campaign)
{
if (eregi("$VD_campaign",$rowx[0]))
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0]$campname</option>\n";}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
}
else
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]</option>\n";}
{$camp_form_code .= "<option value=\"$rowx[0]\">$rowx[0]$campname</option>\n";}
$o++;
}
$camp_form_code .= "</select>\n";
@@ -261,7 +284,7 @@ echo "<!-- ILPV -->\n";
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_es/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Español <img src=\"../agc/images/es.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Re-Login </TD>";
echo "</TR>\n";
@@ -300,7 +323,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\
#echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
#echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>User Login</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Campaign Login </TD>";
echo "</TR>\n";
@@ -338,7 +361,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_es/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Español <img src=\"../agc/images/es.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n"; echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login </TD>";
echo "</TR>\n";
@@ -375,7 +398,7 @@ echo "<!-- ILPV -->\n";
echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\"../agc_en/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">English <img src=\"../agc/images/en.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_es/vicidial.php?relogin=YES&VD_login=$VD_login&VD_campaign=$VD_campaign&phone_login=$phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">Español <img src=\"../agc/images/es.gif\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\n";echo "</TR></TABLE>\n";
echo "<FORM ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Phone Login </TD>";
echo "</TR>\n";
@@ -394,7 +417,8 @@ exit;
}
else
{
$fp = fopen ("./vicidial_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./vicidial_auth_entries.txt", "a");}
$VDloginDISPLAY=0;
if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) )
@@ -427,9 +451,11 @@ $VDloginDISPLAY=0;
$VU_vicidial_recording=$row[7];
$VU_vicidial_transfers=$row[8];
$VU_closer_default_blended=$row[9];
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
$user_abb = "$VD_login$VD_login$VD_login$VD_login";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
@@ -513,7 +539,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the statuses to be dialed for your campaign as well as other campaign settings
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -547,6 +573,8 @@ $VDloginDISPLAY=0;
$wrapup_message=$row[27];
$closer_campaigns=$row[28];
$use_internal_dnc=$row[29];
$allcalls_delay=$row[30];
$omit_phone_code=$row[31];
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -597,8 +625,11 @@ $VDloginDISPLAY=0;
}
else
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
}
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Login incorrect, please try again<BR>";
}
@@ -616,7 +647,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\
echo "<INPUT TYPE=HIDDEN NAME=phone_login VALUE=\"$phone_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=phone_pass VALUE=\"$phone_pass\">\n";
echo "<CENTER><BR><B>$VDdisplayMESSAGE</B><BR><BR>";
echo "<TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Campaign Login </TD>";
echo "</TR>\n";
@@ -655,7 +686,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP BGCOLOR=\"#CCFFCC\" NOWRAP><a href=\
echo "<INPUT TYPE=HIDDEN NAME=VD_login VALUE=\"$VD_login\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_pass VALUE=\"$VD_pass\">\n";
echo "<INPUT TYPE=HIDDEN NAME=VD_campaign VALUE=\"$VD_campaign\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=360 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E0C2D6\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login Error</TD>";
echo "</TR>\n";
@@ -740,6 +771,10 @@ else
$DBX_pass=$row[58];
$DBX_port=$row[59];
if ($clientDST)
{
$local_gmt = ($local_gmt + $isdst);
}
if ($protocol == 'EXTERNAL')
{
$protocol = 'Local';
@@ -795,6 +830,11 @@ else
$session_rand = (rand(1,9999999) + 10000000);
$session_name = "$StarTtimE$US$session_ext$session_rand";
if ($webform_sessionname)
{$webform_sessionname = "&session_name=$session_name";}
else
{$webform_sessionname = '';}
$stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
@@ -1313,6 +1353,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var previous_called_count = '';
var hot_keys_active = 0;
var all_record = 'NO';
var all_record_count = 0;
var LeaDDispO = '';
var LeaDPreVDispO = '';
var AgaiNHanguPChanneL = '';
@@ -1320,8 +1361,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var AgainCalLSecondS = '';
var AgaiNCalLCID = '';
var CB_count_check = 60;
var agentcallsstatus = '<? echo $agentcallsstatus ?>';
var campagentstatctmax = '<? echo $campagentstatctmax ?>';
var agentcallsstatus = '<? echo $agentcallsstatus ?>'
var campagentstatctmax = '<? echo $campagentstatctmax ?>'
var campagentstatct = '0';
var manual_dial_in_progress = 0;
var auto_dial_alt_dial = 0;
@@ -1339,7 +1380,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var wrapup_message = '<? echo $wrapup_message ?>';
var wrapup_counter = 0;
var wrapup_waiting = 0;
var use_internal_dnc = '<? echo $use_internal_dnc ?>'
var use_internal_dnc = '<? echo $use_internal_dnc ?>';
var allcalls_delay = '<? echo $allcalls_delay ?>';
var omit_phone_code = '<? echo $omit_phone_code ?>';
var no_delete_sessions = '<? echo $no_delete_sessions ?>';
var webform_session = '<? echo $webform_sessionname ?>';
var local_consult_xfers = '<? echo $local_consult_xfers ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"../agc/images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"../agc/images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"../agc/images/vdc_LB_pause.gif\" border=0 alt=\"Pause\"></a><IMG SRC=\"../agc/images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"../agc/images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><IMG SRC=\"../agc/images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -1480,18 +1526,26 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var manual_number = document.vicidial_form.xfernumber.value;
var manual_string = manual_number.toString();
}
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("XFER","g");
if (manual_string.match(regXFvars))
{
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
var donothing=1;
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
if (manual_string.length=='11')
{manual_string = "9" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
if (manual_string.length=='10')
{manual_string = "91" + manual_string;}
else
{
if (manual_string.length=='7')
{manual_string = "9" + manual_string;}
}
}
}
}
@@ -1527,8 +1581,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
var regCXFvars = new RegExp("CXFER","g");
var tasknum_string = tasknum.toString();
if (tasknum_string.match(regCXFvars))
{
var Ctasknum = tasknum_string.replace(regCXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '990009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
}
var regAXFvars = new RegExp("AXFER","g");
if (tasknum_string.match(regAXFvars))
{
var Ctasknum = tasknum_string.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
if (taskprefix == 'NO') {var orig_prefix = '';}
else {var orig_prefix = agc_dial_prefix;}
if (taskreverse == 'YES')
@@ -1849,7 +1923,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = recording_exten;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('StopMonitorConf','" + taskconfrec + "','" + filename + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_stoprecording.gif\" border=0 alt=\"Stop Recording\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
if (taskconfrectype == 'StopMonitorConf')
{
@@ -1857,7 +1939,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var query_recording_exten = session_id;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + taskconfrec + "','');return false;\"><IMG SRC=\"../agc/images/vdc_LB_startrecording.gif\" border=0 alt=\"Start Recording\"></a>";
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
if (campaign_recording == 'ALLFORCE')
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
else
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
}
confmonitor_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + taskconfrectype + "&format=text&channel=" + channelrec + "&filename=" + filename + "&exten=" + query_recording_exten + "&ext_context=" + ext_context + "&ext_priority=1";
xmlhttp.open('POST', 'manager_send.php');
@@ -1927,18 +2016,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
var queryCID = "XBvdcW" + epoch_sec + user_abb;
var blindxferdialstring = document.vicidial_form.xfernumber.value;
if (document.vicidial_form.xferoverride.checked==false)
var regXFvars = new RegExp("XFER","g");
if (blindxferdialstring.match(regXFvars))
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
var regAXFvars = new RegExp("AXFER","g");
if (blindxferdialstring.match(regAXFvars))
{
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
var Ctasknum = blindxferdialstring.replace(regAXFvars, '');
if (Ctasknum.length < 2)
{Ctasknum = '83009';}
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
if (closerxfercamptail.length < 3)
{closerxfercamptail = 'IVR';}
blindxferdialstring = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*';
}
}
else
{
if (document.vicidial_form.xferoverride.checked==false)
{
if (blindxferdialstring.length=='11')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
if (blindxferdialstring.length=='10')
{blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
else
{
if (blindxferdialstring.length=='7')
{blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
}
}
}
}
@@ -1996,7 +2103,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "VXvdcW" + epoch_sec + user_abb;
var redirectdestination = "NEXTAVAILABLE";
var redirectXTRAvalue = XDchannel;
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectXtra&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue;
var redirecttype_test = document.vicidial_form.xfernumber.value;
var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value;
var regRXFvars = new RegExp("CXFER","g");
if ( (redirecttype_test.match(regRXFvars)) && (local_consult_xfers > 0) )
{var redirecttype = 'RedirectXtraCX';}
else
{var redirecttype = 'RedirectXtra';}
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail;
}
if (taskvar == 'ParK')
{
@@ -2136,7 +2250,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) )
{
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + session_id + "','');return false;\"><IMG SRC=\"../agc/images/vdc_LB_startrecording.gif\" border=0 alt=\"Start Recording\"></a>";
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
@@ -2527,6 +2641,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialNext(mdnCBid,mdnBDleadid,mdnDiaLCodE,mdnPhonENumbeR,mdnStagE)
{
all_record = 'NO';
all_record_count=0;
document.getElementById("DiaLControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_dialnextnumber_OFF.gif\" border=0 alt=\"Dial Next Number\">";
if (document.vicidial_form.LeadPreview.checked==true)
{
@@ -2562,7 +2677,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc ;
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLnext_query);
@@ -2663,7 +2778,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
// $VICIDIAL_web_QUERY_STRING =~ s/ /+/gi;
// $VICIDIAL_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi;
@@ -2698,7 +2814,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"../agc/images/vdc_LB_hangupcustomer.gif\" border=0 alt=\"Hangup Customer\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2837,6 +2953,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ManualDialOnly(taskaltnum)
{
all_record = 'NO';
all_record_count=0;
if (taskaltnum == 'ALTPhoneE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
@@ -2876,7 +2993,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid;
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&omit_phone_code=" + omit_phone_code;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLonly_query);
@@ -2903,7 +3020,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup();\"><IMG SRC=\"../agc/images/vdc_LB_hangupcustomer.gif\" border=0 alt=\"Hangup Customer\"></a>";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (campaign_script.length > 0) )
@@ -2999,11 +3116,75 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function ReChecKCustoMerChaN()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
recheckVDAI_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ACTION=VDADREcheckINCOMING" + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(recheckVDAI_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var recheck_incoming = null;
recheck_incoming = xmlhttp.responseText;
// alert(xmlhttp.responseText);
var recheck_VDIC_array=recheck_incoming.split("\n");
if (recheck_VDIC_array[0] == '1')
{
var reVDIC_data_VDAC=recheck_VDIC_array[1].split("|");
if (reVDIC_data_VDAC[3] == lastcustchannel)
{
// do nothing
}
else
{
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
lastcustserverip = reVDIC_data_VDAC[4];
custchannellive = 1;
}
}
}
}
delete xmlhttp;
}
}
// ################################################################################
// Check to see if there is a call being sent from the auto-dialer to agent conf
function check_for_auto_incoming()
{
all_record = 'NO';
all_record_count=0;
document.vicidial_form.lead_id.value = '';
var xmlhttp=false;
/*@cc_on @*/
@@ -3197,7 +3378,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -3213,7 +3395,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("WebFormSpan").innerHTML = "<a href=\"" + VDIC_web_form_address + web_form_vars + "\" target=\"vdcwebform\" onMouseOver=\"WebFormRefresH();\"><IMG SRC=\"../agc/images/vdc_LB_webform.gif\" border=0 alt=\"Web Form\"></a>\n";
if (campaign_recording == 'ALLCALLS')
if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') )
{all_record = 'YES';}
if ( (view_scripts == 1) && (CalL_ScripT_id.length > 0) )
@@ -3303,7 +3485,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&session_id=" + session_id +
"&phone=" + document.vicidial_form.phone_number.value +
"&parked_by=" + document.vicidial_form.lead_id.value +
"&dispo=" + LeaDDispO;
"&dispo=" + LeaDDispO + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
web_form_vars = web_form_vars.replace(regWF, '');
@@ -4174,7 +4357,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol;
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(VDlogout_query);
@@ -4487,7 +4670,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.vicidial_form.LeadLookuP.checked=true;
document.getElementById("sessionIDspan").innerHTML = session_id;
if (campaign_recording == 'NEVER')
if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<IMG SRC=\"../agc/images/vdc_LB_startrecording_OFF.gif\" border=0 alt=\"Start Recording\">";
}
@@ -4548,6 +4731,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (logout_stop_timeouts==1) {WaitingForNextStep=1;}
if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();}
if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();}
if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();}
if (wrapup_seconds > 0)
{
@@ -4632,8 +4816,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (all_record == 'YES')
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
if (all_record_count < allcalls_delay)
{all_record_count++;}
else
{
conf_send_recording('MonitorConf',session_id ,'');
all_record = 'NO';
all_record_count=0;
}
}
@@ -5073,7 +5263,7 @@ echo "</head>\n";
<td align=left><font class="body_text"><input type=text size=7 maxlength=10 name=MDDiaLCodE class="cust_form" value="1">&nbsp; (This is usually a 1 in the USA-Canada)</td>
</tr><tr>
<td align=right><font class="body_text"> Phone Number: </td>
<td align=left><font class="body_text"><input type=text size=12 maxlength=10 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (10 digits max - digits only)</td>
<td align=left><font class="body_text"><input type=text size=14 maxlength=12 name=MDPhonENumbeR class="cust_form" value="">&nbsp; (12 digits max - digits only)</td>
</tr><tr>
<td align=right><font class="body_text"> Search Existing Leads: </td>
<td align=left><font class="body_text"><input type=checkbox name=LeadLookuP size=1 value="0">&nbsp; (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)</td>
@@ -5336,7 +5526,7 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<span id="SpacerSpanC"><IMG SRC="../agc/images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #FFCCFF" id="HangupControl"><IMG SRC="../agc/images/vdc_LB_hangupcustomer_OFF.gif" border=0 alt="Hangup Customer"></span><BR>
<span id="SpacerSpanD"><IMG SRC="../agc/images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="../agc/images/vdc_LB_senddtmf.gif" border=0 alt="Send DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value=""></span><BR>
<span STYLE="background-color: #CCCCCC" id="SendDTMF"><a href="#" onclick="SendConfDTMF('<?=$session_id ?>');return false;"><IMG SRC="../agc/images/vdc_LB_senddtmf.gif" border=0 alt="Send DTMF"></a> <input type=text size=5 name=conf_dtmf class="cust_form" value="" maxlength=50></span><BR>
</center>
</font>
</td>
@@ -5372,7 +5562,7 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<td align=left><font class="body_text"><input type=text size=20 name=province maxlength=50 class="cust_form" value="">&nbsp; Vendor ID: <input type=text size=15 name=vendor_lead_code maxlength=20 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Phone: </td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=10 class="cust_form" value="">&nbsp; DialCode: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Alt. Phone: <input type=text size=11 name=alt_phone maxlength=10 class="cust_form" value=""></td>
<td align=left><font class="body_text"><input type=text size=11 name=phone_number maxlength=12 class="cust_form" value="">&nbsp; DialCode: <input type=text size=4 name=phone_code maxlength=10 class="cust_form" value="">&nbsp; Alt. Phone: <input type=text size=11 name=alt_phone maxlength=12 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Show: </td>
<td align=left><font class="body_text"><input type=text size=20 name=security_phrase maxlength=100 class="cust_form" value="">&nbsp; Email: <input type=text size=25 name=email maxlength=70 class="cust_form" value=""></td>
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+15 -9
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$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);
if ($WeBRooTWritablE > 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);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
+17 -10
View File
@@ -123,6 +123,7 @@
# 60821-1628 - Added ALLFORCE recording option
# 60821-1643 - Added no_delete_sessions option to not delete sessions
# 60822-0512 - Changed phone number fields to be maxlength of 12
# 60829-1531 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
require("dbconnect.php");
@@ -168,8 +169,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
$forever_stop=0;
$version = '2.0.96';
$build = '60821-1643';
$version = '2.0.97';
$build = '60829-1531';
if ($force_logout)
{
@@ -416,7 +417,8 @@ exit;
}
else
{
$fp = fopen ("./vicidial_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./vicidial_auth_entries.txt", "a");}
$VDloginDISPLAY=0;
if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) )
@@ -449,9 +451,11 @@ $VDloginDISPLAY=0;
$VU_vicidial_recording=$row[7];
$VU_vicidial_transfers=$row[8];
$VU_closer_default_blended=$row[9];
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
$user_abb = "$VD_login$VD_login$VD_login$VD_login";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
@@ -621,8 +625,11 @@ $VDloginDISPLAY=0;
}
else
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n");
fclose($fp);
}
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "La conexión incorrecta, intentelo otra vez, por favor<BR>";
}
@@ -1033,8 +1040,8 @@ $CTODAY = date("Y-m");
$CTODAYmday = date("j");
$CINC=0;
$Cmonths = Array('January','February','March','April','May','June',
'July','August','September','October','November','December');
$Cmonths = Array('Enero','February','Marcha','Abril','Puede','Junio',
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
$CCAL_OUT = '';
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+25 -19
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICICADRAN|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICICADRAN|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICICADRAN|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICICADRAN|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
@@ -484,15 +490,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_fr.gif";
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
image_livecall_ON.src="../agc/images/agc_live_call_ON_fr.gif";
image_livecall_ON.src="../agc/images/agc_live_call_ON.gif";
var image_voicemail_OFF = new Image();
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF_fr.gif";
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF.gif";
var image_voicemail_ON = new Image();
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON_fr.gif";
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON.gif";
var image_voicemail_BLINK = new Image();
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK_fr.gif";
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK.gif";
var favorites = new Array();
var favorites_names = new Array();
var favorites_busy = new Array();
@@ -2713,11 +2719,11 @@ echo "</head>\n";
<? echo "Bienvenue $LOGfullname, votre téléphone: $fullname - $protocol/$extension sur $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">DÉCONNEXION</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_fr.gif" ALT="Panneau Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines_fr.gif" ALT="Lignes Actives Panneau" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences_fr.gif" ALT="Panneau De Conférences" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON_fr.gif" NAME=voicemail ALT="Vérifiez Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF_fr.gif" NAME=livecall ALT="Vivent L'Appel" WIDTH=109 HEIGHT=30 Border=0></TD>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Panneau Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines.gif" ALT="Lignes Actives Panneau" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences.gif" ALT="Panneau De Conférences" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON.gif" NAME=voicemail ALT="Vérifiez Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF.gif" NAME=livecall ALT="Vivent L'Appel" WIDTH=109 HEIGHT=30 Border=0></TD>
</TR></TABLE>
</SPAN>
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$LaMancheA[$loop_count] = "$row[0]";
$LaMancheB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "LaMancheA: $LaMancheA[$counter] ~";
echo "LaMancheB: $LaMancheB[$counter] ~";
echo "LaMancheA: $ChanneLA[$counter] ~";
echo "LaMancheB: $ChanneLB[$counter] ~";
echo "LaMancheBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "LaMancheA: $LaMancheA[$counter] ~";
echo "LaMancheB: $LaMancheB[$counter] ~";
echo "LaMancheA: $ChanneLA[$counter] ~";
echo "LaMancheB: $ChanneLB[$counter] ~";
echo "LaMancheBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "LaMancheA: $LaMancheA[$counter] ~";
echo "LaMancheB: $LaMancheB[$counter] ~";
echo "LaMancheA: $ChanneLA[$counter] ~";
echo "LaMancheB: $ChanneLB[$counter] ~";
echo "LaMancheBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "LaMancheA: $LaMancheA[$counter] ~";
echo "LaMancheB: $LaMancheB[$counter] ~";
echo "LaMancheA: $ChanneLA[$counter] ~";
echo "LaMancheB: $ChanneLB[$counter] ~";
echo "LaMancheBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "LaMancheA: $LaMancheA[$counter] ~";
echo "LaMancheB: $LaMancheB[$counter] ~";
echo "LaMancheBtrunk: $LaMancheA[$counter]|";
echo "LaMancheA: $ChanneLA[$counter] ~";
echo "LaMancheB: $ChanneLB[$counter] ~";
echo "LaMancheBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "Une de ces variables est inadmissible:\n";
echo "LaManche $channel doivent être les 2 caractères plus grands que\n";
echo "ExtraLaManche $extrachannel doivent être les 2 caractères plus grands que\n";
echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n";
echo "exten $exten doit être placé\n";
echo "ext_context $ext_context doit être placé\n";
echo "ext_priority $ext_priority doit être placé\n";
echo "\nRedirect Action non envoyé\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "LaManche $channel n'est pas de phase sur $call_server_ip, Redirect commande non insérée\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "LaManche $channel n'est pas de phase sur $server_ip, Redirect commande non insérée\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect commande non insérée\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX commande envoyée pour LaManche $channel sur $call_server_ip and \nHungup $extrachannel sur $server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Campagne $campaign est inadmissible\n";
echo "lead_id $lead_id est inadmissible\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If APPELBK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHVIEUX", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservation sur the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservation sur the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+25 -19
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICICHIAMA|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICICHIAMA|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICICHIAMA|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICICHIAMA|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
@@ -484,15 +490,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_it.gif";
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
image_livecall_ON.src="../agc/images/agc_live_call_ON_it.gif";
image_livecall_ON.src="../agc/images/agc_live_call_ON.gif";
var image_voicemail_OFF = new Image();
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF_it.gif";
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF.gif";
var image_voicemail_ON = new Image();
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON_it.gif";
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON.gif";
var image_voicemail_BLINK = new Image();
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK_it.gif";
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK.gif";
var favorites = new Array();
var favorites_names = new Array();
var favorites_busy = new Array();
@@ -2713,11 +2719,11 @@ echo "</head>\n";
<? echo "Benvenuto $LOGfullname, siete loggati dentro questo telefono: $fullname - $protocol/$extension su $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_it.gif" ALT="Pannello Principale" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines_it.gif" ALT="Pannello Linee Attive " WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences_it.gif" ALT="Pannello Conferenze" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON_it.gif" NAME=voicemail ALT="Controlla la Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF_it.gif" NAME=livecall ALT="Chimate Attive" WIDTH=109 HEIGHT=30 Border=0></TD>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Pannello Principale" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines.gif" ALT="Pannello Linee Attive " WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences.gif" ALT="Pannello Conferenze" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON.gif" NAME=voicemail ALT="Controlla la Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF.gif" NAME=livecall ALT="Chimate Attive" WIDTH=109 HEIGHT=30 Border=0></TD>
</TR></TABLE>
</SPAN>
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$CanaleA[$loop_count] = "$row[0]";
$CanaleB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $CanaleA[$counter] ~";
echo "CanaleB: $CanaleB[$counter] ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $CanaleA[$counter] ~";
echo "CanaleB: $CanaleB[$counter] ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $CanaleA[$counter] ~";
echo "CanaleB: $CanaleB[$counter] ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $CanaleA[$counter] ~";
echo "CanaleB: $CanaleB[$counter] ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanaleA: $CanaleA[$counter] ~";
echo "CanaleB: $CanaleB[$counter] ~";
echo "CanaleBtrunk: $CanaleA[$counter]|";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $ChanneLA[$counter]|";
}
}
}
+123 -4
View File
@@ -12,7 +12,7 @@
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
@@ -58,6 +58,8 @@
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1158 - Added variable filters to close security holes for login form
# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers
#
require("dbconnect.php");
@@ -111,14 +113,22 @@ if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$secondS = ereg_replace("[^0-9]","",$secondS);
# default optional vars if not set
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.23';
$build = '60421-1413';
$version = '0.0.25';
$build = '60809-1544';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -391,7 +401,7 @@ if ($ACTION=="Hangup")
######################
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD
# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX
# - insert Redirect Manager statement using extensions name
######################
if ($ACTION=="RedirectVD")
@@ -542,6 +552,115 @@ if ($ACTION=="RedirectNameVmail")
}
}
if ($ACTION=="RedirectXtraCX")
{
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
{
$channel_liveX=0;
$channel_liveY=0;
echo "Una di queste variabili non è valido:\n";
echo "Canale $channel deve essere più grande di 2 caratteri\n";
echo "ExtraCanale $extrachannel deve essere più grande di 2 caratteri\n";
echo "queryCID $queryCID deve essere più grande di 14 caratteri\n";
echo "exten $exten deve essere regolato\n";
echo "ext_context $ext_context deve essere regolato\n";
echo "ext_priority $ext_priority deve essere regolato\n";
echo "\nRedirect Action non trasmesso\n";
}
else
{
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canale $channel non è attivo su $call_server_ip, Redirect comando non inserito\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ($row[0]==0)
{
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canale $channel non è attivo su $server_ip, Redirect comando non inserito\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
{
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect comando non inserito\n";
}
else
{
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$dest_server_ip = $rowx[0];
$dest_session_id = $rowx[1];
$dest_user = $rowx[2];
$S='*';
$D_s_ip = explode('.', $dest_server_ip);
if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
echo "RedirectXtraCX comando inviato a Canale $channel su $call_server_ip and \nHungup $extrachannel su $server_ip\n";
}
}
else
{
if ($channel_liveX==1)
{$ACTION="Redirect"; $server_ip = $call_server_ip;}
if ($channel_liveY==1)
{$ACTION="Redirect"; $channel=$extrachannel;}
}
}
}
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
+6 -2
View File
@@ -21,6 +21,7 @@
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -41,12 +42,15 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.3';
$build = '60421-1111';
$version = '0.0.4';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+70 -12
View File
@@ -67,6 +67,8 @@
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
# - $use_internal_dnc - ('Y','N')
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# changes
# 50629-1044 - First build of script
@@ -104,10 +106,11 @@
# 60609-1148 - Added ability to check for manual dial numbers in DNC
# 60619-1117 - Added variable filters to close security holes for login form
# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic
#
# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing
# 60821-1647 - Added ability to not delete sessions at logout
$version = '0.0.34';
$build = '60623-1414';
$version = '2.0.36';
$build = '60821-1647';
require("dbconnect.php");
@@ -232,6 +235,8 @@ if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
@@ -372,7 +377,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows=1;
$CBleadIDset=1;
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
$stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -534,9 +539,14 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
@@ -653,9 +663,14 @@ if ($ACTION == 'manDiaLonly')
if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";}
else {$CIDstring = "$MqueryCID";}
### whether to omit phone_code or not
if (eregi('Y',$omit_phone_code))
{$Ndialstring = "$Local_out_prefix$phone_number";}
else
{$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
### insert the call action into the vicidial_manager table to initiate the call
# $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -943,6 +958,46 @@ if ($stage == "end")
}
################################################################################
### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for
### calls to see if the channel has updated
################################################################################
if ($ACTION == 'VDADREcheckINCOMING')
{
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) )
{
$channel_live=0;
echo "0\n";
echo "Campagna $campaign non è valido\n";
echo "lead_id $lead_id non è valido\n";
exit;
}
else
{
### grab the call and lead info from the vicidial_live_agents table
$stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$queue_leadID_ct = mysql_num_rows($rslt);
if ($queue_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id =$row[0];
$uniqueid =$row[1];
$callerid =$row[2];
$channel =$row[3];
$call_server_ip =$row[4];
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n";
}
}
}
################################################################################
### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls
### in the vicidial_live_agents table in QUEUE status, then
@@ -1183,7 +1238,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### If CHIAMATABK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHVECCHIO", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id';";
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -1220,11 +1275,14 @@ else
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
##### Remove the reservation su the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
if ($no_delete_sessions < 1)
{
##### Remove the reservation su the vicidial_conferences meetme room
$stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vc_remove = mysql_affected_rows($link);
}
##### Delete the vicidial_live_agents record for this session
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -21,6 +21,7 @@
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -39,11 +40,14 @@ if (isset($_GET["format"])) {$format=$_GET["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '60421-1147';
$version = '0.0.5';
$build = '60619-1204';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+4 -4
View File
@@ -125,7 +125,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -159,14 +159,14 @@ if ($format=='table')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build ADD: $ADD server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build ADD: $ADD server_ip: $server_ip-->\n";
echo "<title>Listy: ";
if ($ADD==1) {echo "Aktywne numery wewnętrzne";}
if ($ADD==2) {echo "Zajęte numery zewnętrzne";}
if ($ADD==2) {echo "Zajęte numery wewnętrzne";}
if ($ADD==3) {echo "Linie zewnętrzne";}
if ($ADD==4) {echo "Numery wewnętrzne";}
if ($ADD==5) {echo "Konferencje";}
if ($ADD==99999) {echo "Pomoc";}
if ($ADD==99999) {echo "POMOC";}
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
+76 -70
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -164,8 +164,8 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=phone_login SIZE=10 maxlength=20 VALUE=\"$phone_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Hasło telefonu: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=phone_pass SIZE=10 maxlength=20 VALUE=\"$phone_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=Submit NAME=Zatwierdź VALUE=Zatwierdź></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>WERSJA: $version &nbsp; &nbsp; &nbsp; BUILD: $build</TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=Submit NAME=ZATWIERDŹ VALUE=ZATWIERDŹ></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>WERSJA: $version &nbsp; &nbsp; &nbsp; KOMPILACJA: $build</TD></TR>\n";
echo "</TABLE>\n";
echo "</FORM>\n\n";
echo "</body>\n\n";
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICIWybierz|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIWYBIERZ|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICIWybierz|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICIWYBIERZ|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
@@ -198,7 +204,7 @@ header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build ADD: $ADD-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build ADD: $ADD-->\n";
if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) )
{
@@ -221,8 +227,8 @@ echo "<TR><TD ALIGN=RIGHT>Login telefonu: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=phone_login SIZE=10 maxlength=20 VALUE=\"$phone_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Hasło telefonu: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=phone_pass SIZE=10 maxlength=20 VALUE=\"$phone_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=Submit NAME=Zatwierdź VALUE=Zatwierdź></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>WERSJA: $version &nbsp; &nbsp; &nbsp; BUILD: $build</TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=Submit NAME=ZATWIERDŹ VALUE=ZATWIERDŹ></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>WERSJA: $version &nbsp; &nbsp; &nbsp; KOMPILACJA: $build</TD></TR>\n";
echo "</TABLE>\n";
echo "</FORM>\n\n";
echo "</body>\n\n";
@@ -253,13 +259,13 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"../agc/images/agc_tab_astguiclient.gif\" Border=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login telefonu </TD>";
echo "</TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font size=1> &nbsp; <BR><FONT SIZE=3>Login Twojego telefonu lub hasło są nieaktywne w systememie, spróbuj jeszcze raz: <BR> &nbsp; </TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font size=1> &nbsp; <BR><FONT SIZE=3>Login Twojego telefonu lub hasło są nieaktywne w tym systememie, spróbuj jeszcze raz: <BR> &nbsp; </TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Login telefonu: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=phone_login SIZE=10 maxlength=20 VALUE=\"$phone_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Hasło telefonu: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=phone_pass SIZE=10 maxlength=20 VALUE=\"$phone_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=Submit NAME=Zatwierdź VALUE=Zatwierdź></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>WERSJA: $version &nbsp; &nbsp; &nbsp; BUILD: $build</TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=Submit NAME=ZATWIERDŹ VALUE=ZATWIERDŹ></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>WERSJA: $version &nbsp; &nbsp; &nbsp; KOMPILACJA: $build</TD></TR>\n";
echo "</TABLE>\n";
echo "</FORM>\n\n";
echo "</body>\n\n";
@@ -525,7 +531,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
?>
// ################################################################################
// ACTIVE EXTENSIONS LIST Odswież FUNCTIONS
// ACTIVE EXTENSIONS LIST ODSWIEŻ FUNCTIONS
function refresh_activeext()
{
document.getElementById("activeext").innerHTML = Nactiveext;
@@ -616,7 +622,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// BUSY TRUNK LIST Odswież FUNCTIONS
// BUSY TRUNK LIST ODSWIEŻ FUNCTIONS
function refresh_busytrunk()
{
document.getElementById("busytrunk").innerHTML = Nbusytrunk;
@@ -663,7 +669,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// BUSY EXTENSIONS LIST Odswież FUNCTIONS
// BUSY EXTENSIONS LIST ODSWIEŻ FUNCTIONS
function refresh_busyext()
{
document.getElementById("busyext").innerHTML = Nbusyext;
@@ -710,7 +716,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR Rozłącz/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR ROZŁĄCZ/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -757,7 +763,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR Rozłącz/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR ROZŁĄCZ/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1378,7 +1384,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>Rozmowa xxx:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">Kanał kliencki</td><td><font class=\"log_title\">Kanał zdalny</td><td><font class=\"log_title\">Nagrywaj</td><td><font class=\"log_title\">Rozłącz</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">PARKING</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>AKTYWNE ROZMOWY Z TEGO TELEFONU:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">KANAŁ KLIENCKI</td><td><font class=\"log_title\">KANAŁ ZDALNY</td><td><font class=\"log_title\">NAGRYWAJ</td><td><font class=\"log_title\">ROZŁĄCZ</td><td><font class=\"log_title\">TRANSFER</td><td><font class=\"log_title\">PARKING</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1408,7 +1414,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else
{live_calls_HTML = live_calls_HTML + "<span id=\"recordlive" + loop_ct + "\"><a href=\"#\" onclick=\"liverecording_send_recording('Monitor','" + channelfieldBtrunk_array[1] + "','recordlive" + loop_ct + "');return false;\">Record</span>";}
live_calls_HTML = live_calls_HTML + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldBtrunk_array[1] + "');return false;\">Rozłącz</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + channelfieldBtrunk_array[1] + "','" + channelfieldA_array[1] + "');return false;\">XFER</a></td><td><font class=\"log_text\"><a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + channelfieldBtrunk_array[1] + "');return false;\">PARKING</td></tr>";
live_calls_HTML = live_calls_HTML + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldBtrunk_array[1] + "');return false;\">ROZŁĄCZ</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + channelfieldBtrunk_array[1] + "','" + channelfieldA_array[1] + "');return false;\">TRANSFER</a></td><td><font class=\"log_text\"><a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + channelfieldBtrunk_array[1] + "');return false;\">PARKING</td></tr>";
if (LCAe[ARY_ct].length < 1)
{LCAe[ARY_ct] = channelfieldA_array[1]; LCAcontent_change++; LCAalter++;}
@@ -1525,7 +1531,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> Połączenie Data/Czas</td><td><font class=\"log_title\">Numer</td><td align=right><font class=\"log_title\">Długość (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> POŁĄCZENIE DATA/CZAS</td><td><font class=\"log_title\">NUMER</td><td align=right><font class=\"log_title\">DŁUGOŚĆ (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1539,7 +1545,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var call_out_datetime = call_array[1];
var call_out_number = call_array[2];
var call_out_length = call_array[3];
out_log_HTML = out_log_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + call_out_datetime + "</td><td><font class=\"log_text\">" + call_out_number + "</td><td align=right><font class=\"log_text\">" + call_out_length + "&nbsp;</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"basic_originate_call('" + call_out_number + "');return false;\">Wybierz</a></td></tr>";
out_log_HTML = out_log_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + call_out_datetime + "</td><td><font class=\"log_text\">" + call_out_number + "</td><td align=right><font class=\"log_text\">" + call_out_length + "&nbsp;</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"basic_originate_call('" + call_out_number + "');return false;\">WYBIERZ</a></td></tr>";
}
out_log_HTML = out_log_HTML + "</table>";
@@ -1553,7 +1559,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> Połączenie Data/Czas</td><td><font class=\"log_title\">IN-Numer</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">Długość</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> POŁĄCZENIE DATA/CZAS</td><td><font class=\"log_title\">IN-NUMER</td><td COLSPAN=2><font class=\"log_title\">IDROZMÓWCY</td><td align=right><font class=\"log_title\">DŁUGOŚĆ</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -1569,7 +1575,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var call_in_idnum = call_array[3];
var call_in_idname = call_array[4];
var call_in_length = call_array[5];
in_log_HTML = in_log_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + call_in_datetime + "</td><td><font class=\"log_text\">" + call_in_number + "</td><td><font class=\"log_text\">" + call_in_idnum + "</td><td><font class=\"log_text\">" + call_in_idname + "</td><td align=right><font class=\"log_text\">" + call_in_length + "&nbsp;</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"basic_originate_call('" + call_in_idnum + "');return false;\">Wybierz</a></td></tr>";
in_log_HTML = in_log_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + call_in_datetime + "</td><td><font class=\"log_text\">" + call_in_number + "</td><td><font class=\"log_text\">" + call_in_idnum + "</td><td><font class=\"log_text\">" + call_in_idname + "</td><td align=right><font class=\"log_text\">" + call_in_length + "&nbsp;</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"basic_originate_call('" + call_in_idnum + "');return false;\">WYBIERZ</a></td></tr>";
}
in_log_HTML = in_log_HTML + "</table>";
@@ -1628,7 +1634,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=-1;
if (parked_count > 0)
{
var park_HTML = "<table width=600><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CHANNEL<BR>&nbsp; Rozmowa ID</td><td><font class=\"log_title\">Zawieszone przez<BR>&nbsp; Czas zawieszenia</td><td><font class=\"log_title\">Rozłącz</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">ODBIERZ</td></tr>"
var park_HTML = "<table width=600><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CHANNEL<BR>&nbsp; Rozmowa ID</td><td><font class=\"log_title\">ZAWIESZONE PRZEZ<BR>&nbsp; CZAS ZAWIESZENIA</td><td><font class=\"log_title\">ROZŁĄCZ</td><td><font class=\"log_title\">TRANSFER</td><td><font class=\"log_title\">ODBIERZ</td></tr>"
while (loop_ct < parked_count)
{
loop_ct++;
@@ -1644,7 +1650,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var park_call_id = park_array[1];
var parked_by = park_array[3];
var parked_time = park_array[4];
park_HTML = park_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + park_channel + "<BR>&nbsp; " + park_call_id + "</td><td><font class=\"log_text\">" + parked_by + "<BR>&nbsp; " + parked_time + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + park_channel + "');return false;\">Rozłącz</a></td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + park_channel + "');return false;\">XFER</a></td><td><font class=\"log_text\"><a href=\"#\" onclick=\"mainxfer_send_redirect('FROMParK','" + park_channel + "');return false;\">ODBIERZ</a></td></tr>";
park_HTML = park_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + park_channel + "<BR>&nbsp; " + park_call_id + "</td><td><font class=\"log_text\">" + parked_by + "<BR>&nbsp; " + parked_time + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + park_channel + "');return false;\">ROZŁĄCZ</a></td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + park_channel + "');return false;\">TRANSFER</a></td><td><font class=\"log_text\"><a href=\"#\" onclick=\"mainxfer_send_redirect('FROMParK','" + park_channel + "');return false;\">ODBIERZ</a></td></tr>";
}
park_HTML = park_HTML + "</table>";
@@ -1817,7 +1823,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var LMAcontent_change=0;
var LMAcontent_match=0;
var conv_start=-1;
var live_conf_HTML = "<font face=\"Arial,Helvetica\"><B>Rozmowa xxx:</B></font><BR><TABLE WIDTH=500><TR BGCOLOR=#E6E6E6><TD><font class=\"log_title\">#</TD><TD><font class=\"log_title\">Kanał zdalny</TD><TD><font class=\"log_title\">Rozłącz</TD><TD><font class=\"log_title\">XFER</TD></TR>";
var live_conf_HTML = "<font face=\"Arial,Helvetica\"><B>AKTYWNE ROZMOWY W TEJ KONFERENCJI:</B></font><BR><TABLE WIDTH=500><TR BGCOLOR=#E6E6E6><TD><font class=\"log_title\">#</TD><TD><font class=\"log_title\">KANAŁ ZDALNY</TD><TD><font class=\"log_title\">ROZŁĄCZ</TD><TD><font class=\"log_title\">TRANSFER</TD></TR>";
if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0))
{
LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]='';
@@ -1833,7 +1839,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
{var row_color = '#CCCCFF';}
var conv_ct = (loop_ct + conv_start);
var channelfieldA = conf_chan_array[conv_ct];
live_conf_HTML = live_conf_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + channelfieldA + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldA + "');return false;\">Rozłącz</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + channelfieldA + "');return false;\">XFER</td></tr>";
live_conf_HTML = live_conf_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</td><td><font class=\"log_text\">" + channelfieldA + "</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"livehangup_send_hangup('" + channelfieldA + "');return false;\">ROZŁĄCZ</td><td><font class=\"log_text\"><a href=\"#\" onclick=\"showMainXfeR('MainXfeRBox','" + channelfieldA + "');return false;\">TRANSFER</td></tr>";
if (!LMAe[ARY_ct])
{LMAe[ARY_ct] = channelfieldA; LMAcontent_change++; LMAalter++;}
@@ -2055,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Originate command to manager to direct user to skrzynka głosowa
// Send Originate command to manager to direct user to skrzynka poczty głosowej
function SendCheckVoiceMail()
{
var xmlhttp=false;
@@ -2282,7 +2288,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var VD_favlist_ct_half = parseInt(favlistCT / 2);
if (VD_favlist_ct_half < 30) {VD_favlist_ct_half = 30;}
var favlist_sec_col = 0;
var favedit_HTML = "<center><table cellpadding=5 cellspacing=5 width=750><tr><td colspan=2 align=center bgcolor=\"#DDDD99\"><B>Dostępne numery wewnętrzne</B></td><td align=center bgcolor=\"#CCCC99\"><B> Ulubione</B></td></tr><tr><td bgcolor=\"#DDDD99\" height=380 width=200 valign=top><font class=\"ss_text\"><span id=FavSelectA>";
var favedit_HTML = "<center><table cellpadding=5 cellspacing=5 width=750><tr><td colspan=2 align=center bgcolor=\"#DDDD99\"><B>DOSTĘPNE NUMERY WEWNĘTRZNE</B></td><td align=center bgcolor=\"#CCCC99\"><B> ULUBIONE</B></td></tr><tr><td bgcolor=\"#DDDD99\" height=380 width=200 valign=top><font class=\"ss_text\"><span id=FavSelectA>";
loop_ct = 0;
while (loop_ct < favlistCT)
{
@@ -2379,7 +2385,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
hideDiv('MainPanel');
showDiv('LogouTBox');
document.getElementById("LogouTBoxLink").innerHTML = "<a href=\"" + agcPAGE + "?relogin=YES&session_epoch=" + epoch_sec + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&user=" + user + "&phone_login=" + phone_login + "&phone_pass=" + phone_pass + "\">Naciśnij aby ponownie się zalogować</a>\n";
document.getElementById("LogouTBoxLink").innerHTML = "<a href=\"" + agcPAGE + "?relogin=YES&session_epoch=" + epoch_sec + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&user=" + user + "&phone_login=" + phone_login + "&phone_pass=" + phone_pass + "\">KLINKNIJ TU, ABY PONOWNIE ZALOGOWAĆ SIĘ</a>\n";
logout_stop_timeouts = 1;
@@ -2460,7 +2466,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
start_all_refresh();
}
function pause() // Pauses the refreshing of the lists
{active_display=2; display_message=" - Aktywne wyświetlanie zatrzymane -";}
{active_display=2; display_message=" - AKTYWNE WYŚWIETLANIE WRZYMANE -";}
function start() // resumes the refreshing of the lists
{active_display=1; display_message='';}
function faster() // lowers by 1000 milliseconds the time until the next refresh
@@ -2481,13 +2487,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
function activeext_order_asc() // changes order of activeext list to ascending
{
activeext_order="asc"; getactiveext();
desc_order_HTML ='<a href="#" onclick="activeext_order_desc();return false;">ORDER</a>';
desc_order_HTML ='<a href="#" onclick="activeext_order_desc();return false;">PORDEK</a>';
document.getElementById("activeext_order").innerHTML = desc_order_HTML;
}
function activeext_order_desc() // changes order of activeext list to descending
{
activeext_order="desc"; getactiveext();
asc_order_HTML ='<a href="#" onclick="activeext_order_asc();return false;">ORDER</a>';
asc_order_HTML ='<a href="#" onclick="activeext_order_asc();return false;">PORDEK</a>';
document.getElementById("activeext_order").innerHTML = asc_order_HTML;
}
@@ -2497,13 +2503,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
function busytrunk_order_asc() // changes order of busytrunk list to ascending
{
busytrunk_order="asc"; getbusytrunk();
desc_order_HTML ='<a href="#" onclick="busytrunk_order_desc();return false;">ORDER</a>';
desc_order_HTML ='<a href="#" onclick="busytrunk_order_desc();return false;">PORDEK</a>';
document.getElementById("busytrunk_order").innerHTML = desc_order_HTML;
}
function busytrunk_order_desc() // changes order of busytrunk list to descending
{
busytrunk_order="desc"; getbusytrunk();
asc_order_HTML ='<a href="#" onclick="busytrunk_order_asc();return false;">ORDER</a>';
asc_order_HTML ='<a href="#" onclick="busytrunk_order_asc();return false;">PORDEK</a>';
document.getElementById("busytrunk_order").innerHTML = asc_order_HTML;
}
function busytrunkhangup_force_refresh() // forces immediate refresh of list content
@@ -2515,13 +2521,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
function busyext_order_asc() // changes order of busyext list to ascending
{
busyext_order="asc"; getbusyext();
desc_order_HTML ='<a href="#" onclick="busyext_order_desc();return false;">ORDER</a>';
desc_order_HTML ='<a href="#" onclick="busyext_order_desc();return false;">PORDEK</a>';
document.getElementById("busyext_order").innerHTML = desc_order_HTML;
}
function busyext_order_desc() // changes order of busyext list to descending
{
busyext_order="desc"; getbusyext();
asc_order_HTML ='<a href="#" onclick="busyext_order_asc();return false;">ORDER</a>';
asc_order_HTML ='<a href="#" onclick="busyext_order_asc();return false;">PORDEK</a>';
document.getElementById("busyext_order").innerHTML = asc_order_HTML;
}
function busylocalhangup_force_refresh() // forces immediate refresh of list content
@@ -2710,14 +2716,14 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Witam $LOGfullname, podłączyłeś się do telefonu: $fullname - $protocol/$extension na $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
<? echo "Witaj $LOGfullname, podłączyłeś się do telefonu: $fullname - $protocol/$extension na $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">WYLOGUJ</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Główny panel" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines.gif" ALT="Panel aktywnych lini" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences.gif" ALT="Panel konferencyjny" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON.gif" NAME=voicemail ALT="Sprawdź pocztę głosową" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF_pl.gif" NAME=livecall ALT="Rozmowa" WIDTH=109 HEIGHT=30 Border=0></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF_pl.gif" NAME=livecall ALT="Aktywna rozmowa" WIDTH=109 HEIGHT=30 Border=0></TD>
</TR></TABLE>
</SPAN>
@@ -2726,19 +2732,19 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK Rozłącz <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK ROZŁĄCZ <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Rozłącz Trunk</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Przejmij Trunk</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_ZMlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','LISTEN');return false;">Podsłuchaj Trunk</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Rozłącz międzymiastową</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Przejmij międzymiastową</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_ZMlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','LISTEN');return false;">Odsłuchaj międzymiastową</a> &nbsp; | &nbsp; </span>
<a href="#" onclick="busytrunkhangup_force_refresh();return false;">Odswież</a> &nbsp; | &nbsp;
<a href="#" onclick="hideTrunkHangup('TrunkHangupBox');">Wróć do Głównego okna</a>
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:12px;z-index:28;" id="LocalHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> Rozłącz <BR><BR>
<span id="LocalHangupContent"> MenĂş Local Activa </span><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> ROZŁĄCZ <BR><BR>
<span id="LocalHangupContent"> Manu aktywnych lokalnych </span><BR>
<span id="LocalHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Local');return false;">Rozłącz lokalną</a> &nbsp; | &nbsp; </span>
<span id="LocalHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Local');return false;">Przejmij lokalną</a> &nbsp; | &nbsp; </span>
<span id="LocalHangup_ZMlink"><a href="#" onclick="busyhangup_send_redirect('Local','LISTEN');return false;">Podsłuchaj lokalną</a> &nbsp; | &nbsp; </span>
@@ -2750,8 +2756,8 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Rozmowa przeniesiona</b> <BR>Kanały do przeniesienia: <span id="MainXfeRChanneL">Kanał</span><BR></tr>
<tr><td>Numer wenętrzny:<BR><span id="MainXfeRContent"> Menu rozszerzeń </span></td>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> AKTYWNA ROZMOWA PRZENIESIONA</b> <BR>Kanały do przeniesienia: <span id="MainXfeRChanneL">Kanał</span><BR></tr>
<tr><td>NumerWenętrzny:<BR><span id="MainXfeRContent"> Menu rozszerzeń </span></td>
<td>
<BR>
<a href="#" onclick="mainxfer_send_redirect('XfeR');return false;">Przełącz do wybranego numeru wewnętrznego</a> <BR><BR>
@@ -2765,11 +2771,11 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Wybieranie numerów wewnętrznych</b> <BR>Połączenie przychodzące z: <span id="LocalDialChanneL">Kanał</span><BR></tr>
<tr><td>Numer wenętrzny:<BR><span id="LocalDialContent"> Menu rozszerzeń </span></td>
<tr><td>NumerWenętrzny:<BR><span id="LocalDialContent"> Menu rozszerzeń </span></td>
<td>
<BR>
<a href="#" onclick="mainxfer_send_originate('DiaL','','');return false;">Połącz z wybranym numerem wewnętrznym</a> <BR><BR>
<a href="#" onclick="mainxfer_send_originate('VMAIL');return false;">Połącz z wybraną skrzynką głosową </a> <BR><BR>
<a href="#" onclick="mainxfer_send_originate('VMAIL');return false;">Połącz z wybraną skrzynką głosową</a> <BR><BR>
<a href="#" onclick="getactiveext('LocalDialBox');return false;">Odswież</a> <BR><BR><BR>
<a href="#" onclick="hideLocalDial('LocalDialBox');">Wróć do Głównego okna</a> <BR><BR>
</TD>
@@ -2777,7 +2783,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:40px;top:12px;z-index:41;" id="ParkDisplayBox">
<table border=0 bgcolor="#FFFFCC" width=640 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Zawieszone rozmowy:</b> <div class="scroll_park" id="ParkDisplayContents"></div>
<table border=0 bgcolor="#FFFFCC" width=640 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ZAWIESZONE ROZMOWY:</b> <div class="scroll_park" id="ParkDisplayContents"></div>
<a href="#" onclick="hideParkDisplay('ParkDisplayBox');">Wróć do Głównego okna</a> <BR><BR>
</td></TR></TABLE>
</span>
@@ -2788,19 +2794,19 @@ echo "</head>\n";
</TD></TR>
<tr><td><span id="busycallsspan"></span></td></tr>
<tr><td><span id="busycallsdebug"></span></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>Poczta głosowa &nbsp; &nbsp; </B></font> Nowy: <span id="new_vmail_span"></span> &nbsp; &nbsp; Stary: <span id="old_vmail_span"></span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font face="Arial,Helvetica"><B>Wybieranie ręczne &nbsp; &nbsp; &nbsp; </B></font><input TYPE=TEXT SIZE=20 NAME=manual_dial STYLE="font-family : sans-serif; font-size : 10px"> <A HREF="#" onclick="SendManualDial();">Wybierz</A></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>POCZTAGŁOSOWA &nbsp; &nbsp; </B></font> NOWY: <span id="new_vmail_span"></span> &nbsp; &nbsp; STARY: <span id="old_vmail_span"></span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font face="Arial,Helvetica"><B>WYBIERANIE RĘCZNE &nbsp; &nbsp; &nbsp; </B></font><input TYPE=TEXT SIZE=20 NAME=manual_dial STYLE="font-family : sans-serif; font-size : 10px"> <A HREF="#" onclick="SendManualDial();">WYBIERZ</A></td></tr>
<tr><td align=center><a href="#" onclick="showParkDisplay('ParkDisplayBox');return false;"><font face="Arial,Helvetica"><B>Zawieszone rozmowy</B></a>: <span id="parked_calls_count">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="#" onclick="showLocalDial('LocalDialBox');return false;"><font face="Arial,Helvetica"><B>Numery wewnętrzne</a></td></tr>
<tr><td align=center><a href="#" onclick="showParkDisplay('ParkDisplayBox');return false;"><font face="Arial,Helvetica"><B>ZAWIESZONE ROZMOWY</B></a>: <span id="parked_calls_count">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="#" onclick="showLocalDial('LocalDialBox');return false;"><font face="Arial,Helvetica"><B>NUMERY WEWNĘTRZNE</a></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>Rozmowy wychodzące:</B></font></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>ROZMOWY WYCHODZĄCE:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>Rozmowy przychodzące:</B></font></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>ROZMOWY PRZYCHODZĄCE:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient WERSJA:<? echo $version ?> BUILD:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient WERSJA:<? echo $version ?> KOMPILACJA:<? echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> Ulubione</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> edytuj</a></span></TD></TR>
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> ULUBIONE</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> edytuj</a></span></TD></TR>
<?
$h=0;
while ($favorites_count > $h)
@@ -2818,9 +2824,9 @@ echo "</head>\n";
<span style="position:absolute;left:5px;top:5px;z-index:34;" id="FavoriteSEdiT">
<table border=0 bgcolor="#DDDDFF" width=800 height=450 cellpadding=2 ALIGN=TOP><TR HEIGHT=95%><TD align=center HEIGHT=95%><span id="FavoriteSEditContent"> Ulubione</span></TD></TR>
<table border=0 bgcolor="#DDDDFF" width=800 height=450 cellpadding=2 ALIGN=TOP><TR HEIGHT=95%><TD align=center HEIGHT=95%><span id="FavoriteSEditContent"> ULUBIONE</span></TD></TR>
<TR><TD ALIGN=CENTER><BR> &nbsp; </TD></TR>
<TR VALIGN=BOTTOM><TD VALIGN=BOTTOM ALIGN=CENTER BGCOLOR="#FFFFCC"><a href="#" onclick="SubmiT_FavoritE_ChangEs();return false;">Zatwierdzenie zmain wymaga logoutu</a></TD></TR>
<TR VALIGN=BOTTOM><TD VALIGN=BOTTOM ALIGN=CENTER BGCOLOR="#FFFFCC"><a href="#" onclick="SubmiT_FavoritE_ChangEs();return false;">ZATWIERDŹ ZMIANY W ULUBIONYCH- wymaga wylogowania</a></TD></TR>
<TR VALIGN=BOTTOM><TD VALIGN=BOTTOM ALIGN=CENTER BGCOLOR="#FFFFCC"><a href="#" onclick="hideDiv('FavoriteSEdiT');return false;">Powrót do głónego okna - anulowanie wprowadzonych zmian</a></TD></TR>
</TABLE>
</span>
@@ -2835,24 +2841,24 @@ echo "</head>\n";
<div id="status"><em>Inicjalizuje..</em></div>
</td></tr>
<tr><td>Aktywne numery wewnętrzne <BR>
<a href="#" onclick="activeext_force_refresh();return false;">Odswież</a> |
<span id="activeext_order"><a href="#" onclick="activeext_order_desc();return false;">ORDER</a> | </span>
<a href="#" onclick="activeext_force_refresh();return false;">ODSWIEŻ</a> |
<span id="activeext_order"><a href="#" onclick="activeext_order_desc();return false;">PORZĄDEK</a> | </span>
</td>
<td>Linie zewnętrzne <BR>
<a href="#" onclick="busytrunk_force_refresh();return false;">Odswież</a> |
<span id="busytrunk_order"><a href="#" onclick="busytrunk_order_desc();return false;">ORDER</a> | </span>
<a href="#" onclick="busytrunk_force_refresh();return false;">ODSWIEŻ</a> |
<span id="busytrunk_order"><a href="#" onclick="busytrunk_order_desc();return false;">PORZĄDEK</a> | </span>
</td>
<td>Numery wewnętrzne <BR>
<a href="#" onclick="busyext_force_refresh();return false;">Odswież</a> |
<span id="busyext_order"><a href="#" onclick="busyext_order_desc();return false;">ORDER</a> | </span>
<a href="#" onclick="busyext_force_refresh();return false;">ODSWIEŻ</a> |
<span id="busyext_order"><a href="#" onclick="busyext_order_desc();return false;">PORZĄDEK</a> | </span>
</td></tr>
<tr><td VALIGN=TOP>
<span id="activeext"><em>Data tutaj</em></span><BR><BR>
</td><td VALIGN=TOP>
<span id="busytrunk"><em>Data tutaj</em></span><BR><BR><span id="TrunkHangupLink"><a href="#" onclick="showTrunkHangup('TrunkHangupBox');return false;">Operacje na Trunk</a></span>
<span id="busytrunk"><em>Data tutaj</em></span><BR><BR><span id="TrunkHangupLink"><a href="#" onclick="showTrunkHangup('TrunkHangupBox');return false;">Operacje na międzymiastowych</a></span>
</td><td VALIGN=TOP>
<span id="busyext"><em>Data tutaj</em></span><BR><BR><span id="LocalHangupLink"><a href="#" onclick="showLocalHangup('LocalHangupBox');return false;">Operacje na lokalnych</a></span>
</td></tr>
+2 -2
View File
@@ -73,7 +73,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -107,7 +107,7 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build EXTEN: $exten server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build EXTEN: $exten server_ip: $server_ip-->\n";
echo "<title>Rejestr rozmów";
echo "</title>\n";
echo "</head>\n";
+3 -3
View File
@@ -86,7 +86,7 @@ $random = (rand(1000000, 9999999) + 10000000);
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -120,7 +120,7 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build MEETME: $conf_exten server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build MEETME: $conf_exten server_ip: $server_ip-->\n";
echo "<title>Sprawdzanie numeru wewnętrznego konferencji";
echo "</title>\n";
echo "</head>\n";
@@ -244,7 +244,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
echo "Konferencja $conf_exten zarejestrował się $exten\n";
echo "Konferencja $conf_exten został zarejestrowany $exten\n";
}
+9 -9
View File
@@ -85,7 +85,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -124,7 +124,7 @@ while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
@@ -250,11 +250,11 @@ echo "<!-- WERSJA: $version BUILD: $build UNIQUEID: $uniqueid server_ip
</script>
<?
echo "<title>Przyhodzące rozmowa";
echo "<title>AKTYWNA PRZYHODZĄCA ROZMOWA";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=\"#CCC2E0\" marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onload=\"link_timeout();\">\n";
echo "<CENTER><H2>Przyhodzące rozmowa</H2>\n";
echo "<CENTER><H2>AKTYWNA PRZYHODZĄCA ROZMOWA</H2>\n";
echo "<B>$NOW_TIME</B><BR><BR>\n";
}
@@ -282,7 +282,7 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Kanał: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>IDRozmówcy: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
$phone = eregi_replace(".*\<","",$row[3]);
@@ -315,14 +315,14 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">UŻYTKOWNIKA</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Numery wybrane: </td><td align=left>$row[8]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Wybierany numer: </td><td align=left>$row[8]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Notatki: </td><td align=left>$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n<span id=\"callactions\">";
echo "<a href=\"#\" onclick=\"livehangup_send_hangup('$row[1]');return false;\">Rozłącz</a> - \n";
echo "<a href=\"#\" onclick=\"liveredirect_send_vmail('$row[1]','$vmail_box');return false;\">Prześlij do poczty głosowej</a>\n";
echo "<a href=\"#\" onclick=\"livehangup_send_hangup('$row[1]');return false;\">ROZŁĄCZ</a> - \n";
echo "<a href=\"#\" onclick=\"liveredirect_send_vmail('$row[1]','$vmail_box');return false;\">PRZEŚLIJ DO MOJEJ POCZTY GŁOSOWEJ</a>\n";
echo "</span></td></tr>\n";
echo "</table>\n";
+22 -21
View File
@@ -28,6 +28,7 @@
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -58,8 +59,8 @@ $pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.12';
$build = '60619-1203';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -73,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -107,7 +108,7 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build EXTEN: $exten server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build EXTEN: $exten server_ip: $server_ip-->\n";
echo "<title>Sprawdzanie aktywnych numerów wewnętrznych";
echo "</title>\n";
echo "</head>\n";
@@ -145,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$KanałA[$loop_count] = "$row[0]";
$KanałB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -155,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -163,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $KanałA[$counter] ~";
echo "KanałB: $KanałB[$counter] ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -177,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $KanałA[$counter] ~";
echo "KanałB: $KanałB[$counter] ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -191,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $KanałA[$counter] ~";
echo "KanałB: $KanałB[$counter] ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -205,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $KanałA[$counter] ~";
echo "KanałB: $KanałB[$counter] ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "KanałA: $KanałA[$counter] ~";
echo "KanałB: $KanałB[$counter] ~";
echo "KanałBtrunk: $KanałA[$counter]|";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $ChanneLA[$counter]|";
}
}
}
+22 -22
View File
@@ -142,7 +142,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -176,14 +176,14 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build ACTION: $ACTION server_ip: $server_ip-->\n";
echo "<title>Manager Send: ";
echo "<!-- WERSJA: $version KOMPILACJA: $build ACTION: $ACTION server_ip: $server_ip-->\n";
echo "<title>Wyślij do zarządzania: ";
if ($ACTION=="Originate") {echo "Originate";}
if ($ACTION=="Redirect") {echo "Redirect";}
if ($ACTION=="RedirectName") {echo "RedirectName";}
if ($ACTION=="Hangup") {echo "Hangup";}
if ($ACTION=="Command") {echo "Command";}
if ($ACTION==99999) {echo "Pomoc";}
if ($ACTION==99999) {echo "POMOC";}
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
@@ -200,7 +200,7 @@ if ($ACTION=="SysCIDOriginate")
{
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) )
{
echo "Exten $exten nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Originate komenda nie wprowadzona\n";
echo "Exten $exten nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Originate komenda nie wstawiona\n";
}
else
{
@@ -277,7 +277,7 @@ if ($ACTION=="Originate")
{
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) )
{
echo "Exten $exten nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Originate komenda nie wprowadzona\n";
echo "Exten $exten nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Originate komenda nie wstawiona\n";
}
else
{
@@ -304,7 +304,7 @@ if ($ACTION=="HangupConfDial")
if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) )
{
$channel_live=0;
echo "conference $exten nie jest prawidłowy or ext_context $ext_context or queryCID $queryCID nie jest prawidłowy, Hangup komenda nie wprowadzona\n";
echo "conference $exten nie jest prawidłowy or ext_context $ext_context or queryCID $queryCID nie jest prawidłowy, Hangup komenda nie wstawiona\n";
}
else
{
@@ -341,7 +341,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Kanał $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Hangup komenda nie wprowadzona\n";
echo "Kanał $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Hangup komenda nie wstawiona\n";
}
else
{
@@ -380,7 +380,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Kanał $channel nie jest aktywna na $call_server_ip, Hangup komenda nie wprowadzona $rowx[0]\n$stmt\n";
echo "Kanał $channel nie jest aktywna na $call_server_ip, Hangup komenda nie wstawiona $rowx[0]\n$stmt\n";
}
else
{
@@ -426,13 +426,13 @@ if ($ACTION=="RedirectVD")
if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;}
if (eregi("CLOSER",$campaign))
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANSFER' where lead_id='$lead_id' order by start_epoch desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
if ($auto_dial_level < 1)
{
$stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';";
$stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANSFER' where uniqueid='$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
@@ -587,7 +587,7 @@ if ($ACTION=="RedirectXtraCX")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wprowadzona\n";
echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
@@ -603,7 +603,7 @@ if ($ACTION=="RedirectXtraCX")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wprowadzona\n";
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
@@ -615,7 +615,7 @@ if ($ACTION=="RedirectXtraCX")
if ($rowx[0] < 1)
{
$channel_liveY=0;
echo "No Local agent to send call to, Redirect komenda nie wprowadzona\n";
echo "No Local agent to send call to, Redirect komenda nie wstawiona\n";
}
else
{
@@ -701,7 +701,7 @@ if ($ACTION=="RedirectXtra")
else
{
$channel_liveX=0;
echo "Nie mogę znaleźć wolnej konferencji na $server_ip, Redirect komenda nie wprowadzona\n";
echo "Nie mogę znaleźć wolnej konferencji na $server_ip, Redirect komenda nie wstawiona\n";
}
}
@@ -720,7 +720,7 @@ if ($ACTION=="RedirectXtra")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wprowadzona\n";
echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n";
}
}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
@@ -736,7 +736,7 @@ if ($ACTION=="RedirectXtra")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wprowadzona\n";
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
}
}
if ( ($channel_liveX==1) && ($channel_liveY==1) )
@@ -818,7 +818,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wprowadzona\n";
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
}
}
if ($channel_live==1)
@@ -849,7 +849,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) )
{
$channel_live=0;
echo "Kanał $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wprowadzona\n";
echo "Kanał $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wstawiona\n";
}
else
{
@@ -866,7 +866,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanał $channel nie jest aktywna na $server_ip, $ACTION komenda nie wprowadzona\n";
echo "Kanał $channel nie jest aktywna na $server_ip, $ACTION komenda nie wstawiona\n";
}
}
if ($channel_live==1)
@@ -928,7 +928,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) )
{
$channel_live=0;
echo "Kanał $channel nie jest prawidłowy or exten $exten nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wprowadzona\n";
echo "Kanał $channel nie jest prawidłowy or exten $exten nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wstawiona\n";
}
else
{
@@ -992,7 +992,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
}
}
echo "$ACTION komenda wysłana do Kanał $channel na $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n Nagrywanie zakończy się po 60 minutach\n";
echo "$ACTION komenda wysłana do Kanał $channel na $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n NAGRYWANIE BĘDZIE TRWAĆ MAKSYMALNIE 60 MINUT\n";
}
}
+2 -2
View File
@@ -64,7 +64,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) )
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -97,7 +97,7 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build EXTEN: $exten server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build EXTEN: $exten server_ip: $server_ip-->\n";
echo "<title>Zawieszone rozmowy";
echo "</title>\n";
echo "</head>\n";
+16 -16
View File
@@ -267,7 +267,7 @@ $auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -301,8 +301,8 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build USER: $user server_ip: $server_ip-->\n";
echo "<title>VICIDiaL Skrypt odpytujący bazę danych";
echo "<!-- WERSJA: $version KOMPILACJA: $build USER: $user server_ip: $server_ip-->\n";
echo "<title>VICIDiaL Skrypt zapytań do bazy danych";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
@@ -394,7 +394,7 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($row[0] > 0)
{
echo "DNC Numer\n";
echo "DNC NUMER\n";
exit;
}
}
@@ -743,7 +743,7 @@ if ($stage == "start")
{
if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) )
{
echo "LOG NOT ENTERED\n";
echo "Dziennik nie zapisany\n";
echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign nie jest prawidłowy\n";
exit;
}
@@ -757,12 +757,12 @@ if ($stage == "start")
if ($affected_rows > 0)
{
echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n";
echo "VICIDiaL_LOG Wstawiony: $uniqueid|$channel|$NOW_TIME\n";
echo "$StarTtime\n";
}
else
{
echo "LOG NOT ENTERED\n";
echo "Dziennik nie zapisany\n";
}
# ##### insert log into call_log for manual VICIDiaL call
@@ -773,11 +773,11 @@ if ($stage == "start")
# if ($affected_rows > 0)
# {
# echo "CALL_LOG Inserted: $uniqueid|$channel|$NOW_TIME";
# echo "CALL_LOG Wstawiony: $uniqueid|$channel|$NOW_TIME";
# }
# else
# {
# echo "LOG NOT ENTERED\n";
# echo "Dziennik nie zapisany\n";
# }
}
}
@@ -786,7 +786,7 @@ if ($stage == "end")
{
if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) )
{
echo "LOG NOT ENTERED\n";
echo "Dziennik nie zapisany\n";
echo "uniqueid $uniqueid or lead_id: $lead_id nie jest prawidłowy\n";
exit;
}
@@ -850,7 +850,7 @@ if ($stage == "end")
}
else
{
echo "LOG NOT ENTERED\n\n";
echo "Dziennik nie zapisany\n\n";
}
}
@@ -1236,7 +1236,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$rslt=mysql_query($stmt, $link);
### If RozmowaBK, change vicidial_callback record to INACTIVE
if (eregi("CALLBK|CBHStary", $dispo))
if (eregi("CALLBK|CBHSTARY", $dispo))
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
@@ -1269,8 +1269,8 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) )
}
else
{
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');";
##### Insert a WYLOGUJ record into the user log
$stmt="INSERT INTO vicidial_user_log values('','$user','WYLOGUJ','$campaign','$NOW_TIME','$StarTtime');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$vul_insert = mysql_affected_rows($link);
@@ -1372,7 +1372,7 @@ if ($ACTION == 'updateDISPO')
$agent_log_id = mysql_insert_id();
### RozmowaBACK ENTRY
if ( ($dispo_choice == 'CBHStary') and (strlen($CallBackDatETimE)>10) )
if ( ($dispo_choice == 'CBHSTARY') and (strlen($CallBackDatETimE)>10) )
{
$stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');";
if ($DB) {echo "$stmt\n";}
@@ -1462,7 +1462,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
}
}
}
echo 'Agent ' . $user . ' jest w statusie ' . $stage . "\n";
echo 'Agent ' . $user . ' ma statusie ' . $stage . "\n";
}
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -61,7 +61,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Nieprawidłowy Nazwa użytkownika/Hasło: |$user|$pass|\n";
echo "Nieprawidłowy NazwaUżytkownika/Hasło: |$user|$pass|\n";
exit;
}
else
@@ -95,7 +95,7 @@ if ($format=='debug')
{
echo "<html>\n";
echo "<head>\n";
echo "<!-- WERSJA: $version BUILD: $build VMBOX: $vmail_box server_ip: $server_ip-->\n";
echo "<!-- WERSJA: $version KOMPILACJA: $build VMBOX: $vmail_box server_ip: $server_ip-->\n";
echo "<title>Sprawdzanie poczty głosowej";
echo "</title>\n";
echo "</head>\n";
@@ -107,7 +107,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if (strlen($vmail_box)<1)
{
$channel_live=0;
echo "skrzynka głosowa $vmail_box nie jest prawidłowy\n";
echo "skrzynka poczty głosowej $vmail_box nie jest prawidłowy\n";
exit;
}
else
+21 -2
View File
@@ -37,6 +37,7 @@
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -79,6 +80,24 @@ if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
### security strip all non-alphanumeric characters out of the variables ###
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
$ADD=ereg_replace("[^0-9]","",$ADD);
$order=ereg_replace("[^0-9a-zA-Z]","",$order);
$format=ereg_replace("[^0-9a-zA-Z]","",$format);
$bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor);
$txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor);
$txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize);
$selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize);
$selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize);
$selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext);
$selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk);
$selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal);
$textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight);
$textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth);
$field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name);
# default optional vars if not set
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
@@ -91,8 +110,8 @@ if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.7';
$build = '60421-1155';
$version = '0.0.8';
$build = '60619-1118';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+25 -19
View File
@@ -55,12 +55,11 @@
# 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
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
#
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"];}
@@ -88,8 +87,8 @@ $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';
$version = '2.0.1';
$build = '60829-1528';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -124,7 +123,8 @@ $FILE_TIME = date("Ymd-His");
$US='_';
$CL=':';
$fp = fopen ("./astguiclient_auth_entries.txt", "a");
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./astguiclient_auth_entries.txt", "a");}
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
@@ -183,13 +183,19 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname=$row[0];
fwrite ($fp, "VICISELETOR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICISELETOR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
else
{
fwrite ($fp, "VICISELETOR|FAIL|$date|$user|$pass|$ip|$browser|\n");
fclose($fp);
if ($WeBRooTWritablE > 0)
{
fwrite ($fp, "VICISELETOR|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
fclose($fp);
}
}
}
@@ -484,15 +490,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_pt.gif";
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
image_livecall_ON.src="../agc/images/agc_live_call_ON_pt.gif";
image_livecall_ON.src="../agc/images/agc_live_call_ON.gif";
var image_voicemail_OFF = new Image();
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF_pt.gif";
image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF.gif";
var image_voicemail_ON = new Image();
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON_pt.gif";
image_voicemail_ON.src="../agc/images/agc_check_voicemail_ON.gif";
var image_voicemail_BLINK = new Image();
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK_pt.gif";
image_voicemail_BLINK.src="../agc/images/agc_check_voicemail_BLINK.gif";
var favorites = new Array();
var favorites_names = new Array();
var favorites_busy = new Array();
@@ -2713,11 +2719,11 @@ echo "</head>\n";
<? echo "Boa vinda $LOGfullname, seu telefone: $fullname - $protocol/$extension em $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_pt.gif" ALT="Painel Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines_pt.gif" ALT="Linhas Ativas Painel" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences_pt.gif" ALT="Painel Das Conferências" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON_pt.gif" NAME=voicemail ALT="Verifique Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF_pt.gif" NAME=livecall ALT="Vive A Chamada" WIDTH=109 HEIGHT=30 Border=0></TD>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Painel Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ActiveLinesPanelToFront();"><IMG SRC="../agc/images/agc_tab_active_lines.gif" ALT="Linhas Ativas Painel" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="ConfereNcesPanelToFront();"><IMG SRC="../agc/images/agc_tab_conferences.gif" ALT="Painel Das Conferências" WIDTH=139 HEIGHT=30 Border=0></A></TD>
<TD><A HREF="#" onclick="SendCheckVoiceMail();"><IMG SRC="../agc/images/agc_check_voicemail_ON.gif" NAME=voicemail ALT="Verifique Voicemail" WIDTH=170 HEIGHT=30 Border=0></A></TD>
<TD><IMG SRC="../agc/images/agc_live_call_OFF.gif" NAME=livecall ALT="Vive A Chamada" WIDTH=109 HEIGHT=30 Border=0></TD>
</TR></TABLE>
</SPAN>
+6 -2
View File
@@ -27,6 +27,7 @@
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -47,6 +48,9 @@ if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
@@ -54,8 +58,8 @@ if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.7';
$build = '60421-1401';
$version = '0.0.8';
$build = '60619-1202';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+6 -2
View File
@@ -31,6 +31,7 @@
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1201 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -59,13 +60,16 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.8';
$build = '60421-1405';
$version = '0.0.9';
$build = '60619-1201';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+5 -2
View File
@@ -29,6 +29,7 @@
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
#
require("dbconnect.php");
@@ -61,12 +62,14 @@ if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '0.0.5';
$build = '60421-1043';
$version = '0.0.6';
$build = '60619-1205';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
+24 -19
View File
@@ -27,6 +27,8 @@
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
#
require("dbconnect.php");
@@ -51,11 +53,14 @@ if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
$user=ereg_replace("[^0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^0-9a-zA-Z]","",$pass);
# default optional vars if not set
if (!isset($format)) {$format="text";}
$version = '1.1.11';
$build = '60421-1359';
$version = '2.0.1';
$build = '60825-1029';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -141,8 +146,8 @@ echo "$row[0]|";
{
$loop_count++;
$row=mysql_fetch_row($rslt);
$CanaletaA[$loop_count] = "$row[0]";
$CanaletaB[$loop_count] = "$row[1]";
$ChanneLA[$loop_count] = "$row[0]";
$ChanneLB[$loop_count] = "$row[1]";
if ($format=='debug') {echo "\n<!-- $row[0] $row[1] -->";}
}
}
@@ -151,7 +156,7 @@ echo "$row[0]|";
while($loop_count > $counter)
{
$counter++;
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -159,13 +164,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaletaA: $CanaletaA[$counter] ~";
echo "CanaletaB: $CanaletaB[$counter] ~";
echo "CanaletaA: $ChanneLA[$counter] ~";
echo "CanaletaB: $ChanneLB[$counter] ~";
echo "CanaletaBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -173,13 +178,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaletaA: $CanaletaA[$counter] ~";
echo "CanaletaB: $CanaletaB[$counter] ~";
echo "CanaletaA: $ChanneLA[$counter] ~";
echo "CanaletaB: $ChanneLB[$counter] ~";
echo "CanaletaBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -187,13 +192,13 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaletaA: $CanaletaA[$counter] ~";
echo "CanaletaB: $CanaletaB[$counter] ~";
echo "CanaletaA: $ChanneLA[$counter] ~";
echo "CanaletaB: $ChanneLB[$counter] ~";
echo "CanaletaBtrunk: $row[0]|";
}
else
{
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";";
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($rslt) {$trunk_count = mysql_num_rows($rslt);}
@@ -201,16 +206,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaletaA: $CanaletaA[$counter] ~";
echo "CanaletaB: $CanaletaB[$counter] ~";
echo "CanaletaA: $ChanneLA[$counter] ~";
echo "CanaletaB: $ChanneLB[$counter] ~";
echo "CanaletaBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanaletaA: $CanaletaA[$counter] ~";
echo "CanaletaB: $CanaletaB[$counter] ~";
echo "CanaletaBtrunk: $CanaletaA[$counter]|";
echo "CanaletaA: $ChanneLA[$counter] ~";
echo "CanaletaB: $ChanneLB[$counter] ~";
echo "CanaletaBtrunk: $ChanneLA[$counter]|";
}
}
}

Some files were not shown because too many files have changed in this diff Show More