added VDAD as inactive user to first_server_install.sql file so some reports will work properly

small typo fixed in LICENSE.txt file
added UPGRADE note about extensions.conf changing significantly
fixed the -q quiet flag in several scripts in bin in order to suppress all output to the screen

git-svn-id: svn://192.168.202.10@1091 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-04-01 17:58:03 +00:00
parent bf606ac2ed
commit ff1c321b1e
8 changed files with 172 additions and 98 deletions
+9
View File
@@ -303,6 +303,15 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
67. Added new monitoring functionality to allow monitoring from one agent to
another without hanging up
68. Added Russian version of the Agent screen
69. Added Dutch version of the Agent screen
70. Many changes have been made to the extensions.conf dialplan. It is usually
better to take the default docs/conf_examples/extensions.conf.sample file and
take the customizations from your old extensions.conf file and move them into
the new file.
+8 -6
View File
@@ -23,9 +23,11 @@
# 80917-2202 - Added FSO-FSA for Eastern Australia (not active)
# Added LSS-FSA for New Zealand (not active)
# 90129-1114 - Added NANPA prefix lookup option
# 90401-1327 - Fixed quiet flag function
#
$MT[0]='';
$q=0;
### begin parsing run-time options ###
if (length($ARGV[0])>1)
@@ -55,12 +57,12 @@ if (length($ARGV[0])>1)
{
if ($args =~ /-q/i)
{
$q=1; $Q=1;
$q=1;
}
if ($args =~ /-t|--test/i)
{
$T=1; $TEST=1;
print "\n-----TESTING -----\n\n";
if ($q < 1) {print "\n-----TESTING -----\n\n";}
}
if ($args =~ /--debug/i)
{
@@ -75,18 +77,18 @@ if (length($ARGV[0])>1)
if ($args =~ /--postal-code-gmt/i)
{
$searchPOST=1;
print "\n----- DO POSTAL CODE LOOKUP -----\n\n";
if ($q < 1) {print "\n----- DO POSTAL CODE LOOKUP -----\n\n";}
}
if ($args =~ /--nanpa-prefix-gmt/i)
{
$searchNANPA=1;
print "\n----- DO NANPA PREFIX LOOKUP -----\n\n";
if ($q < 1) {print "\n----- DO NANPA PREFIX LOOKUP -----\n\n";}
}
if ($args =~ /-singlelistid=/i)
{
@data_in = split(/-singlelistid=/,$args);
$singlelistid = $data_in[1];
print "\n----- SINGLE LISTID OVERRIDE: $singlelistid -----\n\n";
if ($q < 1) {print "\n----- SINGLE LISTID OVERRIDE: $singlelistid -----\n\n";}
}
else
{$singlelistid = '';}
@@ -867,7 +869,7 @@ if($DB){print "Area Code Updates: $TOTALarea_updated_count\n";}
if($DB){print "NANPA Updates: $TOTALnanpa_updated_count\n";}
if($DB){print "\nDONE\n";}
$secy = time(); $secz = ($secy - $secX); $minz = ($secz/60); # calculate script runtime so far
print " - process runtime ($secz sec) ($minz minutes)\n";
if ($q < 1) {print " - process runtime ($secz sec) ($minz minutes)\n";}
exit;
+72 -28
View File
@@ -17,6 +17,7 @@
# 71215-0410 - fixed UPDATE/DELETE results
# 80909-0555 - added vicidial_campaign_dnc table
# 90307-2025 - Added several new queries and rearranged update/deletes
# 90401-1335 - Added quiet and test flag functions
#
# default path to astguiclient configuration file:
@@ -62,6 +63,49 @@ $server_ip = $VARserver_ip; # Asterisk server IP
if (!$VARDB_port) {$VARDB_port='3306';}
$MT[0]='';
$q=0;
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
$i=0;
while ($#ARGV >= $i)
{
$args = "$args $ARGV[$i]";
$i++;
}
if ($args =~ /--help/i)
{
print "allowed run time options:\n";
print " [-q] = quiet\n";
print " [-t] = test\n";
print " [-help] = this screen\n";
print "\n";
exit;
}
else
{
if ($args =~ /-t/i)
{
$T=1;
}
if ($args =~ /-q/i)
{
$q=1;
$DB=0;
}
}
}
else
{
print "no command line options set\n";
}
use DBI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
@@ -74,7 +118,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
if (!$T)
{
$affected_rows = $dbhA->do($stmtA);
if(!$Q){print STDERR "\n|$affected_rows vicidial_campaign_stats records reset|\n";}
if(!$q){print STDERR "\n|$affected_rows vicidial_campaign_stats records reset|\n";}
}
$stmtA = "optimize table vicidial_campaign_stats;";
@@ -84,7 +128,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -93,7 +137,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
if (!$T)
{
$affected_rows = $dbhA->do($stmtA);
if(!$Q){print STDERR "\n|$affected_rows vicidial_campaign_server_stats records deleted|\n";}
if(!$q){print STDERR "\n|$affected_rows vicidial_campaign_server_stats records deleted|\n";}
}
$stmtA = "optimize table vicidial_campaign_server_stats;";
@@ -103,7 +147,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -112,7 +156,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
if (!$T)
{
$affected_rows = $dbhA->do($stmtA);
if(!$Q){print STDERR "\n|$affected_rows vicidial_live_inbound_agents records deleted|\n";}
if(!$q){print STDERR "\n|$affected_rows vicidial_live_inbound_agents records deleted|\n";}
}
$stmtA = "optimize table vicidial_live_inbound_agents;";
@@ -122,7 +166,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -131,7 +175,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
if (!$T)
{
$affected_rows = $dbhA->do($stmtA);
if(!$Q){print STDERR "\n|$affected_rows vicidial_inbound_group_agents call counts reset|\n";}
if(!$q){print STDERR "\n|$affected_rows vicidial_inbound_group_agents call counts reset|\n";}
}
$stmtA = "optimize table vicidial_inbound_group_agents;";
@@ -141,7 +185,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -150,7 +194,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
if (!$T)
{
$affected_rows = $dbhA->do($stmtA);
if(!$Q){print STDERR "\n|$affected_rows vicidial_campaign_agents call counts reset|\n";}
if(!$q){print STDERR "\n|$affected_rows vicidial_campaign_agents call counts reset|\n";}
}
$stmtA = "optimize table vicidial_campaign_agents;";
@@ -160,7 +204,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -171,7 +215,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -183,7 +227,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -195,7 +239,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -207,7 +251,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -219,7 +263,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -230,7 +274,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -242,7 +286,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -254,7 +298,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -266,7 +310,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -277,7 +321,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -288,7 +332,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -299,7 +343,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -310,7 +354,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -321,7 +365,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -332,7 +376,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -343,7 +387,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -354,7 +398,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
@@ -365,7 +409,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
if (!$q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
+42 -34
View File
@@ -32,11 +32,13 @@
# 80812-1204 - Added FTP grab options and summary email options
# 80829-2301 - Added multi-alt-phone entry insertion capability
# 90324-1038 - Added minicsv02 format
# 90401-1340 - Fixed quiet flag functionality
#
$secX = time();
$MT[0]='';
$Ealert='';
$force_quiet=0;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
@@ -149,39 +151,42 @@ if (length($ARGV[0])>1)
}
else
{
if ($args =~ /-debug/i)
if ($args =~ /-q/i)
{
$q=1;
$DB=0;
$DBX=0;
$force_quiet=1;
}
if ( ($args =~ /-debug/i) && ($force_quiet < 1) )
{
$DB=1;
print "\n----- DEBUGGING -----\n\n";
}
if ($args =~ /-debugX/i)
if ( ($args =~ /-debugX/i) && ($force_quiet < 1) )
{
$DBX=1;
print "\n----- SUPER-DUPER DEBUGGING -----\n\n";
}
else {$DBX=0;}
if ($args =~ /-q/i)
{
$q=1;
}
if ($args =~ /-t/i)
{
$T=1;
$TEST=1;
print "\n----- TESTING -----\n\n";
if ($q < 1) {print "\n----- TESTING -----\n\n";}
}
if ($args =~ /-forcegmt/i)
{
$forcegmt=1;
print "\n----- FORCE GMT -----\n\n";
if ($q < 1) {print "\n----- FORCE GMT -----\n\n";}
}
if ($args =~ /-forcelistid=/i)
{
@data_in = split(/-forcelistid=/,$args);
$forcelistid = $data_in[1];
$forcelistid =~ s/ .*//gi;
print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n";
if ($q < 1) {print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n";}
}
else
{$forcelistid = '';}
@@ -191,7 +196,7 @@ if (length($ARGV[0])>1)
@data_in = split(/-format=/,$args);
$format = $data_in[1];
$format =~ s/ .*//gi;
print "\n----- FORMAT OVERRIDE: $format -----\n\n";
if ($q < 1) {print "\n----- FORMAT OVERRIDE: $format -----\n\n";}
}
else
{$format = 'standard';}
@@ -201,7 +206,7 @@ if (length($ARGV[0])>1)
@data_in = split(/--forcephonecode=/,$args);
$forcephonecode = $data_in[1];
$forcephonecode =~ s/ .*//gi;
print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n";
if ($q < 1) {print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n";}
}
else
{$forcephonecode = '';}
@@ -209,34 +214,34 @@ if (length($ARGV[0])>1)
if ($args =~ /-duplicate-check/i)
{
$dupcheck=1;
print "\n----- DUPLICATE CHECK -----\n\n";
if ($q < 1) {print "\n----- DUPLICATE CHECK -----\n\n";}
}
if ($args =~ /-duplicate-campaign-check/i)
{
$dupcheckcamp=1;
print "\n----- DUPLICATE CAMPAIGN CHECK -----\n\n";
if ($q < 1) {print "\n----- DUPLICATE CAMPAIGN CHECK -----\n\n";}
}
if ($args =~ /-duplicate-system-check/i)
{
$dupchecksys=1;
print "\n----- DUPLICATE SYSTEM CHECK -----\n\n";
if ($q < 1) {print "\n----- DUPLICATE SYSTEM CHECK -----\n\n";}
}
if ($args =~ /-postal-code-gmt/i)
{
$postalgmt=1;
print "\n----- POSTAL CODE TIMEZONE -----\n\n";
if ($q < 1) {print "\n----- POSTAL CODE TIMEZONE -----\n\n";}
}
if ($args =~ /-ftp-pull/i)
{
$ftp_pull=1;
print "\n----- FTP LEAD FILE PULL -----\n\n";
if ($q < 1) {print "\n----- FTP LEAD FILE PULL -----\n\n";}
}
if ($args =~ /--ftp-dir=/i)
{
@data_in = split(/--ftp-dir=/,$args);
$ftp_dir = $data_in[1];
$ftp_dir =~ s/ .*//gi;
print "\n----- REMOTE FTP DIRECTORY: $ftp_dir -----\n\n";
if ($q < 1) {print "\n----- REMOTE FTP DIRECTORY: $ftp_dir -----\n\n";}
}
else
{$ftp_dir = '';}
@@ -247,7 +252,7 @@ if (length($ARGV[0])>1)
$email_list = $data_in[1];
$email_list =~ s/ .*//gi;
$email_list =~ s/:/,/gi;
print "\n----- EMAIL NOTIFICATION: $email_list -----\n\n";
if ($q < 1) {print "\n----- EMAIL NOTIFICATION: $email_list -----\n\n";}
}
else
{$email_list = '';}
@@ -258,7 +263,7 @@ if (length($ARGV[0])>1)
$email_sender = $data_in[1];
$email_sender =~ s/ .*//gi;
$email_sender =~ s/:/,/gi;
print "\n----- EMAIL NOTIFICATION SENDER: $email_sender -----\n\n";
if ($q < 1) {print "\n----- EMAIL NOTIFICATION SENDER: $email_sender -----\n\n";}
}
else
{$email_sender = 'vicidial@localhost';}
@@ -947,23 +952,26 @@ foreach(@FILES)
else
{
if ($dup_lead > 0)
{print "DUPLICATE: $phone_number|$list_id|$dup_lead_list|$a\n"; $f++;}
{if ($q < 1) {print "DUPLICATE: $phone_number|$list_id|$dup_lead_list|$a\n";} $f++;}
else
{print "BAD Home_Phone: $phone_number|$vendor_id|$a\n"; $e++;}
{if ($q < 1) {print "BAD Home_Phone: $phone_number|$vendor_id|$a\n";} $e++;}
}
$a++;
if ($a =~ /100$/i) {print STDERR "0 $a\r";}
if ($a =~ /200$/i) {print STDERR "+ $a\r";}
if ($a =~ /300$/i) {print STDERR "| $a\r";}
if ($a =~ /400$/i) {print STDERR "\\ $a\r";}
if ($a =~ /500$/i) {print STDERR "- $a\r";}
if ($a =~ /600$/i) {print STDERR "/ $a\r";}
if ($a =~ /700$/i) {print STDERR "| $a\r";}
if ($a =~ /800$/i) {print STDERR "+ $a\r";}
if ($a =~ /900$/i) {print STDERR "0 $a\r";}
if ($a =~ /000$/i) {print "$a|$b|$c|$d|$e|$f|$g|$phone_number|\n";}
if ($q < 1)
{
if ($a =~ /100$/i) {print STDERR "0 $a\r";}
if ($a =~ /200$/i) {print STDERR "+ $a\r";}
if ($a =~ /300$/i) {print STDERR "| $a\r";}
if ($a =~ /400$/i) {print STDERR "\\ $a\r";}
if ($a =~ /500$/i) {print STDERR "- $a\r";}
if ($a =~ /600$/i) {print STDERR "/ $a\r";}
if ($a =~ /700$/i) {print STDERR "| $a\r";}
if ($a =~ /800$/i) {print STDERR "+ $a\r";}
if ($a =~ /900$/i) {print STDERR "0 $a\r";}
if ($a =~ /000$/i) {print "$a|$b|$c|$d|$e|$f|$g|$phone_number|\n";}
}
}
@@ -996,7 +1004,7 @@ foreach(@FILES)
if ($f > 0)
{$Falert .= "DUPLICATES: $f\n";}
print "$Falert";
if ($q < 1) {print "$Falert";}
print Sout "$Falert";
$Ealert .= "$Falert";
@@ -1029,7 +1037,7 @@ if ($q < 1)
if ( (length($Ealert)>5) && (length($email_list) > 3) )
{
print "Sending email: $email_list\n";
if ($q < 1) {print "Sending email: $email_list\n";}
use MIME::QuotedPrint;
use MIME::Base64;
@@ -1043,7 +1051,7 @@ if ( (length($Ealert)>5) && (length($email_list) > 3) )
Message => "VICIDIAL LEAD FILE LOAD $pulldate0\n\n$Ealert\n"
);
sendmail(%mail) or die $mail::Sendmail::error;
print "ok. log says:\n", $mail::sendmail::log; ### print mail log for status
if ($q < 1) {print "ok. log says:\n", $mail::sendmail::log;} ### print mail log for status
}
exit;
+36 -28
View File
@@ -11,11 +11,13 @@
#
# CHANGES
# 90128-0319 - First build
# 90401-1347 - Fixed quiet flag
#
$secX = time();
$MT[0]='';
$Ealert='';
$force_quiet=0;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
@@ -120,27 +122,30 @@ if (length($ARGV[0])>1)
}
else
{
if ($args =~ /-debug/i)
if ($args =~ /-q/i)
{
$q=1;
$DB=0;
$DBX=0;
$force_quiet=1;
}
if ( ($args =~ /-debug/i) && ($force_quiet < 1) )
{
$DB=1;
print "\n----- DEBUGGING -----\n\n";
}
if ($args =~ /-debugX/i)
if ( ($args =~ /-debugX/i) && ($force_quiet < 1) )
{
$DBX=1;
print "\n----- SUPER-DUPER DEBUGGING -----\n\n";
}
else {$DBX=0;}
if ($args =~ /-q/i)
{
$q=1;
}
if ($args =~ /-t/i)
{
$T=1;
$TEST=1;
print "\n----- TESTING -----\n\n";
if ($q < 1) {print "\n----- TESTING -----\n\n";}
}
if ($args =~ /-format=/i)
@@ -148,7 +153,7 @@ if (length($ARGV[0])>1)
@data_in = split(/-format=/,$args);
$format = $data_in[1];
$format =~ s/ .*//gi;
print "\n----- FORMAT OVERRIDE: $format -----\n\n";
if ($q < 1) {print "\n----- FORMAT OVERRIDE: $format -----\n\n";}
}
else
{$format = 'standard';}
@@ -158,7 +163,7 @@ if (length($ARGV[0])>1)
@data_in = split(/-forcelistid=/,$args);
$forcelistid = $data_in[1];
$forcelistid =~ s/ .*//gi;
print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n";
if ($q < 1) {print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n";}
}
else
{$forcelistid = '';}
@@ -166,24 +171,24 @@ if (length($ARGV[0])>1)
if ($args =~ /-duplicate-system-check/i)
{
$dupchecksys=1;
print "\n----- DUPLICATE SYSTEM CHECK PHONE -----\n\n";
if ($q < 1) {print "\n----- DUPLICATE SYSTEM CHECK PHONE -----\n\n";}
}
if ($args =~ /-duplicate-system-vendor/i)
{
$dupcheckvend=1;
print "\n----- DUPLICATE SYSTEM CHECK VENDOR -----\n\n";
if ($q < 1) {print "\n----- DUPLICATE SYSTEM CHECK VENDOR -----\n\n";}
}
if ($args =~ /-ftp-pull/i)
{
$ftp_pull=1;
print "\n----- FTP LEAD FILE PULL -----\n\n";
if ($q < 1) {print "\n----- FTP LEAD FILE PULL -----\n\n";}
}
if ($args =~ /--ftp-dir=/i)
{
@data_in = split(/--ftp-dir=/,$args);
$ftp_dir = $data_in[1];
$ftp_dir =~ s/ .*//gi;
print "\n----- REMOTE FTP DIRECTORY: $ftp_dir -----\n\n";
if ($q < 1) {print "\n----- REMOTE FTP DIRECTORY: $ftp_dir -----\n\n";}
}
else
{$ftp_dir = '';}
@@ -194,7 +199,7 @@ if (length($ARGV[0])>1)
$email_list = $data_in[1];
$email_list =~ s/ .*//gi;
$email_list =~ s/:/,/gi;
print "\n----- EMAIL NOTIFICATION: $email_list -----\n\n";
if ($q < 1) {print "\n----- EMAIL NOTIFICATION: $email_list -----\n\n";}
}
else
{$email_list = '';}
@@ -205,7 +210,7 @@ if (length($ARGV[0])>1)
$email_sender = $data_in[1];
$email_sender =~ s/ .*//gi;
$email_sender =~ s/:/,/gi;
print "\n----- EMAIL NOTIFICATION SENDER: $email_sender -----\n\n";
if ($q < 1) {print "\n----- EMAIL NOTIFICATION SENDER: $email_sender -----\n\n";}
}
else
{$email_sender = 'vicidial@localhost';}
@@ -410,16 +415,19 @@ while ($sthBrowsC > $i)
$i++;
if ($i =~ /10$/i) {print STDERR "0 $i\r";}
if ($i =~ /20$/i) {print STDERR "+ $i\r";}
if ($i =~ /30$/i) {print STDERR "| $i\r";}
if ($i =~ /40$/i) {print STDERR "\\ $i\r";}
if ($i =~ /50$/i) {print STDERR "- $i\r";}
if ($i =~ /60$/i) {print STDERR "/ $i\r";}
if ($i =~ /70$/i) {print STDERR "| $i\r";}
if ($i =~ /80$/i) {print STDERR "+ $i\r";}
if ($i =~ /90$/i) {print STDERR "0 $i\r";}
if ($i =~ /00$/i) {print "$i|$b|$c|$d|$e|$f|$g|$crmid[$i]|$phone_number|\n";}
if ($q < 1)
{
if ($i =~ /10$/i) {print STDERR "0 $i\r";}
if ($i =~ /20$/i) {print STDERR "+ $i\r";}
if ($i =~ /30$/i) {print STDERR "| $i\r";}
if ($i =~ /40$/i) {print STDERR "\\ $i\r";}
if ($i =~ /50$/i) {print STDERR "- $i\r";}
if ($i =~ /60$/i) {print STDERR "/ $i\r";}
if ($i =~ /70$/i) {print STDERR "| $i\r";}
if ($i =~ /80$/i) {print STDERR "+ $i\r";}
if ($i =~ /90$/i) {print STDERR "0 $i\r";}
if ($i =~ /00$/i) {print "$i|$b|$c|$d|$e|$f|$g|$crmid[$i]|$phone_number|\n";}
}
}
@@ -441,7 +449,7 @@ while ($sthBrowsC > $i)
if ($f > 0)
{$Falert .= "PHONE DUPLICATES: $f\n";}
print "$Falert";
if ($q < 1) {print "$Falert";}
print Sout "$Falert";
$Ealert .= "$Falert";
@@ -470,7 +478,7 @@ if ($q < 1)
if ( (length($Ealert)>5) && (length($email_list) > 3) )
{
print "Sending email: $email_list\n";
if ($q < 1) {print "Sending email: $email_list\n";}
use MIME::QuotedPrint;
use MIME::Base64;
@@ -484,7 +492,7 @@ if ( (length($Ealert)>5) && (length($email_list) > 3) )
Message => "VTIGER ACCOUNT FILE LOAD $pulldate0\n\n$Ealert\n"
);
sendmail(%mail) or die $mail::Sendmail::error;
print "ok. log says:\n", $mail::sendmail::log; ### print mail log for status
if ($q < 1) {print "ok. log says:\n", $mail::sendmail::log;} ### print mail log for status
}
exit;
+2 -2
View File
@@ -8,7 +8,7 @@ Copyright
This is version 2 of the Affero General Public License. It gives each licensee
permission to distribute the Program or a work based on the Program (as defined
in version 1 of the Affero GPL) under the GNU Affero General Public License,
version 3 or any later version.
version 2 or any later version.
This license is a modified version of the GNU General Public License copyright
(C) 1989, 1991 Free Software Foundation, Inc. made with their permission.
@@ -246,7 +246,7 @@ specify a version number of this License, you may choose any version ever
published by Affero, Inc.
You may also choose to redistribute modified versions of this program under any
version of the Free Software Foundation's GNU General Public License version 3
version of the Free Software Foundation's GNU General Public License version 2
or higher, so long as that version of the GNU GPL includes terms and conditions
substantially equivalent to those of this license.
10. If you wish to incorporate parts of the Program into other free programs
+1
View File
@@ -6,6 +6,7 @@ INSERT INTO phones (extension, dialplan_number, voicemail_id, phone_ip, computer
INSERT INTO phones (extension, dialplan_number, voicemail_id, phone_ip, computer_ip, server_ip, login, pass, status, active, phone_type, fullname, company, protocol) values('callin','8300','8300','10.10.10.15','10.10.10.15','10.10.10.15','callin','test', 'ACTIVE','Y','Dial-in agent phone','Dial-in Agent Phone','TEST','EXTERNAL');
INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,load_leads,campaign_detail,ast_admin_access,modify_users) values('6666','1234','Admin','9','ADMIN','1','1','1','1');
INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,active) values('VDAD','donotedit','Outbound Auto Dial','1','ADMIN','N');
INSERT INTO conferences values('8600001','10.10.10.15','');
INSERT INTO conferences values('8600002','10.10.10.15','');
+2
View File
@@ -24,6 +24,8 @@ if (isset($_GET["end_query_time"])) {$end_query_time=$_GET["end_query_time"];
elseif (isset($_POST["end_query_time"])) {$end_query_time=$_POST["end_query_time"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}