diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl index dd6469bc..466d11bc 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl @@ -106,6 +106,7 @@ # 110731-2127 - Added sections for handling MULTI_LEAD auto-alt-dial and na-call-url functions # 110809-1516 - Added section for noanswer logging # 110901-1125 - Added campaign areacode cid function +# 110922-1202 - Added logging of last calltime to campaign # @@ -467,7 +468,6 @@ while($one_day_interval > 0) $user_CIPct = 0; foreach(@DBIPcampaign) { - $debug_string=''; $user_counter=0; foreach(@DBlive_campaign) @@ -960,6 +960,7 @@ while($one_day_interval > 0) $user_CIPct = 0; foreach(@DBIPcampaign) { + $calls_placed=0; 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"; @@ -1224,6 +1225,7 @@ while($one_day_interval > 0) ### sleep for a five hundredths of a second to not flood the server with new calls # usleep(1*50*1000); usleep(1*$per_call_delay*1000); + $calls_placed++; } } $call_CMPIPct++; @@ -1232,6 +1234,12 @@ while($one_day_interval > 0) } } } + if ($calls_placed > 0) + { + $stmtA="UPDATE vicidial_campaigns SET campaign_calldate='$now_date' where campaign_id='$DBIPcampaign[$user_CIPct]';"; + $affected_rows = $dbhA->do($stmtA); + $calls_placed=0; + } $user_CIPct++; } diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl b/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl index b6937163..afe1fd56 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl @@ -31,6 +31,7 @@ # 100903-0041 - Changed lead_id max length to 10 digits # 101207-0713 - Added more info to Originate for rare VDAC issue # 110901-1127 - Added campaign areacode cid function +# 110922-1203 - Added logging of last calltime to campaign # ### begin parsing run-time options ### @@ -312,6 +313,7 @@ while($one_day_interval > 0) $camp_CIPct = 0; foreach(@DBfill_campaign) { + $calls_placed=0; $camp_counter=0; $DB_balance_fill=0; $VAC_balance_fill=0; @@ -817,6 +819,7 @@ while($one_day_interval > 0) ### insert a SENT record to the vicidial_auto_calls table $stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DB_camp_server_server_ip[$server_CIPct]','$DBfill_campaign[$camp_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUTBALANCE','$alt_dial','$DBIPqueue_priority[$camp_CIPct]')"; $affected_rows = $dbhA->do($stmtA); + $calls_placed++; } else { @@ -827,6 +830,7 @@ while($one_day_interval > 0) $st_logged[$staggered_ct] = "$phone_number|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$gmt_offset_now|$alt_dial|"; + $calls_placed++; $staggered_ct++; } @@ -970,6 +974,13 @@ while($one_day_interval > 0) $stmtA = "UPDATE vicidial_campaign_stats SET balance_trunk_fill='$temp_balance_total' where campaign_id='$DBfill_campaign[$camp_CIPct]';"; $affected_rows = $dbhA->do($stmtA); + if ($calls_placed > 0) + { + $stmtA="UPDATE vicidial_campaigns SET campaign_calldate='$now_date' where campaign_id='$DBfill_campaign[$camp_CIPct]';"; + $affected_rows = $dbhA->do($stmtA); + $calls_placed=0; + } + $camp_CIPct++; }