Added options to disable incomplete QC functionality and to hide outbound list dialing features in the admin interface.

Added patch for compatibility with Asterisk 1.4 and the Sangoma paraXip CPD (Call Progress Detection) software, as well as VICIDIAL options and programming to allow it to work with CPD

git-svn-id: svn://192.168.202.10@1044 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-02-02 11:40:59 +00:00
parent ce1adaf802
commit 441ca0f77a
11 changed files with 1617 additions and 1006 deletions
+25 -10
View File
@@ -73,6 +73,7 @@
# 81013-2216 - Fixed improper deletion of auto_calls records
# 81020-0125 - Bug fixes from changes to auto_calls deletion changes
# 90124-0721 - Added parameter to ensure no auto-dial calls are placed for MANUAL campaigns
# 90202-0203 - Added outbound_autodial_active option to halt all dialing
#
@@ -229,21 +230,22 @@ $sthA->finish();
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,outbound_autodial_active FROM system_settings;";
$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)
{
@aryA = $sthA->fetchrow_array;
$enable_queuemetrics_logging = "$aryA[0]";
$queuemetrics_server_ip = "$aryA[1]";
$queuemetrics_dbname = "$aryA[2]";
$queuemetrics_login= "$aryA[3]";
$queuemetrics_pass = "$aryA[4]";
$queuemetrics_log_id = "$aryA[5]";
$rec_count++;
@aryA = $sthA->fetchrow_array;
$enable_queuemetrics_logging = "$aryA[0]";
$queuemetrics_server_ip = "$aryA[1]";
$queuemetrics_dbname = "$aryA[2]";
$queuemetrics_login= "$aryA[3]";
$queuemetrics_pass = "$aryA[4]";
$queuemetrics_log_id = "$aryA[5]";
$outbound_autodial_active = "$aryA[6]";
$rec_count++;
}
$sthA->finish();
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -311,6 +313,19 @@ while($one_day_interval > 0)
$campaigns_update = '';
$CPcount=0;
#############################################
##### Check if auto-dialing is enabled
$stmtA = "SELECT outbound_autodial_active FROM system_settings;";
$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;
$outbound_autodial_active = "$aryA[0]";
}
$sthA->finish();
##### Get a listing of the users that are active and ready to take calls
##### Also get a listing of the campaigns and campaigns/serverIP that will be used
$stmtA = "SELECT user,server_ip,campaign_id,conf_exten,status FROM vicidial_live_agents where status IN($active_agents) and server_ip='$server_ip' and last_update_time > '$BDtsSQLdate' order by last_call_time";
@@ -699,7 +714,7 @@ while($one_day_interval > 0)
$user_CIPct = 0;
foreach(@DBIPcampaign)
{
if ($DBIPdial_method[$user_CIPct] =~ /MANUAL|INBOUND_MAN/)
if ( ($DBIPdial_method[$user_CIPct] =~ /MANUAL|INBOUND_MAN/) || ($outbound_autodial_active < 1) )
{
$event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: MANUAL DIAL CAMPAIGN, NO DIALING";
&event_logger;
+34 -2
View File
@@ -308,7 +308,7 @@ while($one_day_interval > 0)
}
##### parse through all other important events #####
if ( ($input_lines[$ILcount] =~ /State: Ringing|State: Up|State: Dialing|Event: Newstate|Event: Hangup|Event: Newcallerid|Event: Shutdown/) && ($input_lines[$ILcount] !~ /ZOMBIE/) )
if ( ($input_lines[$ILcount] =~ /State: Ringing|State: Up|State: Dialing|Event: Newstate|Event: Hangup|Event: Newcallerid|Event: Shutdown|Event: CPD-Result/) && ($input_lines[$ILcount] !~ /ZOMBIE/) )
{
$input_lines[$ILcount] =~ s/^\n|^\n\n//gi;
@command_line=split(/\n/, $input_lines[$ILcount]);
@@ -552,7 +552,39 @@ while($one_day_interval > 0)
# }
# }
}
if ($input_lines[$ILcount] =~ /Event: CPD-Result/)
{
# Event: CPD-Result
# Privilege: system,all
# ChannelDriver: SIP
# Channel: SIP/paraxip-out-08291448
# CallerIDName: V0202034729000030735
# Uniqueid: 1233564450.141
# Result: Answering-Machine
if ( ($command_line[3] =~ /^Channel: /i) && ($command_line[5] =~ /^Uniqueid: /i) )
{
&get_time_now;
$channel = $command_line[3];
$channel =~ s/Channel: |\s*$//gi;
$callid = $command_line[4];
$callid =~ s/CallerIDName: |\s*$//gi;
$uniqueid = $command_line[5];
$uniqueid =~ s/Uniqueid: |\s*$//gi;
$result = $command_line[6];
$result =~ s/Result: |\s*$//gi;
if (length($result)>0)
{
$lead_id = substr($callid, 11, 9);
$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';";
print STDERR "|$stmtA|\n";
my $affected_rows = $dbhA->do($stmtA);
if($DB){print "|$affected_rows CPD_log inserted|\n";}
}
}
}
}
$ILcount++;
}