Changed application limit for lead_id from 9 digits to 10 digits. This does not affect the database limit of lead_id: 4294967295
git-svn-id: svn://192.168.202.10@1515 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -313,6 +313,9 @@ OTHER CHANGES:
|
|||||||
to force a user password change on the next admin login. Added password
|
to force a user password change on the next admin login. Added password
|
||||||
default settings to System Settings and added a first login setup screen
|
default settings to System Settings and added a first login setup screen
|
||||||
|
|
||||||
|
69. Changed application limit for lead_id from 9 digits to 10 digits. This does
|
||||||
|
not affect the database limit of lead_id: 4294967295
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -37,6 +37,7 @@
|
|||||||
# 100327-0819 - Fixed issue with Manual dial treansfers
|
# 100327-0819 - Fixed issue with Manual dial treansfers
|
||||||
# 100430-1606 - Added list_id update to vicidial_log updates
|
# 100430-1606 - Added list_id update to vicidial_log updates
|
||||||
# 100823-0850 - Changed vac to UPDATE for Auto-alt-dial to function properly
|
# 100823-0850 - Changed vac to UPDATE for Auto-alt-dial to function properly
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'VD_amd.agi';
|
$script = 'VD_amd.agi';
|
||||||
@@ -213,7 +214,7 @@ $VDADphone_code='';
|
|||||||
$callerid =~ s/\"//gi;
|
$callerid =~ s/\"//gi;
|
||||||
$callerid =~ s/ .*//gi;
|
$callerid =~ s/ .*//gi;
|
||||||
$CIDlead_id = $callerid;
|
$CIDlead_id = $callerid;
|
||||||
$CIDlead_id = substr($CIDlead_id, 11, 9);
|
$CIDlead_id = substr($CIDlead_id, 10, 10);
|
||||||
$CIDlead_id = ($CIDlead_id + 0);
|
$CIDlead_id = ($CIDlead_id + 0);
|
||||||
if ( ($CLIlead_id > 0) && ($CIDlead_id < 1) ) {$CIDlead_id = $CLIlead_id;}
|
if ( ($CLIlead_id > 0) && ($CIDlead_id < 1) ) {$CIDlead_id = $CLIlead_id;}
|
||||||
$VD_lead_id = $CIDlead_id;
|
$VD_lead_id = $CIDlead_id;
|
||||||
|
|||||||
@@ -1,313 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# THIS SCRIPT WILL BE DEPRICATED AND REMOVED BEFORE THE 2.2.0 RELEASE
|
|
||||||
#
|
|
||||||
# VD_amd_post.agi version 2.0.4 *DBI-version*
|
|
||||||
#
|
|
||||||
# NOTE: This script is only needed with app_amd enabled systems
|
|
||||||
#
|
|
||||||
# runs after a call goes through AMD in extensions.conf to send the call on to
|
|
||||||
# it's proper destination
|
|
||||||
#
|
|
||||||
# You need to put lines similar to those below in your extensions.conf file:
|
|
||||||
#
|
|
||||||
# ; VICIDIAL_auto_dialer transfer script AMD with Load Balanced:
|
|
||||||
# exten => 8369,1,AGI(call_log.agi,${EXTEN})
|
|
||||||
# exten => 8369,2,(AMD),AMD
|
|
||||||
# exten => 8369,3,AGI(VD_amd.agi,${EXTEN})
|
|
||||||
# exten => 8369,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
|
|
||||||
# exten => 8369,5,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
|
|
||||||
# exten => 8369,6,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
|
|
||||||
# exten => 8369,7,Hangup
|
|
||||||
#
|
|
||||||
# ; this is used for playing a message to an answering machine forwarded from AMD in VICIDIAL
|
|
||||||
# ; replace conf with the message file you want to leave
|
|
||||||
# exten => 8320,1,WaitForSilence(2000,2) ; AMD got machine. leave message after recording
|
|
||||||
# exten => 8320,2,Playback(ding)
|
|
||||||
# exten => 8320,3,AGI(VD_amd_post.agi,${EXTEN})
|
|
||||||
# exten => 8320,4,Hangup
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
|
||||||
#
|
|
||||||
# changes:
|
|
||||||
# 60217-1119 first build
|
|
||||||
# 60731-1403 - changed to use DBI-DBD::mysql
|
|
||||||
# - changed to use /etc/astguiclient.conf for configs
|
|
||||||
# 60817-1025 - added output options check from database
|
|
||||||
# 71118-0257 - updated comments
|
|
||||||
#
|
|
||||||
|
|
||||||
$script = 'VD_amd_post.agi';
|
|
||||||
|
|
||||||
$A = 1; # set to 1 for AMD output messages mode
|
|
||||||
$AMD_LOG = 0; # set to 1 for logfile
|
|
||||||
|
|
||||||
($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) {$Fhour = "0$hour";}
|
|
||||||
if ($min < 10) {$min = "0$min";}
|
|
||||||
if ($sec < 10) {$sec = "0$sec";}
|
|
||||||
|
|
||||||
$now_date_epoch = time();
|
|
||||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
|
||||||
$start_time=$now_date;
|
|
||||||
$CIDdate = "$mon$mday$hour$min$sec";
|
|
||||||
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
|
||||||
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
|
||||||
$SQLdateBEGIN = $SQLdate;
|
|
||||||
|
|
||||||
# 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++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$VARDB_port) {$VARDB_port='3306';}
|
|
||||||
if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";}
|
|
||||||
|
|
||||||
use DBI;
|
|
||||||
use Asterisk::AGI;
|
|
||||||
$AGI = new Asterisk::AGI;
|
|
||||||
|
|
||||||
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
|
||||||
or die "Couldn't connect to database: " . DBI->errstr;
|
|
||||||
|
|
||||||
### Grab Server values from the database
|
|
||||||
$stmtA = "SELECT agi_output FROM servers where server_ip = '$VARserver_ip';";
|
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
|
||||||
$sthArows=$sthA->rows;
|
|
||||||
$rec_count=0;
|
|
||||||
while ($sthArows > $rec_count)
|
|
||||||
{
|
|
||||||
$AGILOG = '0';
|
|
||||||
@aryA = $sthA->fetchrow_array;
|
|
||||||
$DBagi_output = "$aryA[0]";
|
|
||||||
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
|
|
||||||
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
|
|
||||||
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
|
|
||||||
$rec_count++;
|
|
||||||
}
|
|
||||||
$sthA->finish();
|
|
||||||
|
|
||||||
### begin parsing run-time options ###
|
|
||||||
if (length($ARGV[0])>1)
|
|
||||||
{
|
|
||||||
if ($AGILOG) {$agi_string = "Perl Environment Dump:"; &agi_output;}
|
|
||||||
$i=0;
|
|
||||||
while ($#ARGV >= $i)
|
|
||||||
{
|
|
||||||
$args = "$args $ARGV[$i]";
|
|
||||||
if ($AGILOG) {$agi_string = "$i|$ARGV[$i]"; &agi_output;}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($args =~ /--help/i)
|
|
||||||
{
|
|
||||||
print "allowed run time options:\n [-q] = quiet\n [-t] = test\n [-debug] = verbose debug messages\n\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($args =~ /-V/i)
|
|
||||||
{
|
|
||||||
$V=1;
|
|
||||||
}
|
|
||||||
if ($args =~ /-debug/i)
|
|
||||||
{
|
|
||||||
$DG=1;
|
|
||||||
}
|
|
||||||
if ($args =~ /-dbAVS/i)
|
|
||||||
{
|
|
||||||
$DGA=1;
|
|
||||||
}
|
|
||||||
if ($args =~ /-q/i)
|
|
||||||
{
|
|
||||||
$q=1;
|
|
||||||
$Q=1;
|
|
||||||
}
|
|
||||||
if ($args =~ /-t/i)
|
|
||||||
{
|
|
||||||
$TEST=1;
|
|
||||||
$T=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$|=1;
|
|
||||||
while(<STDIN>)
|
|
||||||
{
|
|
||||||
chomp;
|
|
||||||
last unless length($_);
|
|
||||||
if ($AGILOG)
|
|
||||||
{
|
|
||||||
if (/^agi_(\w+)\:\s+(.*)$/)
|
|
||||||
{
|
|
||||||
$AGI{$1} = $2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;}
|
|
||||||
if (/^agi_priority\:\s+(.*)$/) {$priority = $1;}
|
|
||||||
if (/^agi_channel\:\s+(.*)$/) {$channel = $1;}
|
|
||||||
if (/^agi_extension\:\s+(.*)$/) {$extension = $1;}
|
|
||||||
if (/^agi_type\:\s+(.*)$/) {$type = $1;}
|
|
||||||
if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1;}
|
|
||||||
if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( (length($callerid)>20) && ($callerid =~ /\"\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S/) )
|
|
||||||
{
|
|
||||||
$callerid =~ s/^\"//gi;
|
|
||||||
$callerid =~ s/\".*$//gi;
|
|
||||||
# ### set the callerid to the ACQS value(calleridname)
|
|
||||||
# print "SET CALLERID $callerid\n";
|
|
||||||
# checkresult($result);
|
|
||||||
# print STDERR "callerID changed: $callerid\n";
|
|
||||||
|
|
||||||
}
|
|
||||||
if ( (
|
|
||||||
(length($calleridname)>5) && ( (!$callerid) or ($callerid =~ /unknown|private|00000000/i) or ($callerid =~ /5551212/) )
|
|
||||||
) or ( (length($calleridname)>17) && ($calleridname =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) ) )
|
|
||||||
{
|
|
||||||
$callerid = $calleridname;
|
|
||||||
# ### set the callerid to the ACQS value(calleridname)
|
|
||||||
# print "SET CALLERID $callerid\n";
|
|
||||||
# checkresult($result);
|
|
||||||
# print STDERR "callerID changed: $callerid\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($AGILOG) {$agi_string = "AGI Environment Dump:"; &agi_output;}
|
|
||||||
|
|
||||||
foreach $i (sort keys %AGI)
|
|
||||||
{
|
|
||||||
if ($AGILOG) {$agi_string = " -- $i = $AGI{$i}"; &agi_output;}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$type|$callerid|$calleridname|$priority|"; &agi_output;}
|
|
||||||
|
|
||||||
$VDADcampaign='';
|
|
||||||
$VDADphone='';
|
|
||||||
$VDADphone_code='';
|
|
||||||
|
|
||||||
|
|
||||||
$callerid =~ s/\"//gi;
|
|
||||||
$CIDlead_id = $callerid;
|
|
||||||
$CIDlead_id = substr($CIDlead_id, 11, 9);
|
|
||||||
$CIDlead_id = ($CIDlead_id + 0);
|
|
||||||
$VD_lead_id = $CIDlead_id;
|
|
||||||
|
|
||||||
if ($AGILOG) {$agi_string = "+++++ VD amd START: |$CIDlead_id|$now_date|$AST_ver|"; &agi_output;}
|
|
||||||
|
|
||||||
if ( ($channel =~ /Local/i) && ($AST_ver !~ /^1\.0\.8|^1\.0\.9/) )
|
|
||||||
{
|
|
||||||
if ($AGILOG) {$agi_string = "+++++ VDAD START LOCAL CHANNEL: EXITING- $priority"; &agi_output;}
|
|
||||||
if ($priority > 2) {sleep(1);}
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
########## AMD says it's a machine so modify statuses and hangup call ##########
|
|
||||||
########## something will go here later for leaving a message on AMs ##########
|
|
||||||
|
|
||||||
$stmtA = "UPDATE vicidial_log set status='AL' where lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
|
||||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AL update: |$affected_rows|$uniqueid|"; &agi_output;}
|
|
||||||
|
|
||||||
$stmtA = "UPDATE vicidial_list set status='AL' where lead_id='$VD_lead_id';";
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
|
||||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list AL update: |$affected_rows|$uniqueid|"; &agi_output;}
|
|
||||||
|
|
||||||
|
|
||||||
$dbhA->disconnect();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exit;
|
|
||||||
|
|
||||||
sub checkresult {
|
|
||||||
my ($res) = @_;
|
|
||||||
my $retval;
|
|
||||||
$tests++;
|
|
||||||
chomp $res;
|
|
||||||
if ($res =~ /^200/) {
|
|
||||||
$res =~ /result=(-?\d+)/;
|
|
||||||
if (!length($1)) {
|
|
||||||
# print STDERR "FAIL ($res)\n";
|
|
||||||
$fail++;
|
|
||||||
} else {
|
|
||||||
# print STDERR "PASS ($1)\n";
|
|
||||||
$pass++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
# print STDERR "FAIL (unexpected result '$res')\n";
|
|
||||||
$fail++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sub agi_output
|
|
||||||
{
|
|
||||||
if ($AGILOG >=2)
|
|
||||||
{
|
|
||||||
### open the log file for writing ###
|
|
||||||
open(Lout, ">>$AGILOGfile")
|
|
||||||
|| die "Can't open $AGILOGfile: $!\n";
|
|
||||||
print Lout "$now_date|$script|$agi_string\n";
|
|
||||||
close(Lout);
|
|
||||||
}
|
|
||||||
### send to STDERR writing ###
|
|
||||||
if ( ($AGILOG == '1') || ($AGILOG == '3') )
|
|
||||||
{print STDERR "$now_date|$script|$agi_string\n";}
|
|
||||||
$agi_string='';
|
|
||||||
}
|
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
#
|
#
|
||||||
# changes:
|
# changes:
|
||||||
# 60915-1616 - first build
|
# 60915-1616 - first build
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'VD_auto_post_VERIFY.agi';
|
$script = 'VD_auto_post_VERIFY.agi';
|
||||||
@@ -220,7 +221,7 @@ $VDADphone_code='';
|
|||||||
$callerid =~ s/ .*//gi;
|
$callerid =~ s/ .*//gi;
|
||||||
$callerid =~ s/\"//gi;
|
$callerid =~ s/\"//gi;
|
||||||
$CIDlead_id = $callerid;
|
$CIDlead_id = $callerid;
|
||||||
$CIDlead_id = substr($CIDlead_id, 11, 9);
|
$CIDlead_id = substr($CIDlead_id, 10, 10);
|
||||||
$CIDlead_id = ($CIDlead_id + 0);
|
$CIDlead_id = ($CIDlead_id + 0);
|
||||||
$VD_lead_id = $CIDlead_id;
|
$VD_lead_id = $CIDlead_id;
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,7 @@
|
|||||||
# 100805-1530 - Added FILTER from-did-route feature, changed active=n to go to after hours action
|
# 100805-1530 - Added FILTER from-did-route feature, changed active=n to go to after hours action
|
||||||
# 100811-0751 - Added calculate_estimated_hold_seconds option
|
# 100811-0751 - Added calculate_estimated_hold_seconds option
|
||||||
# 100830-1445 - Allow the changing of the queue priority of a call while the call is in queue
|
# 100830-1445 - Allow the changing of the queue priority of a call while the call is in queue
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||||
@@ -172,11 +173,13 @@ $start_epoch = $now_date_epoch;
|
|||||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||||
$CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec";
|
$CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec";
|
||||||
$start_time=$now_date;
|
$start_time=$now_date;
|
||||||
$CIDdate = "$mon$mday$hour$min$sec";
|
$CIDdate = "$mon$mday$hour$min$sec";
|
||||||
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
||||||
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
||||||
$SQLdateBEGIN = $SQLdate;
|
$SQLdateBEGIN = $SQLdate;
|
||||||
$ORIGINAL_call_time = $SQLdate;
|
$ORIGINAL_call_time = $SQLdate;
|
||||||
|
while (length($CIDdate) > 9) {$CIDdate =~ s/^.//gi;} # 0902235959 changed to 902235959
|
||||||
|
|
||||||
|
|
||||||
$BDtarget = ($now_date_epoch - 5);
|
$BDtarget = ($now_date_epoch - 5);
|
||||||
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
||||||
@@ -449,7 +452,7 @@ if ($call_handle_method =~ /^CLOSER/)
|
|||||||
$CIDlead_id = $parked_by;
|
$CIDlead_id = $parked_by;
|
||||||
$fronter_call_seconds = $EXT_vars[8]; # not currently used
|
$fronter_call_seconds = $EXT_vars[8]; # not currently used
|
||||||
|
|
||||||
$PADlead_id = sprintf("%09s", $parked_by); while (length($PADlead_id) > 9) {chop($PADlead_id);}
|
$PADlead_id = sprintf("%010s", $parked_by); while (length($PADlead_id) > 10) {chop($PADlead_id);}
|
||||||
# JmmddhhmmssLLLLLLLLL
|
# JmmddhhmmssLLLLLLLLL
|
||||||
$JqueryCID = "J$CIDdate$PADlead_id";
|
$JqueryCID = "J$CIDdate$PADlead_id";
|
||||||
$callerid = $JqueryCID;
|
$callerid = $JqueryCID;
|
||||||
@@ -1320,7 +1323,7 @@ $sthA->finish();
|
|||||||
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|$insert_lead_id|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|$insert_lead_id|"; &agi_output;}
|
||||||
|
|
||||||
$PADlead_id = sprintf("%09s", $insert_lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
|
$PADlead_id = sprintf("%010s", $insert_lead_id); while (length($PADlead_id) > 10) {chop($PADlead_id);}
|
||||||
# YmmddhhmmssLLLLLLLLL
|
# YmmddhhmmssLLLLLLLLL
|
||||||
$YqueryCID = "Y$CIDdate$PADlead_id";
|
$YqueryCID = "Y$CIDdate$PADlead_id";
|
||||||
$callerid = $YqueryCID;
|
$callerid = $YqueryCID;
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
# 100424-1341 - Added extended logging
|
# 100424-1341 - Added extended logging
|
||||||
# 100623-1310 - Added queue_priority to queue processing
|
# 100623-1310 - Added queue_priority to queue processing
|
||||||
# 100727-1653 - Fixes for queue priority feature
|
# 100727-1653 - Fixes for queue priority feature
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||||
@@ -312,7 +313,7 @@ $VDADphone_code='';
|
|||||||
$callerid =~ s/\"//gi;
|
$callerid =~ s/\"//gi;
|
||||||
$callerid =~ s/ .*//gi;
|
$callerid =~ s/ .*//gi;
|
||||||
$CIDlead_id = $callerid;
|
$CIDlead_id = $callerid;
|
||||||
$CIDlead_id = substr($CIDlead_id, 11, 9);
|
$CIDlead_id = substr($CIDlead_id, 10, 10);
|
||||||
$CIDlead_id = ($CIDlead_id + 0);
|
$CIDlead_id = ($CIDlead_id + 0);
|
||||||
|
|
||||||
if ($AGILOG) {$agi_string = "+++++ VDAD START : |$CIDlead_id|$now_date|$AST_ver|$priority|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "+++++ VDAD START : |$CIDlead_id|$now_date|$AST_ver|$priority|"; &agi_output;}
|
||||||
|
|||||||
@@ -11,10 +11,11 @@
|
|||||||
#exten => 8352,2,Playback(85100001)
|
#exten => 8352,2,Playback(85100001)
|
||||||
#exten => 8352,3,Hangup
|
#exten => 8352,3,Hangup
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# changes:
|
# changes:
|
||||||
# 60918-1151 - First build
|
# 60918-1151 - First build
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDADselective_CID_hangup.agi';
|
$script = 'agi-VDADselective_CID_hangup.agi';
|
||||||
@@ -135,7 +136,7 @@ while(<STDIN>)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$CIDlead_id = $calleridname;
|
$CIDlead_id = $calleridname;
|
||||||
$CIDlead_id = substr($CIDlead_id, 11, 9);
|
$CIDlead_id = substr($CIDlead_id, 10, 10);
|
||||||
$CIDlead_id = ($CIDlead_id + 0);
|
$CIDlead_id = ($CIDlead_id + 0);
|
||||||
|
|
||||||
$stmtA = "SELECT phone_number FROM vicidial_list where lead_id = '$CIDlead_id' limit 1;";
|
$stmtA = "SELECT phone_number FROM vicidial_list where lead_id = '$CIDlead_id' limit 1;";
|
||||||
|
|||||||
@@ -90,6 +90,7 @@
|
|||||||
# 91213-1856 - Added queue_position to queue_log ABANDON records
|
# 91213-1856 - Added queue_position to queue_log ABANDON records
|
||||||
# 100309-0551 - Added queuemetrics_loginout option
|
# 100309-0551 - Added queuemetrics_loginout option
|
||||||
# 100327-1359 - Fixed LAGGED issues
|
# 100327-1359 - Fixed LAGGED issues
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -1032,7 +1033,7 @@ while($one_day_interval > 0)
|
|||||||
if ( (length($RECprefix)>0) && ($called_count < $RECcount) )
|
if ( (length($RECprefix)>0) && ($called_count < $RECcount) )
|
||||||
{$Local_out_prefix .= "$RECprefix";}
|
{$Local_out_prefix .= "$RECprefix";}
|
||||||
}
|
}
|
||||||
$PADlead_id = sprintf("%09s", $lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
|
$PADlead_id = sprintf("%010s", $lead_id); while (length($PADlead_id) > 10) {chop($PADlead_id);}
|
||||||
|
|
||||||
if ($lists_update !~ /'$list_id'/) {$lists_update .= "'$list_id',"; $LUcount++;}
|
if ($lists_update !~ /'$list_id'/) {$lists_update .= "'$list_id',"; $LUcount++;}
|
||||||
|
|
||||||
@@ -1214,7 +1215,7 @@ while($one_day_interval > 0)
|
|||||||
if ( (length($CLlead_id) < 1) || ($CLlead_id < 1) )
|
if ( (length($CLlead_id) < 1) || ($CLlead_id < 1) )
|
||||||
{
|
{
|
||||||
$CLlead_id = $KLcallerid[$kill_vac];
|
$CLlead_id = $KLcallerid[$kill_vac];
|
||||||
$CLlead_id = substr($CLlead_id, 11, 9);
|
$CLlead_id = substr($CLlead_id, 10, 10);
|
||||||
$CLlead_id = ($CLlead_id + 0);
|
$CLlead_id = ($CLlead_id + 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2317,6 +2318,7 @@ sub get_time_now #get the current date and time and epoch for logging call lengt
|
|||||||
$CIDdate = "$mon$mday$hour$min$sec";
|
$CIDdate = "$mon$mday$hour$min$sec";
|
||||||
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
||||||
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
||||||
|
while (length($CIDdate) > 9) {$CIDdate =~ s/^.//gi;} # 0902235959 changed to 902235959
|
||||||
|
|
||||||
$BDtarget = ($secX - 10);
|
$BDtarget = ($secX - 10);
|
||||||
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
# 90729-0611 - Added vicidial_balance_rank option
|
# 90729-0611 - Added vicidial_balance_rank option
|
||||||
# 90924-1519 - Added List callerid override option
|
# 90924-1519 - Added List callerid override option
|
||||||
# 100205-1245 - Added optional stagger sending of calls across all available servers in each rank
|
# 100205-1245 - Added optional stagger sending of calls across all available servers in each rank
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
### begin parsing run-time options ###
|
### begin parsing run-time options ###
|
||||||
@@ -757,7 +758,7 @@ while($one_day_interval > 0)
|
|||||||
if ( (length($RECprefix)>0) && ($called_count < $RECcount) )
|
if ( (length($RECprefix)>0) && ($called_count < $RECcount) )
|
||||||
{$Local_out_prefix .= "$RECprefix";}
|
{$Local_out_prefix .= "$RECprefix";}
|
||||||
}
|
}
|
||||||
$PADlead_id = sprintf("%09s", $lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
|
$PADlead_id = sprintf("%010s", $lead_id); while (length($PADlead_id) > 10) {chop($PADlead_id);}
|
||||||
|
|
||||||
if ($lists_update !~ /'$list_id'/) {$lists_update .= "'$list_id',"; $LUcount++;}
|
if ($lists_update !~ /'$list_id'/) {$lists_update .= "'$list_id',"; $LUcount++;}
|
||||||
|
|
||||||
@@ -1100,9 +1101,10 @@ sub get_time_now #get the current date and time and epoch for logging call lengt
|
|||||||
$now_date_epoch = time();
|
$now_date_epoch = time();
|
||||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||||
$file_date = "$year-$mon-$mday";
|
$file_date = "$year-$mon-$mday";
|
||||||
$CIDdate = "$mon$mday$hour$min$sec";
|
$CIDdate = "$mon$mday$hour$min$sec";
|
||||||
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
||||||
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
||||||
|
while (length($CIDdate) > 9) {$CIDdate =~ s/^.//gi;} # 0902235959 changed to 902235959
|
||||||
|
|
||||||
$BDtarget = ($secX - 10);
|
$BDtarget = ($secX - 10);
|
||||||
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
# 71129-2004 - Fixed SQL error
|
# 71129-2004 - Fixed SQL error
|
||||||
# 100416-0635 - Added fix for extension append feature
|
# 100416-0635 - Added fix for extension append feature
|
||||||
# 100625-1220 - Added waitfors after logout to fix broken pipe errors in asterisk <MikeC>
|
# 100625-1220 - Added waitfors after logout to fix broken pipe errors in asterisk <MikeC>
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
# constants
|
# constants
|
||||||
@@ -588,7 +589,7 @@ while($one_day_interval > 0)
|
|||||||
$result =~ s/Result: |\s*$//gi;
|
$result =~ s/Result: |\s*$//gi;
|
||||||
if (length($result)>0)
|
if (length($result)>0)
|
||||||
{
|
{
|
||||||
$lead_id = substr($callid, 11, 9);
|
$lead_id = substr($callid, 10, 10);
|
||||||
$lead_id = ($lead_id + 0);
|
$lead_id = ($lead_id + 0);
|
||||||
$stmtA = "INSERT INTO vicidial_cpd_log set channel='$channel', uniqueid='$uniqueid', callerid='$callid', server_ip='$server_ip', lead_id='$lead_id', event_date='$now_date', result='$result';";
|
$stmtA = "INSERT INTO vicidial_cpd_log set channel='$channel', uniqueid='$uniqueid', callerid='$callid', server_ip='$server_ip', lead_id='$lead_id', event_date='$now_date', result='$result';";
|
||||||
print STDERR "|$stmtA|\n";
|
print STDERR "|$stmtA|\n";
|
||||||
|
|||||||
+2
-1
@@ -55,6 +55,7 @@
|
|||||||
# 100108-2242 - Added answered_time to vicidial_carrier_log
|
# 100108-2242 - Added answered_time to vicidial_carrier_log
|
||||||
# 100123-1449 - Added double-log end logging
|
# 100123-1449 - Added double-log end logging
|
||||||
# 100224-1229 - Fixed manual dial park call bug
|
# 100224-1229 - Fixed manual dial park call bug
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
# defaults for PreFork
|
# defaults for PreFork
|
||||||
@@ -501,7 +502,7 @@ sub process_request
|
|||||||
$callerid =~ s/ .*//gi;
|
$callerid =~ s/ .*//gi;
|
||||||
$callerid =~ s/\"//gi;
|
$callerid =~ s/\"//gi;
|
||||||
$CIDlead_id = $callerid;
|
$CIDlead_id = $callerid;
|
||||||
$CIDlead_id = substr($CIDlead_id, 11, 9);
|
$CIDlead_id = substr($CIDlead_id, 10, 10);
|
||||||
$CIDlead_id = ($CIDlead_id + 0);
|
$CIDlead_id = ($CIDlead_id + 0);
|
||||||
|
|
||||||
$park_abandon=0;
|
$park_abandon=0;
|
||||||
|
|||||||
+13
-11
@@ -253,9 +253,11 @@
|
|||||||
# 100803-0822 - Added CAMPLISTS_ALL for manual_dial_filter(issue #369)
|
# 100803-0822 - Added CAMPLISTS_ALL for manual_dial_filter(issue #369)
|
||||||
# 100823-1612 - Added DID variables on inbound calls
|
# 100823-1612 - Added DID variables on inbound calls
|
||||||
# 100902-1348 - Added closecallid and xfercallid variables
|
# 100902-1348 - Added closecallid and xfercallid variables
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
|
#
|
||||||
|
|
||||||
$version = '2.4-160';
|
$version = '2.4-161';
|
||||||
$build = '100902-1348';
|
$build = '100903-0041';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=333;
|
$mysql_log_count=333;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
@@ -454,7 +456,7 @@ $ENTRYdate = date("YmdHis");
|
|||||||
$MT[0]='';
|
$MT[0]='';
|
||||||
$agents='@agents';
|
$agents='@agents';
|
||||||
$US='_';
|
$US='_';
|
||||||
|
while (strlen($CIDdate) > 9) {$CIDdate = substr("$CIDdate", 1);}
|
||||||
|
|
||||||
##### Hangup Cause Dictionary #####
|
##### Hangup Cause Dictionary #####
|
||||||
$hangup_cause_dictionary = array(
|
$hangup_cause_dictionary = array(
|
||||||
@@ -1792,8 +1794,8 @@ if ($ACTION == 'manDiaLnextCaLL')
|
|||||||
if ( ($WeBRooTWritablE > 0) and ($enable_agc_xfer_log > 0) )
|
if ( ($WeBRooTWritablE > 0) and ($enable_agc_xfer_log > 0) )
|
||||||
{
|
{
|
||||||
# generate callerID for unique identifier in xfer_log file
|
# generate callerID for unique identifier in xfer_log file
|
||||||
$PADlead_id = sprintf("%09s", $lead_id);
|
$PADlead_id = sprintf("%010s", $lead_id);
|
||||||
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
|
while (strlen($PADlead_id) > 10) {$PADlead_id = substr("$PADlead_id", 1);}
|
||||||
# Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL
|
# Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL
|
||||||
$MqueryCID = "M$CIDdate$PADlead_id";
|
$MqueryCID = "M$CIDdate$PADlead_id";
|
||||||
|
|
||||||
@@ -1918,8 +1920,8 @@ if ($ACTION == 'manDiaLnextCaLL')
|
|||||||
}
|
}
|
||||||
if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';}
|
if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';}
|
||||||
|
|
||||||
$PADlead_id = sprintf("%09s", $lead_id);
|
$PADlead_id = sprintf("%010s", $lead_id);
|
||||||
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
|
while (strlen($PADlead_id) > 10) {$PADlead_id = substr("$PADlead_id", 1);}
|
||||||
|
|
||||||
### check for extension append in campaign
|
### check for extension append in campaign
|
||||||
$use_eac=0;
|
$use_eac=0;
|
||||||
@@ -2411,8 +2413,8 @@ if ($ACTION == 'manDiaLonly')
|
|||||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||||
}
|
}
|
||||||
|
|
||||||
$PADlead_id = sprintf("%09s", $lead_id);
|
$PADlead_id = sprintf("%010s", $lead_id);
|
||||||
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
|
while (strlen($PADlead_id) > 10) {$PADlead_id = substr("$PADlead_id", 1);}
|
||||||
|
|
||||||
# Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL
|
# Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL
|
||||||
$MqueryCID = "M$CIDdate$PADlead_id";
|
$MqueryCID = "M$CIDdate$PADlead_id";
|
||||||
@@ -5276,8 +5278,8 @@ if ($ACTION == 'updateDISPO')
|
|||||||
{$VLphone_code = "$phone_code";}
|
{$VLphone_code = "$phone_code";}
|
||||||
}
|
}
|
||||||
|
|
||||||
$PADlead_id = sprintf("%09s", $lead_id);
|
$PADlead_id = sprintf("%010s", $lead_id);
|
||||||
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
|
while (strlen($PADlead_id) > 10) {$PADlead_id = substr("$PADlead_id", 1);}
|
||||||
$FAKEcall_id = "$StarTtime.$PADlead_id";
|
$FAKEcall_id = "$StarTtime.$PADlead_id";
|
||||||
$stmt = "INSERT INTO vicidial_log set uniqueid='$FAKEcall_id',lead_id='$lead_id',list_id='$VLlist_id',campaign_id='$campaign',call_date='$NOW_TIME',start_epoch='$StarTtime',end_epoch='$StarTtime',length_in_sec='0',status='$dispo_choice',phone_code='$VLphone_code',phone_number='$VLphone_number',user='$user',comments='MANUAL',processed='N',user_group='$user_group',term_reason='AGENT',alt_dial='$VLalt';";
|
$stmt = "INSERT INTO vicidial_log set uniqueid='$FAKEcall_id',lead_id='$lead_id',list_id='$VLlist_id',campaign_id='$campaign',call_date='$NOW_TIME',start_epoch='$StarTtime',end_epoch='$StarTtime',length_in_sec='0',status='$dispo_choice',phone_code='$VLphone_code',phone_number='$VLphone_number',user='$user',comments='MANUAL',processed='N',user_group='$user_group',term_reason='AGENT',alt_dial='$VLalt';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
# 90529-2041 - Added Realtime monitoring
|
# 90529-2041 - Added Realtime monitoring
|
||||||
# 91012-0641 - Fixed to work with non-sequential time_ids in the queue_log
|
# 91012-0641 - Fixed to work with non-sequential time_ids in the queue_log
|
||||||
# 100127-0603 - Added OpenSuSE install instructions
|
# 100127-0603 - Added OpenSuSE install instructions
|
||||||
|
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||||
#
|
#
|
||||||
|
|
||||||
// $Id: xmlrpc_audio_server.php,v 1.3 2007/11/12 17:53:09 lenz Exp $
|
// $Id: xmlrpc_audio_server.php,v 1.3 2007/11/12 17:53:09 lenz Exp $
|
||||||
@@ -105,7 +106,7 @@ function find_file( $ServerID, $AsteriskID, $QMUserID, $QMUserName )
|
|||||||
$time_id = $row[0];
|
$time_id = $row[0];
|
||||||
$time_id_end = ($time_id + 14400);
|
$time_id_end = ($time_id + 14400);
|
||||||
|
|
||||||
$lead_id = substr($AsteriskID, -9);
|
$lead_id = substr($AsteriskID, -10);
|
||||||
$lead_id = ($lead_id + 0);
|
$lead_id = ($lead_id + 0);
|
||||||
$stmt = "SELECT start_epoch,length_in_sec,location from recording_log where start_epoch>=$time_id and start_epoch<=$time_id_end and lead_id='$lead_id' order by recording_id limit 1;";
|
$stmt = "SELECT start_epoch,length_in_sec,location from recording_log where start_epoch>=$time_id and start_epoch<=$time_id_end and lead_id='$lead_id' order by recording_id limit 1;";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|||||||
Reference in New Issue
Block a user