Added fixed-as400 option to the AST_VD_sales_export.pl script
changed AST_timeonVDADall monitor links to use 0 prefix instead of 6 other small changes git-svn-id: svn://192.168.202.10@1028 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
|
||||
#exten => _99909*.,3,Hangup
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 70828-0924 - First Build
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# AST_VDlist_summary_export.pl version: 2.0.5
|
||||
#
|
||||
# This script is designed to gather stats for the lists and write to static files
|
||||
# this script should be run from the web server
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 81214-0001 - First version
|
||||
#
|
||||
|
||||
$txt = '.txt';
|
||||
$US = '_';
|
||||
$MT[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 " [--debug] = debugging messages\n";
|
||||
print " [--debugX] = Super debugging messages\n";
|
||||
print "\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($args =~ /--debug/i)
|
||||
{
|
||||
$DB=1;
|
||||
print "\n----- DEBUG MODE -----\n\n";
|
||||
}
|
||||
if ($args =~ /--debugX/i)
|
||||
{
|
||||
$DBX=1;
|
||||
print "\n----- SUPER DEBUG MODE -----\n\n";
|
||||
}
|
||||
if ($args =~ /-q/i)
|
||||
{
|
||||
$q=1; $Q=1;
|
||||
}
|
||||
if ($args =~ /--test/i)
|
||||
{
|
||||
$T=1; $TEST=1;
|
||||
print "\n----- TESTING -----\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "no command line options set, using defaults.\n";
|
||||
}
|
||||
### end parsing run-time options ###
|
||||
|
||||
|
||||
$secX = time();
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
|
||||
# # rerun override - Use this to override the day manually
|
||||
# $year='2007';
|
||||
# $mon='5';
|
||||
# $mday='18';
|
||||
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
$timestamp = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$filedate = "$year$mon$mday";
|
||||
$shipdate = "$year-$mon-$mday";
|
||||
$datestamp = "$year/$mon/$mday $hour:$min";
|
||||
|
||||
# default path to astguiclient configuration file:
|
||||
$PATHconf = '/etc/astguiclient.conf';
|
||||
|
||||
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
||||
@conf = <conf>;
|
||||
close(conf);
|
||||
$i=0;
|
||||
foreach(@conf)
|
||||
{
|
||||
$line = $conf[$i];
|
||||
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
|
||||
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
|
||||
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
|
||||
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
|
||||
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
|
||||
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
|
||||
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
|
||||
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
|
||||
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
|
||||
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
|
||||
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
|
||||
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
|
||||
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
|
||||
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) )
|
||||
{$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) )
|
||||
{$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) )
|
||||
{$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) )
|
||||
{$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) )
|
||||
{$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;}
|
||||
$i++;
|
||||
}
|
||||
|
||||
# Customized Variables
|
||||
$server_ip = $VARserver_ip; # Asterisk server IP
|
||||
|
||||
if ($output_format =~ /^pipe-standard$/)
|
||||
{$DLT = '|'; $txt='.txt'; print "---- pipe-standard ----\n";}
|
||||
if ($output_format =~ /^csv-standard$/)
|
||||
{$DLT = "','"; $txt='.csv'; print "---- csv-standard ----\n";}
|
||||
if ($output_format =~ /^tab-standard$/)
|
||||
{$DLT = "\t"; $txt='.txt'; print "---- tab-standard ----\n";}
|
||||
if ($output_format =~ /^pipe-triplep$/)
|
||||
{$DLT = ''; $txt='.txt'; print "---- pipe-triplep ----\n";}
|
||||
if ($output_format =~ /^pipe-vici$/)
|
||||
{$DLT = '|'; $txt='.txt'; print "---- pipe-vici ----\n";}
|
||||
if ($output_format =~ /^html-rec$/)
|
||||
{$DLT = ' '; $txt='.html'; print "---- html-rec ----\n";}
|
||||
|
||||
if (!$Q)
|
||||
{
|
||||
print "\n\n\n\n\n\n\n\n\n\n\n\n-- AST_VDlist_summary_export.pl --\n\n";
|
||||
print "This program is designed to gather stats on lead lists and post them to a file. \n";
|
||||
print "\n";
|
||||
print "$timestamp LIST STATUS SUMMARY REPORT\n";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
$outfile = "LIST_REPORT_$filedate$txt";
|
||||
|
||||
### open the X out file for writing ###
|
||||
open(out, ">$PATHweb/vicidial/server_reports/$outfile")
|
||||
|| die "Can't open $outfile: $!\n";
|
||||
|
||||
print out "$timestamp LIST STATUS SUMMARY REPORT\n\n";
|
||||
|
||||
|
||||
if (!$VARDB_port) {$VARDB_port='3306';}
|
||||
|
||||
|
||||
use DBI;
|
||||
|
||||
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
$TOTAL_LEADS=0;
|
||||
|
||||
|
||||
###########################################################################
|
||||
########### CURRENT DAY SALES GATHERING outbound-only: vicidial_log ######
|
||||
###########################################################################
|
||||
$stmtA = "select count(*),list_id,status from vicidial_list where list_id>99 group by list_id,status order by list_id,status;";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$i=0;
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$count[$i] = $aryA[0];
|
||||
$list_id[$i] = $aryA[1];
|
||||
$status[$i] = $aryA[2];
|
||||
$i++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$i=0;
|
||||
$k=0;
|
||||
$m=0;
|
||||
$previous_list=$lists_list_id[0];
|
||||
foreach(@list_id)
|
||||
{
|
||||
$stmtA = "select status_name from vicidial_statuses where status='$status[$i]';";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$status_name[$i] = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
if (length($status_name[$i])<1)
|
||||
{
|
||||
$stmtA = "select status_name from vicidial_campaign_statuses where status='$status[$i]';";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$status_name[$i] = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$status[$i] = sprintf("%-7s", $status[$i]);
|
||||
$status_name[$i] = sprintf("%-20s", $status_name[$i]); while (length($status_name[$i])>20) {$status_name[$i] =~ s/.$//gi;}
|
||||
$count[$i] = sprintf("%7s", $count[$i]);
|
||||
if ( ($list_id[$i] =~ /$previous_list/) && (length($list_id[$i]) == length($previous_list)) )
|
||||
{
|
||||
if ($lists_line_count[$k] == 1) {$p='List Name ';}
|
||||
if ($lists_line_count[$k] == 2) {$p='Campaign ID ';}
|
||||
if ($lists_line_count[$k] == 3) {$p='Campaign Name ';}
|
||||
if ($lists_line_count[$k] == 4) {$p=' TOTAL LEADS IN LIST ';}
|
||||
if ($lists_line_count[$k] > 4) {$p=' ';}
|
||||
$lists_line_output[$k] .= "$p $status[$i] $status_name[$i] $count[$i]\n";
|
||||
$lists_line_count[$k]++;
|
||||
$lists_line_tally[$k] = ($lists_line_tally[$k] + $count[$i]);
|
||||
$lists_list_id[$k] = $list_id[$i];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($lists_line_count[$k] <= 1) {$lists_line_output[$k] .= "List Name \n";}
|
||||
if ($lists_line_count[$k] <= 2) {$lists_line_output[$k] .= "Campaign ID \n";}
|
||||
if ($lists_line_count[$k] <= 3) {$lists_line_output[$k] .= "Campaign Name \n";}
|
||||
if ($lists_line_count[$k] <= 4) {$lists_line_output[$k] .= " TOTAL LEADS IN LIST \n";}
|
||||
$k++;
|
||||
$lists_line_output[$k] .= "List ID $status[$i] $status_name[$i] $count[$i]\n";
|
||||
$lists_line_count[$k]++;
|
||||
$lists_line_tally[$k] = ($lists_line_tally[$k] + $count[$i]);
|
||||
$lists_list_id[$k] = $list_id[$i];
|
||||
$previous_list=$list_id[$i];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($lists_line_count[$k] <= 1) {$lists_line_output[$k] .= "List Name \n";}
|
||||
if ($lists_line_count[$k] <= 2) {$lists_line_output[$k] .= "Campaign ID \n";}
|
||||
if ($lists_line_count[$k] <= 3) {$lists_line_output[$k] .= "Campaign Name \n";}
|
||||
if ($lists_line_count[$k] <= 4) {$lists_line_output[$k] .= " TOTAL LEADS IN LIST \n";}
|
||||
|
||||
$i=0;
|
||||
foreach(@lists_list_id)
|
||||
{
|
||||
if (length($lists_list_id[$i])>2)
|
||||
{
|
||||
$stmtA = "select list_name,vicidial_lists.campaign_id,campaign_name from vicidial_lists,vicidial_campaigns where list_id='$lists_list_id[$i]' and vicidial_lists.campaign_id=vicidial_campaigns.campaign_id;";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$lists_list_name[$i] = sprintf("%-30s", $aryA[0]); while (length($lists_list_name[$i])>30) {$lists_list_name[$i] =~ s/.$//gi;}
|
||||
$lists_campaign_id[$i] = sprintf("%-28s", $aryA[1]); while (length($lists_campaign_id[$i])>28) {$lists_campaign_id[$i] =~ s/.$//gi;}
|
||||
$lists_campaign_name[$i] = sprintf("%-26s", $aryA[2]); while (length($lists_campaign_name[$i])>26) {$lists_campaign_name[$i] =~ s/.$//gi;}
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$lists_list_id[$i] = sprintf("%-15s", $lists_list_id[$i]); while (length($lists_list_id[$i])>15) {$lists_list_id[$i] =~ s/.$//gi;}
|
||||
$lists_list_id[$i] = "$lists_list_id[$i] ($i of $k)";
|
||||
$lists_list_id[$i] = sprintf("%-32s", $lists_list_id[$i]); while (length($lists_list_id[$i])>32) {$lists_list_id[$i] =~ s/.$//gi;}
|
||||
$lists_line_tally[$i] = sprintf("%-18s", $lists_line_tally[$i]); while (length($lists_line_tally[$i])>18) {$lists_line_tally[$i] =~ s/.$//gi;}
|
||||
$TOTAL_LEADS = ($TOTAL_LEADS + $lists_line_tally[$i]);
|
||||
|
||||
$lists_line_output[$i] =~ s/List ID/List ID: $lists_list_id[$i]/gi;
|
||||
$lists_line_output[$i] =~ s/List Name/List Name: $lists_list_name[$i]/gi;
|
||||
$lists_line_output[$i] =~ s/Campaign ID/Campaign ID: $lists_campaign_id[$i]/gi;
|
||||
$lists_line_output[$i] =~ s/Campaign Name/Campaign Name: $lists_campaign_name[$i]/gi;
|
||||
$lists_line_output[$i] =~ s/TOTAL LEADS IN LIST/TOTAL LEADS IN LIST: $lists_line_tally[$i]/gi;
|
||||
|
||||
print "\n";
|
||||
print " LIST INFORMATION STATUS DESCRIPTION COUNT\n";
|
||||
print "-------------------------------------------------------------------------------\n";
|
||||
print "$lists_line_output[$i]";
|
||||
|
||||
print out "\n";
|
||||
print out " LIST INFORMATION STATUS DESCRIPTION COUNT\n";
|
||||
print out "--------------------------------------------------------------------------------\n";
|
||||
print out "$lists_line_output[$i]";
|
||||
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($ftp_transfer > 0)
|
||||
{
|
||||
use Net::FTP;
|
||||
|
||||
if (!$Q) {print "Sending File Over FTP: $outfile\n";}
|
||||
$ftp = Net::FTP->new("$VARREPORT_host", Port => $VARREPORT_port);
|
||||
$ftp->login("$VARREPORT_user","$VARREPORT_pass");
|
||||
$ftp->cwd("$VARREPORT_dir");
|
||||
$ftp->put("$PATHweb/vicidial/server_reports/$outfile", "$outfile");
|
||||
$ftp->quit;
|
||||
}
|
||||
|
||||
### calculate time to run script ###
|
||||
$secY = time();
|
||||
$secZ = ($secY - $secX);
|
||||
$secZm = ($secZ /60);
|
||||
|
||||
print "\n";
|
||||
print "-------------------------------------------------------------------------------------\n";
|
||||
print "LIST REPORT FOR $timestamp: $outfile\n";
|
||||
print "TOTAL LEADS IN SYSTEM: $TOTAL_LEADS\n";
|
||||
print "script execution time in seconds: $secZ minutes: $secZm\n";
|
||||
|
||||
print out"\n";
|
||||
print out "-------------------------------------------------------------------------------------\n";
|
||||
print out "LIST REPORT FOR $timestamp: $outfile\n";
|
||||
print out "TOTAL LEADS IN SYSTEM: $TOTAL_LEADS\n";
|
||||
|
||||
close(out);
|
||||
|
||||
exit;
|
||||
@@ -5,7 +5,7 @@
|
||||
# This script is designed to gather sales for a VICIDIAL Outbound-only campaign and
|
||||
# post them to a directory
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 61219-1118 - First version
|
||||
@@ -13,7 +13,8 @@
|
||||
# 70611-1154 - Added CLI options
|
||||
# 70709-1411 - Added FTP transfer option
|
||||
# 71005-0054 - Altered script to use astguiclient.conf for settings
|
||||
#
|
||||
# 90105-1155 - Added AS400 export formats and changed around date override
|
||||
#
|
||||
|
||||
$txt = '.txt';
|
||||
$US = '_';
|
||||
@@ -31,76 +32,169 @@ $campaign = 'TESTCAMP';
|
||||
$sale_statuses = 'SALE-UPSELL';
|
||||
$output_format = 'pipe-standard';
|
||||
|
||||
|
||||
$secX = time();
|
||||
$time = $secX;
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
$timestamp = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$filedate = "$year$mon$mday";
|
||||
$ABIfiledate = "$mon-$mday-$year$us$hour$min$sec";
|
||||
$shipdate = "$year-$mon-$mday";
|
||||
$datestamp = "$year/$mon/$mday $hour:$min";
|
||||
|
||||
|
||||
use Time::Local;
|
||||
|
||||
### find epoch of 2AM today
|
||||
$TWOAMsec = ( ($secX - ($sec + ($min * 60) + ($hour * 3600) ) ) + 7200);
|
||||
### find epoch of 2AM yesterday
|
||||
$TWOAMsecY = ($TWOAMsec - 86400);
|
||||
|
||||
($Tsec,$Tmin,$Thour,$Tmday,$Tmon,$Tyear,$Twday,$Tyday,$Tisdst) = localtime($TWOAMsecY);
|
||||
$Tyear = ($Tyear + 1900);
|
||||
$Tmon++;
|
||||
if ($Tmon < 10) {$Tmon = "0$Tmon";}
|
||||
if ($Tmday < 10) {$Tmday = "0$Tmday";}
|
||||
if ($Thour < 10) {$Thour = "0$Thour";}
|
||||
if ($Tmin < 10) {$Tmin = "0$Tmin";}
|
||||
if ($Tsec < 10) {$Tsec = "0$Tsec";}
|
||||
|
||||
|
||||
### begin parsing run-time options ###
|
||||
if (length($ARGV[0])>1)
|
||||
{
|
||||
{
|
||||
$i=0;
|
||||
while ($#ARGV >= $i)
|
||||
{
|
||||
$args = "$args $ARGV[$i]";
|
||||
$i++;
|
||||
}
|
||||
{
|
||||
$args = "$args $ARGV[$i]";
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($args =~ /--help/i)
|
||||
{
|
||||
print "allowed run time options:\n";
|
||||
print " [--campaign=XXX] = Campaign that sales will be pulled from\n";
|
||||
print " [--sale-statuses=XXX-XXY] = Statuses that are deemed to be \"Sales\". Default SALE\n";
|
||||
print " NOTE: To include all statuses in the export, use \"--sale-statuses=---ALL---\"\n";
|
||||
print " [--output-format=XXX] = Format of file. Default \"pipe-standard\"\n";
|
||||
print " [--with-inbound=XXX-XXY] = include the following inbound groups\n";
|
||||
print " [--ftp-transfer] = Send results file by FTP to another server\n";
|
||||
print " [-q] = quiet\n";
|
||||
print " [-t] = test\n";
|
||||
print " [--debug] = debugging messages\n";
|
||||
print " [--debugX] = Super debugging messages\n";
|
||||
print "\n";
|
||||
{
|
||||
print "allowed run time options:\n";
|
||||
print " [--date=YYYY-MM-DD] = date override\n";
|
||||
print " [--filename=XXX] = Name to be used for file\n";
|
||||
print " [--campaign=XXX] = Campaign that sales will be pulled from\n";
|
||||
print " [--sale-statuses=XXX-XXY] = Statuses that are deemed to be \"Sales\". Default SALE\n";
|
||||
print " NOTE: To include all statuses in the export, use \"--sale-statuses=---ALL---\"\n";
|
||||
print " [--output-format=XXX] = Format of file. Default \"pipe-standard\"\n";
|
||||
print " [--with-inbound=XXX-XXY] = include the following inbound groups\n";
|
||||
print " [--ftp-transfer] = Send results file by FTP to another server\n";
|
||||
print " [-q] = quiet\n";
|
||||
print " [-t] = test\n";
|
||||
print " [--debug] = debugging messages\n";
|
||||
print " [--debugX] = Super debugging messages\n";
|
||||
print "\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if ($args =~ /--debug/i)
|
||||
{
|
||||
$DB=1;
|
||||
print "\n----- DEBUG MODE -----\n\n";
|
||||
}
|
||||
{
|
||||
$DB=1;
|
||||
print "\n----- DEBUG MODE -----\n\n";
|
||||
}
|
||||
if ($args =~ /--debugX/i)
|
||||
{
|
||||
$DBX=1;
|
||||
print "\n----- SUPER DEBUG MODE -----\n\n";
|
||||
}
|
||||
{
|
||||
$DBX=1;
|
||||
print "\n----- SUPER DEBUG MODE -----\n\n";
|
||||
}
|
||||
if ($args =~ /-q/i)
|
||||
{
|
||||
$q=1; $Q=1;
|
||||
}
|
||||
{
|
||||
$q=1; $Q=1;
|
||||
}
|
||||
|
||||
if ($args =~ /--date=/i)
|
||||
{
|
||||
@data_in = split(/--date=/,$args);
|
||||
$shipdate = $data_in[1];
|
||||
$shipdate =~ s/ .*//gi;
|
||||
if ($shipdate =~ /today/)
|
||||
{
|
||||
$shipdate="$year-$mon-$mday";
|
||||
$time = $TWOAMsec;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($shipdate =~ /yesterday/)
|
||||
{
|
||||
$shipdate="$Tyear-$Tmon-$Tmday";
|
||||
$year = $Tyear;
|
||||
$mon = $Tmon;
|
||||
$mday = $Tmday;
|
||||
$time=$TWOAMsecY;
|
||||
}
|
||||
else
|
||||
{
|
||||
@cli_date = split("-",$shipdate);
|
||||
$year = $cli_date[0];
|
||||
$mon = $cli_date[1];
|
||||
$mday = $cli_date[2];
|
||||
$cli_date[1] = ($cli_date[1] - 1);
|
||||
$time = timelocal(0,0,2,$cli_date[2],$cli_date[1],$cli_date[0]);
|
||||
}
|
||||
}
|
||||
print "\n----- DATE OVERRIDE: $shipdate -----\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$time=$TWOAMsec;
|
||||
}
|
||||
|
||||
|
||||
if ($args =~ /--campaign=/i)
|
||||
{
|
||||
# print "\n|$ARGS|\n\n";
|
||||
@data_in = split(/--campaign=/,$args);
|
||||
{
|
||||
# print "\n|$ARGS|\n\n";
|
||||
@data_in = split(/--campaign=/,$args);
|
||||
$campaign = $data_in[1];
|
||||
$campaign =~ s/ .*$//gi;
|
||||
}
|
||||
$campaignSQL = $campaign;
|
||||
if ($campaignSQL =~ /-/)
|
||||
{
|
||||
$campaignSQL =~ s/-/','/gi;
|
||||
}
|
||||
$campaignSQL = "'$campaignSQL'";
|
||||
}
|
||||
if ($args =~ /--filename=/i)
|
||||
{
|
||||
# print "\n|$ARGS|\n\n";
|
||||
@data_in = split(/--filename=/,$args);
|
||||
$filename = $data_in[1];
|
||||
$filename =~ s/ .*$//gi;
|
||||
$filename =~ s/YYYY/$year/gi;
|
||||
$filename =~ s/MM/$mon/gi;
|
||||
$filename =~ s/DD/$mday/gi;
|
||||
$filename_override=1;
|
||||
}
|
||||
if ($args =~ /--sale-statuses=/i)
|
||||
{
|
||||
@data_in = split(/--sale-statuses=/,$args);
|
||||
$sale_statuses = $data_in[1];
|
||||
$sale_statuses =~ s/ .*$//gi;
|
||||
if ($sale_statuses =~ /---ALL---/)
|
||||
{if (!$Q) {print "\n----- EXPORT ALL STATUSES -----\n\n";} }
|
||||
}
|
||||
{
|
||||
@data_in = split(/--sale-statuses=/,$args);
|
||||
$sale_statuses = $data_in[1];
|
||||
$sale_statuses =~ s/ .*$//gi;
|
||||
if ($sale_statuses =~ /---ALL---/)
|
||||
{if (!$Q) {print "\n----- EXPORT ALL STATUSES -----\n\n";} }
|
||||
}
|
||||
if ($args =~ /--output-format=/i)
|
||||
{
|
||||
@data_in = split(/--output-format=/,$args);
|
||||
$output_format = $data_in[1];
|
||||
$output_format =~ s/ .*$//gi;
|
||||
}
|
||||
{
|
||||
@data_in = split(/--output-format=/,$args);
|
||||
$output_format = $data_in[1];
|
||||
$output_format =~ s/ .*$//gi;
|
||||
}
|
||||
if ($args =~ /--with-inbound=/i)
|
||||
{
|
||||
@data_in = split(/--with-inbound=/,$args);
|
||||
$with_inbound = $data_in[1];
|
||||
$with_inbound =~ s/ .*$//gi;
|
||||
}
|
||||
{
|
||||
@data_in = split(/--with-inbound=/,$args);
|
||||
$with_inbound = $data_in[1];
|
||||
$with_inbound =~ s/ .*$//gi;
|
||||
}
|
||||
if ($args =~ /-ftp-transfer/i)
|
||||
{
|
||||
if (!$Q)
|
||||
@@ -108,40 +202,18 @@ if (length($ARGV[0])>1)
|
||||
$ftp_transfer=1;
|
||||
}
|
||||
if ($args =~ /--test/i)
|
||||
{
|
||||
$T=1; $TEST=1;
|
||||
print "\n----- TESTING -----\n\n";
|
||||
{
|
||||
$T=1; $TEST=1;
|
||||
print "\n----- TESTING -----\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "no command line options set, using defaults.\n";
|
||||
}
|
||||
### end parsing run-time options ###
|
||||
|
||||
|
||||
$secX = time();
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
|
||||
# # rerun override - Use this to override the day manually
|
||||
# $year='2007';
|
||||
# $mon='5';
|
||||
# $mday='18';
|
||||
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
$timestamp = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$filedate = "$year$mon$mday";
|
||||
$ABIfiledate = "$mon-$mday-$year$us$hour$min$sec";
|
||||
$shipdate = "$year-$mon-$mday";
|
||||
$datestamp = "$year/$mon/$mday $hour:$min";
|
||||
|
||||
# default path to astguiclient configuration file:
|
||||
$PATHconf = '/etc/astguiclient.conf';
|
||||
|
||||
@@ -205,6 +277,8 @@ if ($output_format =~ /^pipe-vici$/)
|
||||
{$DLT = '|'; $txt='.txt'; print "---- pipe-vici ----\n";}
|
||||
if ($output_format =~ /^html-rec$/)
|
||||
{$DLT = ' '; $txt='.html'; print "---- html-rec ----\n";}
|
||||
if ($output_format =~ /^fixed-as400$/)
|
||||
{$DLT = ''; $txt='.txt'; print "---- fixed-as400 ----\n";}
|
||||
|
||||
if ($sale_statuses =~ /---ALL---/)
|
||||
{
|
||||
@@ -230,7 +304,7 @@ if (!$Q)
|
||||
print "\n\n\n\n\n\n\n\n\n\n\n\n-- AST_VDsales_export.pl --\n\n";
|
||||
print "This program is designed to gather sales from a VICIDIAL outbound-only campaign and post them to a file. \n";
|
||||
print "\n";
|
||||
print "Campaign: $campaign\n";
|
||||
print "Campaign: $campaign $campaignSQL\n";
|
||||
print "Sale Statuses: $sale_statuses $sale_statusesSQL\n";
|
||||
print "Output Format: $output_format\n";
|
||||
print "With Inbound: $with_inbound $with_inboundSQL\n";
|
||||
@@ -238,6 +312,7 @@ if (!$Q)
|
||||
}
|
||||
|
||||
$outfile = "$campaign$US$filedate$US$sale_statuses$txt";
|
||||
if ($filename_override > 0) {$outfile = $filename;}
|
||||
|
||||
### open the X out file for writing ###
|
||||
open(out, ">$PATHweb/vicidial/server_reports/$outfile")
|
||||
@@ -260,7 +335,7 @@ $TOTAL_SALES=0;
|
||||
###########################################################################
|
||||
########### CURRENT DAY SALES GATHERING outbound-only: vicidial_log ######
|
||||
###########################################################################
|
||||
$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id from vicidial_list,vicidial_log,vicidial_users where campaign_id='$campaign' $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user;";
|
||||
$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time from vicidial_list,vicidial_log,vicidial_users where campaign_id IN($campaignSQL) $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user;";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -288,6 +363,9 @@ while ($sthArows > $rec_count)
|
||||
$vendor_id = $aryA[16];
|
||||
$source_id = $aryA[17];
|
||||
$list_id = $aryA[18];
|
||||
$title = $aryA[19];
|
||||
$address3 = $aryA[20];
|
||||
$last_local_call_time = $aryA[21];
|
||||
|
||||
&select_format_loop;
|
||||
|
||||
@@ -300,7 +378,7 @@ if (length($with_inboundSQL)>3)
|
||||
###########################################################################
|
||||
########### CURRENT DAY SALES GATHERING inbound-only: vicidial_closer_log ######
|
||||
###########################################################################
|
||||
$stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user;";
|
||||
$stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user;";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -329,6 +407,9 @@ if (length($with_inboundSQL)>3)
|
||||
$source_id = $aryA[17];
|
||||
$list_id = $aryA[18];
|
||||
$campaign_id = $aryA[19];
|
||||
$title = $aryA[20];
|
||||
$address3 = $aryA[21];
|
||||
$last_local_call_time = $aryA[22];
|
||||
|
||||
$user = '';
|
||||
$agent_name='';
|
||||
@@ -374,7 +455,7 @@ $secY = time();
|
||||
$secZ = ($secY - $secX);
|
||||
$secZm = ($secZ /60);
|
||||
|
||||
if (!$Q) {print "SALES EXPORT FOR $timestamp: $outfile\n";}
|
||||
if (!$Q) {print "SALES EXPORT FOR $shipdate: $outfile\n";}
|
||||
if (!$Q) {print "TOTAL SALES: $TOTAL_SALES\n";}
|
||||
if (!$Q) {print "script execution time in seconds: $secZ minutes: $secZm\n";}
|
||||
|
||||
@@ -483,6 +564,53 @@ if ($output_format =~ /^html-rec$/)
|
||||
$str = "$user|$agent_name|$closer|$closer_name|$call_date|$status|$first_name|$last_name|$phone_number|$address1|$address2|$city|$state|$postal_code|$comments|$security|$email|$vendor_id|$source_id|$lead_id|$list_id|$campaign|$campaign_id|<a href=\"$ivr_location\">$ivr_id</a>|\n";
|
||||
}
|
||||
|
||||
if ($output_format =~ /^fixed-as400$/)
|
||||
{
|
||||
# 16884259 MRS. JEAN BROWN RISALPUR BROMSBERROW HEATYH LEDBURY HEREFORDSHIRE ENGLAND HR8 1PQ 01531650052 1209200809:52NI 3205UK
|
||||
$vendor_id = sprintf("%-10s",$vendor_id);
|
||||
$title = sprintf("%-10s",$title);
|
||||
$first_name = sprintf("%-15s",$first_name);
|
||||
$last_name = sprintf("%-20s",$last_name);
|
||||
$address1 = sprintf("%-30s",$address1);
|
||||
$address2 = sprintf("%-30s",$address2);
|
||||
$address3 = sprintf("%-30s",$address3);
|
||||
$city = sprintf("%-50s",$city);
|
||||
$postal_code = sprintf("%-9s",$postal_code);
|
||||
$phone_number = sprintf("%-20s",$phone_number);
|
||||
@dtsplit = split(" ",$last_local_call_time);
|
||||
@datesplit = split("-",$dtsplit[0]);
|
||||
$timesplit = substr($dtsplit[1], 0, 5);
|
||||
$formatted_date = "$datesplit[1]$datesplit[2]$datesplit[0]$timesplit";
|
||||
$user = sprintf("%-4s",$user);
|
||||
if ($status =~ /^NA$/) {$status = 'N';}
|
||||
if ($status =~ /^DROP$/) {$status = 'N';}
|
||||
if ($status =~ /^SALE$/) {$status = 'AP';}
|
||||
if ($status =~ /^A6$/) {$status = 'A6';}
|
||||
if ($status =~ /^DC$/) {$status = 'D';}
|
||||
if ($status =~ /^DIED$/) {$status = 'DD';}
|
||||
if ($status =~ /^COMP$/) {$status = 'DD';}
|
||||
if ($status =~ /^DEC$/) {$status = 'DD';}
|
||||
if ($status =~ /^ERI$/) {$status = 'DD';}
|
||||
if ($status =~ /^SP$/) {$status = 'DD';}
|
||||
if ($status =~ /^WRON$/) {$status = 'DD';}
|
||||
if ($status =~ /^HBED$/) {$status = 'DD';}
|
||||
if ($status =~ /^CALLBK$/) {$status = 'A6';}
|
||||
if ($status =~ /^HAP1$/) {$status = 'NI';}
|
||||
if ($status =~ /^HAP2$/) {$status = 'NI';}
|
||||
if ($status =~ /^NI$/) {$status = 'NI';}
|
||||
# DNC
|
||||
# DNCL
|
||||
# N
|
||||
# B
|
||||
# A
|
||||
# AA
|
||||
$status = sprintf("%-16s",$status);
|
||||
$user =~ s/VDAD/ /gi;
|
||||
$UK = 'UK';
|
||||
|
||||
$str = "$vendor_id$title$first_name$last_name$address1$address2$address3$city$postal_code$phone_number$formatted_date$status$user$UK\r\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
print out "$str";
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# VICIDIAL_fix_status_mismatch.pl version 2.0.5
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# resets the status in vicidial_list for leads marked in status NOUSE
|
||||
# Very useful if you manually mess up the list statuses with a SQL query
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 80318-0112 - first build
|
||||
#
|
||||
|
||||
$secX = time();
|
||||
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
$pulldate0 = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$inSD = $pulldate0;
|
||||
$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec );
|
||||
|
||||
|
||||
|
||||
# default path to astguiclient configuration file:
|
||||
$PATHconf = '/etc/astguiclient.conf';
|
||||
|
||||
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
||||
@conf = <conf>;
|
||||
close(conf);
|
||||
$i=0;
|
||||
foreach(@conf)
|
||||
{
|
||||
$line = $conf[$i];
|
||||
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
|
||||
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
|
||||
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
|
||||
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
|
||||
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
|
||||
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
|
||||
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
|
||||
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
|
||||
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
|
||||
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
|
||||
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
|
||||
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
|
||||
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
|
||||
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
|
||||
$i++;
|
||||
}
|
||||
|
||||
# Customized Variables
|
||||
$server_ip = $VARserver_ip; # Asterisk server IP
|
||||
|
||||
if (!$VARDB_port) {$VARDB_port='3306';}
|
||||
|
||||
use DBI;
|
||||
|
||||
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
$DB=1;
|
||||
|
||||
$liveupdate=0;
|
||||
|
||||
if (!$VDHLOGfile) {$VDHLOGfile = "$PATHlogs/dupleads.$year-$mon-$mday";}
|
||||
|
||||
print "\n\n\n\n\n\n\n\n\n\n\n\n-- VICIDIAL_fix_status_mismatch.pl --\n\n";
|
||||
print "This program is designed to scan all leads marked A4 and set them to their proper status according to the logs. \n\n";
|
||||
|
||||
|
||||
$stmtA = "select distinct lead_id,status from vicidial_closer_log where status IN('A1','A2','A3','A4') and call_date > '2008-03-01 01:00:00';";
|
||||
if($DBX){print STDERR "\n|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$i=0;
|
||||
$nonDUP='0';
|
||||
while ( ($sthArows > $i) && ($nonDUP=='0') )
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if ($aryA[0] > 1)
|
||||
{
|
||||
$lead_id[$i] = "$aryA[0]";
|
||||
$status[$i] = "$aryA[1]";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$b=0;
|
||||
foreach(@lead_id)
|
||||
{
|
||||
$Nstatus='';
|
||||
$Nepoch=0;
|
||||
$Cstatus='';
|
||||
$Cepoch=0;
|
||||
$stmtA = "select status,start_epoch from vicidial_log where lead_id='$lead_id[$b]' order by call_date desc LIMIT 1;";
|
||||
if($DBX){print STDERR "\n|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$Nstatus = $aryA[0];
|
||||
$Nepoch = $aryA[1];
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "select status,start_epoch from vicidial_closer_log where lead_id='$lead_id[$b]' order by closecallid desc LIMIT 1;";
|
||||
if($DBX){print STDERR "\n|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$Cstatus = $aryA[0];
|
||||
$Cepoch = $aryA[1];
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($Cepoch > $Nepoch) {$NEWstatus = $Cstatus;}
|
||||
else {$NEWstatus = $Nstatus;}
|
||||
|
||||
if ($Cstatus !~ /$status[$b]/)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_list set status='$Cstatus' where lead_id='$lead_id[$b]';";
|
||||
#$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n";
|
||||
if($DB){print STDERR "|$b|$lead_id[$b]|$Nstatus|$Cstatus|$status[$b]||$stmtA|\n";}
|
||||
$h++;
|
||||
}
|
||||
$b++;
|
||||
|
||||
if ($b =~ /100$/i) {print STDERR "0 $b - $h\r";}
|
||||
if ($b =~ /200$/i) {print STDERR "+ $b - $h\r";}
|
||||
if ($b =~ /300$/i) {print STDERR "| $b - $h\r";}
|
||||
if ($b =~ /400$/i) {print STDERR "\\ $b - $h\r";}
|
||||
if ($b =~ /500$/i) {print STDERR "- $b - $h\r";}
|
||||
if ($b =~ /600$/i) {print STDERR "/ $b - $h\r";}
|
||||
if ($b =~ /700$/i) {print STDERR "| $b - $h\r";}
|
||||
if ($b =~ /800$/i) {print STDERR "+ $b - $h\r";}
|
||||
if ($b =~ /900$/i) {print STDERR "0 $b - $h\r";}
|
||||
if ($b =~ /000$/i) {print "|$b|$h|$lead_id[$b]|$Nstatus|$Cstatus|$status[$b]|\n";}
|
||||
|
||||
}
|
||||
chop($DUP_updates);
|
||||
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
### calculate time to run script ###
|
||||
$secY = time();
|
||||
$secZ = ($secY - $secX);
|
||||
$secZm = ($secZ /60);
|
||||
|
||||
print "script execution time in seconds: $secZ minutes: $secZm\n";
|
||||
|
||||
exit;
|
||||
|
||||
@@ -0,0 +1,474 @@
|
||||
CREATE TABLE vicidial_uk_region_codes (
|
||||
region VARCHAR(50) NOT NULL,
|
||||
region_code VARCHAR(3) NOT NULL,
|
||||
post_code_prefix VARCHAR(4) NOT NULL,
|
||||
country_code VARCHAR(3) NOT NULL,
|
||||
list_code_id VARCHAR(4),
|
||||
index(post_code_prefix)
|
||||
);
|
||||
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','CT','UKE','101');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','ME','UKE','101');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','TN','UKE','101');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','BN','UKE','102');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','GU','UKE','102');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','PO','UKE','102');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','RH','UKE','102');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO30','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO31','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO32','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO33','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO34','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO35','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO36','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO37','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO38','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO39','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO40','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('ISLE OF WHITE','IOW','PO41','UKE','103');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','BR','UKE','110');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','DA','UKE','110');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','SE','UKE','110');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','CR','UKE','111');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','KT','UKE','111');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','SM','UKE','111');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','SW','UKE','111');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','TW','UKE','111');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','EN','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','HA','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','NW','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N1','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N2','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N3','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N4','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N5','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N6','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N7','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N8','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','N9','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','UB','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','WC','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','WD','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W1','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W10','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W11','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W12','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W13','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W14','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W2','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W3','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W4','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W5','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W6','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W7','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W8','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','W9','UKE','112');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','EC','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E1','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E2','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E3','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E4','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E5','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E6','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E7','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E8','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','E9','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','IG','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','RM','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','SS','UKE','113');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','PL','UKE','201');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','TR','UKE','201');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','EX','EX','UKE','202');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','TQ','TQ','UKE','202');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','BA','UKE','203');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','BS','UKE','203');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','TA','UKE','203');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','SO','UKE','204');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','BH','UKE','204');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','DT','UKE','204');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','SP','UKE','204');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','OX','UKE','205');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','RG','UKE','205');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','SL','UKE','205');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','GL','UKE','206');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH WEST','SW','SN','UKE','206');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','LU','UKE','301');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','MK','UKE','301');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','SG','UKE','301');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','AL','UKE','301');
|
||||
INSERT INTO vicidial_uk_region_codes values('SOUTH EAST','SE','HP','UKE','301');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','CM','UKE','302');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','CO','UKE','302');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','NR','UKE','303');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','CB','UKE','304');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','PE','UKE','304');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','LE','UKE','305');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','NN','UKE','305');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','CV','UKE','305');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','DE','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','NG','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S1','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S2','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S3','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S4','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S5','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S6','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S7','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S8','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','S9','UKE','306');
|
||||
INSERT INTO vicidial_uk_region_codes values('EAST MIDLANDS','EM','IP','UKE','313');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B1','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B11','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B2','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B3','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B4','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B5','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B6','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B7','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B8','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','B9','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','DY','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','WR','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','WS','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','WV','UKE','401');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','DN','UKE','501');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','LN','UKE','501');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','HU','UKE','502');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','YO','UKE','502');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','HG','UKE','503');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','LS','UKE','503');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','WF','UKE','503');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','DH','UKE','504');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','DL','UKE','504');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','NE','UKE','504');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','SR','UKE','504');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','TS','UKE','504');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','HD','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','BL','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','HX','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M1','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M2','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M3','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M4','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M5','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M6','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M7','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M8','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','M9','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','OL','UKE','601');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','FY','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L1','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L2','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L3','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L4','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L5','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L6','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L7','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L8','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','L9','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','PR','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','WA','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','WN','UKE','602');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CW','UKE','603');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','SK','UKE','603');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','ST','UKE','603');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','TF','UKE','603');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CA','UKE','604');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','LA','UKE','604');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','BB','UKE','605');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','BD','UKE','605');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','IM','UKI','606');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','CF','UKW','701');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','NP','UKW','701');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','SA','UKW','702');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','LD','UKW','703');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','HR','UKE','703');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','SY14','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','SY','UKW','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','SY15','UKW','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY1','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY10','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY11','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY12','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY13','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY2','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY3','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY4','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY5','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY6','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY7','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY8','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('WEST MIDLANDS','WM','SY9','UKE','704');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH1','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH2','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH3','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH4','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH44','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH45','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH60','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH61','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH62','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH63','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH64','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH65','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH66','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH WEST','NW','CH99','UKE','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','CH','UKW','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('WALES','WL','LL','UKW','705');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','EH','UKS','801');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','KY','UKS','801');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','FK','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G1','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G2','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G3','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G4','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G5','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G6','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G7','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G8','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','G9','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA1','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA10','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA11','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA12','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA13','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA14','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA15','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA16','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA17','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA18','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA19','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA2','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA3','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA4','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA5','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA6','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA7','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA8','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PA9','UKS','802');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','KA','UKS','803');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','ML','UKS','803');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','DD','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH1','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH10','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH11','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH12','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH13','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH14','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH15','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH16','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH2','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH3','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH4','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH5','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH6','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH7','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH8','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','PH9','UKS','804');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','DG','UKS','805');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','TD12','UKE','806');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTH EAST','NE','TD15','UKE','806');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','TD','UKS','806');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','IV','UKS','807');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','AB','UKS','809');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','AB1','UKS','809');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','AB2','UKS','809');
|
||||
INSERT INTO vicidial_uk_region_codes values('SCOTLAND','SC','AB3','UKS','809');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT1','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT10','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT2','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT3','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT4','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT5','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT6','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT7','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT8','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT0','BT9','UKN','901');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT11','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT12','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT13','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT14','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT15','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT16','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT17','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT18','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT19','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT1','BT20','UKN','902');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT21','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT22','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT23','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT24','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT25','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT26','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT27','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT28','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT29','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT30','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT31','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT32','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT33','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT34','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT2','BT35','UKN','903');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT36','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT37','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT38','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT39','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT40','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT41','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT42','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT43','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT44','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT45','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT3','BT46','UKN','904');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT47','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT48','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT49','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT50','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT51','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT52','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT53','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT54','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT55','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT56','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT4','BT57','UKN','905');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT58','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT59','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT60','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT61','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT62','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT63','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT64','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT65','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT66','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT67','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT68','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT69','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT70','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT5','BT71','UKN','906');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT72','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT73','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT74','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT75','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT76','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT77','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT78','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT79','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT80','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT81','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT82','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT83','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT84','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT85','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT86','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT87','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT88','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT89','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT90','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT91','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT92','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT93','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT94','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT95','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT96','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT97','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT98','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('NORTHERN IRELAND','BT7','BT99','UKN','907');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','GY','UKC','991');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','JE','UKC','991');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','TR21','UKE','992');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','TR22','UKE','992');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','TR23','UKE','992');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','TR24','UKE','992');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','TR25','UKE','992');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA20','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA21','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA22','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA23','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA24','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA25','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA26','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA27','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA28','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA29','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA30','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA31','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA32','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA33','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA34','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA35','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA36','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA37','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA38','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA39','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA40','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA41','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA42','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA43','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA44','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA45','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA46','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA47','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA48','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA49','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA60','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA61','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA62','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA63','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA64','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA65','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA66','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA67','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA68','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA69','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA70','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA71','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA72','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA73','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA74','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA75','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA76','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA77','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA78','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA80','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA81','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA82','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA83','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA84','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA85','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA86','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA87','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PA88','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH17','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH18','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH19','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH20','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH21','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH22','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH23','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH24','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH25','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH26','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH30','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH31','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH32','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH33','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH34','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH35','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH36','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH37','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH38','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH39','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH40','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH41','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH42','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH43','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','PH44','UKS','993');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','HS','UKS','994');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','KW','UKS','994');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','ZE','UKS','994');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','USA','USA','999');
|
||||
INSERT INTO vicidial_uk_region_codes values('OUT OF AREA','OA','ZZ','FOR','999');
|
||||
@@ -1,7 +1,7 @@
|
||||
<?
|
||||
# conf_exten_check.php version 2.0.5
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?
|
||||
# AST_timeonVDADall.php
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer all servers
|
||||
#
|
||||
@@ -42,6 +42,7 @@
|
||||
# 81029-1023 - Changed drop percent calculation for multi-stat reports
|
||||
# 81029-1706 - Added pause code display if enabled per campaign
|
||||
# 81108-2337 - Added inbound-only section
|
||||
# 90105-1153 - Changed monitor links to use 0 prefix instead of 6
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -1439,8 +1440,8 @@ $calls_to_list = mysql_num_rows($rslt);
|
||||
|
||||
$L='';
|
||||
$R='';
|
||||
if ($SIPmonitorLINK>0) {$L=" <a href=\"sip:6$Lsessionid@$server_ip\">LISTEN</a>"; $R='';}
|
||||
if ($IAXmonitorLINK>0) {$L=" <a href=\"iax:6$Lsessionid@$server_ip\">LISTEN</a>"; $R='';}
|
||||
if ($SIPmonitorLINK>0) {$L=" <a href=\"sip:0$Lsessionid@$server_ip\">LISTEN</a>"; $R='';}
|
||||
if ($IAXmonitorLINK>0) {$L=" <a href=\"iax:0$Lsessionid@$server_ip\">LISTEN</a>"; $R='';}
|
||||
if ($SIPmonitorLINK>1) {$R=" | <a href=\"sip:$Lsessionid@$server_ip\">BARGE</a>";}
|
||||
if ($IAXmonitorLINK>1) {$R=" | <a href=\"iax:$Lsessionid@$server_ip\">BARGE</a>";}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user