Added agi-VDAD_inbound_calltime_check.agi script which gives the ability to have inbound IVR calls(before they have gotten to an in-group[queue]) to be in the vicidial_auto_calls table under the IVR status. Also gives the ability to use a calltime scheme for calls not yet in an in-group
Changes to AST_VDauto_dial.pl and FastAGI_log.pl scripts to accomodate the new IVR status in the vicidial_auto_calls table. Added a doc(Inbound_VDAC_IVR.txt) to explain this feature and give an example git-svn-id: svn://192.168.202.10@875 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
# 80402-0142 - added code for manual dial transfer duplicate check
|
||||
# 80430-1144 - added term_reason to vicidial_closer_log, QUEUETIMEOUT, AFTERHOURS
|
||||
# 80501-0515 - added after hours transfer in-group
|
||||
# 80525-1040 - added ability to convert IVR status inbound calls to LIVE in-group calls
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -700,10 +701,32 @@ if ($call_handle_method =~ /CLOSER|DIGITID$/)
|
||||
if ($AGILOG) {$agi_string = "-- VDXL : |$insert_lead_id|$insert_xfer_id|insert to vicidial_xfer_log"; &agi_output;}
|
||||
}
|
||||
|
||||
### insert a LIVE record to the vicidial_auto_calls table
|
||||
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,queue_priority) values('$VARserver_ip','$channel_group','LIVE','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0','$queue_priority')";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
### check for an IVR status record in vicidial_auto_calls
|
||||
$Uaffected_rows=0;
|
||||
$stmtA = "select auto_call_id from vicidial_auto_calls where uniqueid='$uniqueid' and server_ip='$VARserver_ip';";
|
||||
$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;
|
||||
$auto_call_id = "$aryA[0]";
|
||||
|
||||
### UPDATE existing record to LIVE in the vicidial_auto_calls table
|
||||
$stmtA = "UPDATE vicidial_auto_calls SET campaign_id='$channel_group',status='LIVE',lead_id='$insert_lead_id',callerid='$callerid',channel='$channel',phone_code='$phone_code',phone_number='$phone_number',call_time='$SQLdate',call_type='IN',stage='LIVE-0',queue_priority='$queue_priority' WHERE auto_call_id='$auto_call_id';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$Uaffected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($Uaffected_rows < 1)
|
||||
{
|
||||
### insert a LIVE record to the vicidial_auto_calls table
|
||||
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,queue_priority) values('$VARserver_ip','$channel_group','LIVE','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0','$queue_priority')";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
|
||||
$stmtA = "INSERT INTO vicidial_closer_log (lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,xfercallid) values('$insert_lead_id','$channel_group','$SQLdate','$now_date_epoch','QUEUE','$phone_code','$phone_number','VDCL','N','$insert_xfer_id')";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
|
||||
Reference in New Issue
Block a user