Added manual dial override as campaign option

Added agent blind monitoring alert campaign options
Added inbound custom call id display options
Added optional phone codec settings
Added ability to block user information in the real-=time report by viewing user
Update Italian agent build in trunk

git-svn-id: svn://192.168.202.10@1417 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-04-25 06:03:36 +00:00
parent 24f5cf3204
commit b05c07aaa0
21 changed files with 3828 additions and 2207 deletions
@@ -135,12 +135,12 @@ $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Username/Password non validi: |$user|$pass|\n";
exit;
}
else
else
{
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
+37 -34
View File
@@ -4,46 +4,49 @@
#
# database connection settings and some global web settings
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
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);}
$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("^VARserver_ip", $DBCline))
{$WEBserver_ip = $DBCline; $WEBserver_ip = preg_replace("/.*=/","",$WEBserver_ip);}
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);}
}
}
else
{
#defaults for DB connection
$VARDB_server = 'localhost';
$VARDB_port = '3306';
$VARDB_user = 'cron';
$VARDB_pass = '1234';
$VARDB_database = '1234';
$WeBServeRRooT = '/usr/local/apache2/htdocs';
}
}
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");
if (!$link) {
$link=mysql_connect("$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass");
if (!$link)
{
die('MySQL connect ERROR: ' . mysql_error());
}
mysql_select_db("$VARDB_database",$link);
}
mysql_select_db("$VARDB_database");
$local_DEF = 'Local/';
$conf_silent_prefix = '7';
+9 -37
View File
@@ -1,7 +1,7 @@
<?php
# manager_send.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -41,6 +41,7 @@
# - $agent_dialed_number - ('1','')
# - $agent_dialed_type - ('MANUAL_OVERRIDE','MANUAL_DIALNOW','MANUAL_PREVIEW',...)
# - $nodeletevdac - ('0','1')
# - $alertCID - ('0','1')
#
# CHANGELOG:
# 50401-1002 - First build of script, Hangup function only
@@ -94,10 +95,12 @@
# 91112-1110 - Added CALLOUTBOUND value to QM entry lookup
# 91205-2103 - Code cleanup
# 91213-1208 - Added queue_position to queue_log COMPLETE... records
# 100327-0846 - Fix for list_id override answering machine message
# 100423-2304 - Added alertCID
#
$version = '2.2.0-46';
$build = '91213-1208';
$version = '2.2.0-48';
$build = '100423-2304';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=85;
$one_mysql_log=0;
@@ -185,6 +188,8 @@ if (isset($_GET["agent_dialed_type"])) {$agent_dialed_type=$_GET["agent_diale
elseif (isset($_POST["agent_dialed_type"])) {$agent_dialed_type=$_POST["agent_dialed_type"];}
if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["alertCID"])) {$alertCID=$_GET["alertCID"];}
elseif (isset($_POST["alertCID"])) {$alertCID=$_POST["alertCID"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -390,7 +395,7 @@ if ($ACTION=="OriginateVDRelogin")
if ($ACTION=="Originate")
{
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) )
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or ( (strlen($queryCID)<10) && ($alertCID < 1) ) )
{
echo "ERROR Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n";
}
@@ -734,39 +739,6 @@ if ($ACTION=="RedirectVD")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02024',$user,$server_ip,$session_name,$one_mysql_log);}
}
else
{
if (strlen($lead_id) > 1)
{
$list_id='';
$stmt = "SELECT list_id FROM vicidial_list where lead_id='$lead_id';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02084',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$lio_ct = mysql_num_rows($rslt);
if ($lio_ct > 0)
{
$row=mysql_fetch_row($rslt);
$list_id = $row[0];
if (strlen($list_id) > 1)
{
$stmt = "SELECT am_message_exten_override FROM vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02085',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$lio_ct = mysql_num_rows($rslt);
if ($lio_ct > 0)
{
$row=mysql_fetch_row($rslt);
$am_message_exten_override = $row[0];
if (strlen($am_message_exten_override) > 0) {$exten = "$am_message_exten_override";}
}
}
}
}
}
$ACTION="Redirect";
}
}
File diff suppressed because it is too large Load Diff
@@ -11,10 +11,11 @@
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
# 100116-0702 - Added preset variables
# 100127-1611 - Added ignore_list_script_override option
#
$version = '2.2.0-5';
$build = '100116-0702';
$version = '2.2.0-6';
$build = '100127-1611';
require("dbconnect.php");
@@ -177,7 +178,6 @@ $CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$script_height = ($script_height - 20);
$IFRAME=0;
@@ -252,6 +252,19 @@ if (strlen($in_script) < 1)
else
{$call_script = $in_script;}
$ignore_list_script_override='N';
$stmt = "SELECT ignore_list_script_override FROM vicidial_inbound_groups where group_id='$group';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$ilso_ct = mysql_num_rows($rslt);
if ($ilso_ct > 0)
{
$row=mysql_fetch_row($rslt);
$ignore_list_script_override = $row[0];
}
if ($ignore_list_script_override=='Y')
{$ignore_list_script=1;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
@@ -262,6 +275,12 @@ if ($ignore_list_script < 1)
{$call_script = $agent_script_override;}
}
$stmt="SELECT list_name,list_description from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$list_name = $row[0];
$list_description = $row[1];
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -275,6 +294,8 @@ if (eregi("iframe src",$script_text))
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$list_name = eregi_replace(' ','+',$list_name);
$list_description = eregi_replace(' ','+',$list_description);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
@@ -348,6 +369,8 @@ $script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--list_name--B--',"$list_name",$script_text);
$script_text = eregi_replace('--A--list_description--B--',"$list_description",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
File diff suppressed because it is too large Load Diff