several fixes to the ALL inbound AGI script
git-svn-id: svn://192.168.202.10@697 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -75,7 +75,7 @@ $start_time=$now_date;
|
||||
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$SQLdateBEGIN = $SQLdate;
|
||||
|
||||
$BDtarget = ($secX - 5);
|
||||
$BDtarget = ($now_date_epoch - 5);
|
||||
($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);
|
||||
$Byear = ($Byear + 1900);
|
||||
$Bmon++;
|
||||
@@ -255,10 +255,10 @@ if ($call_handle_method =~ /^CID/)
|
||||
if (length($callerid)<10) {$callerid = $parked_by;}
|
||||
if (length($pin)>0) {$callerid = $pin;}
|
||||
|
||||
$phone_number='';
|
||||
|
||||
if ($call_handle_method =~ /^ANI/)
|
||||
{
|
||||
$phone_number='';
|
||||
### allow for external ANI to be collected on older RBS T1 circuits
|
||||
if ($extension =~ /\*\d\d\d\d\d\d\d\d\d\d\*/)
|
||||
{
|
||||
@@ -411,13 +411,13 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds' where lead_id = '$new_lead_id' order by start_epoch desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_list set status='XDROP' where lead_id = '$new_lead_id';";
|
||||
$stmtA = "UPDATE vicidial_list set status='XDROP' where lead_id = '$insert_lead_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
if ($after_hours_action =~ /HANGUP/)
|
||||
{
|
||||
@@ -465,7 +465,6 @@ if ($call_handle_method =~ /LOOKUP/)
|
||||
|
||||
$cbc=0;
|
||||
$stmtA= "SELECT lead_id from vicidial_list where phone_number='$phone_number' $listSQL order by modify_date limit 1;";
|
||||
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -516,7 +515,6 @@ else
|
||||
$campaign = "$channel_group";
|
||||
$phone_number = "$aryA[0]";
|
||||
$phone_code = "$aryA[1]";
|
||||
$VDADlead_id = "$CIDlead_id";
|
||||
$insert_lead_id = "$CIDlead_id";
|
||||
$fronter = "$aryA[2]";
|
||||
$cbc++;
|
||||
@@ -561,10 +559,10 @@ $sthArows=$sthA->rows;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$new_lead_id = $insert_lead_id;
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|$new_lead_id|"; &agi_output;}
|
||||
$insert_lead_id = $insert_lead_id;
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|$insert_lead_id|"; &agi_output;}
|
||||
|
||||
$PADlead_id = sprintf("%09s", $new_lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
|
||||
$PADlead_id = sprintf("%09s", $insert_lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
|
||||
# YmmddhhmmssLLLLLLLLL
|
||||
$YqueryCID = "Y$CIDdate$PADlead_id";
|
||||
$callerid = $YqueryCID;
|
||||
@@ -575,30 +573,28 @@ if ($AGILOG) {$agi_string = "callerID changed: $YqueryCID"; &agi_output;}
|
||||
|
||||
if ($call_handle_method =~ /DIGITID$/)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$new_lead_id','$channel_group','$SQLdate','$now_date_epoch','XFER','$phone_code','$phone_number','$fronter','N')";
|
||||
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$insert_lead_id','$channel_group','$SQLdate','$now_date_epoch','XFER','$phone_code','$phone_number','$fronter','N')";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD : |$new_lead_id|$fronter|insert to vicidial_log: $uniqueid"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDAD : |$insert_lead_id|$fronter|insert to vicidial_log: $uniqueid"; &agi_output;}
|
||||
}
|
||||
if ($call_handle_method =~ /CLOSER|DIGITID$/)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_xfer_log (lead_id,campaign_id,call_date,phone_code,phone_number,user,closer) values('$new_lead_id','$channel_group','$SQLdate','$phone_code','$phone_number','$fronter','VDXL')";
|
||||
$stmtA = "INSERT INTO vicidial_xfer_log (lead_id,campaign_id,call_date,phone_code,phone_number,user,closer) values('$insert_lead_id','$channel_group','$SQLdate','$phone_code','$phone_number','$fronter','VDXL')";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDXL : |$new_lead_id|insert to vicidial_xfer_log"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDXL : |$insert_lead_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) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
|
||||
$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) values('$VARserver_ip','$channel_group','LIVE','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
|
||||
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) values('$new_lead_id','$channel_group','$SQLdate','$now_date_epoch','QUEUE','$phone_code','$phone_number','VDCL','N')";
|
||||
$stmtA = "INSERT INTO vicidial_closer_log (lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$insert_lead_id','$channel_group','$SQLdate','$now_date_epoch','QUEUE','$phone_code','$phone_number','VDCL','N')";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL : |$new_lead_id|insert to vicidial_closer_log"; &agi_output;}
|
||||
|
||||
$VDADlead_id = $new_lead_id;
|
||||
if ($AGILOG) {$agi_string = "-- VDCL : |$insert_lead_id|insert to vicidial_closer_log"; &agi_output;}
|
||||
|
||||
$drop_timer=0;
|
||||
$drop_seconds=0;
|
||||
@@ -637,7 +633,7 @@ if ($channel_status < 1)
|
||||
##### Attempt to send call to an agent on this server only #####
|
||||
if ($agent_search_method =~ /^SO|^LO/)
|
||||
{
|
||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$VDADlead_id';";
|
||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -653,7 +649,7 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
|
||||
if ($rec_countWAIT < 1)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$insert_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||
my $affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;}
|
||||
if ($affected_rows > 0)
|
||||
@@ -682,7 +678,7 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
|
||||
if ($affected_rows < 1)
|
||||
{
|
||||
$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) values('$VARserver_ip','$channel_group','CLOSER','$CIDlead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
|
||||
$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) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "$affected_rows|VDAC-reinsert|$stmtA|"; &agi_output;}
|
||||
}
|
||||
@@ -690,14 +686,14 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
|
||||
if ($call_handle_method =~ /CLOSER|DIGITID$/)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_xfer_log set closer='$VDADuser' where lead_id = '$new_lead_id' order by call_date desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_xfer_log set closer='$VDADuser' where lead_id = '$insert_lead_id' order by call_date desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDXL XFER vicidial_xfer_log update: |$affected_rows|$new_lead_id|$VDADuser\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDXL XFER vicidial_xfer_log update: |$affected_rows|$insert_lead_id|$VDADuser\n|$stmtA|"; &agi_output;}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set user='$VDADuser' where lead_id='$new_lead_id' order by call_date desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_closer_log set user='$VDADuser' where lead_id='$insert_lead_id' order by call_date desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- closer log : |$affected_rows|$new_lead_id\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- closer log : |$affected_rows|$insert_lead_id\n|$stmtA|"; &agi_output;}
|
||||
|
||||
### if agent alert exten is not disabled, then trigger the alert and wait
|
||||
if ($agent_alert_exten !~ /X/i)
|
||||
@@ -729,9 +725,9 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set queue_seconds='$drop_timer' where lead_id = '$new_lead_id' and call_date='$SQLdate';";
|
||||
$stmtA = "UPDATE vicidial_closer_log set queue_seconds='$drop_timer' where lead_id = '$insert_lead_id' and call_date='$SQLdate';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
@@ -759,7 +755,7 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
##### Attempt to send call to an agent on any server #####
|
||||
$cbc=0;
|
||||
$rec_countWAITrem=0;
|
||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$VDADlead_id';";
|
||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -774,7 +770,7 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
|
||||
if ($rec_countWAITrem < 1)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$insert_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||
my $affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$affected_rows|update of vla table: $channel_group|\n|$stmtA|"; &agi_output;}
|
||||
if ($affected_rows > 0)
|
||||
@@ -802,18 +798,18 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
if ($AGILOG) {$agi_string = "-- VDCL XFER REMOTE: |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
|
||||
if ($affected_rows < 1)
|
||||
{
|
||||
$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) values('$VARserver_ip','$channel_group','CLOSER','$CIDlead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
|
||||
$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) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "$affected_rows|VDAC-reinsert|$stmtA|"; &agi_output;}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_xfer_log set closer='$VDADuser' where lead_id = '$new_lead_id' order by call_date desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_xfer_log set closer='$VDADuser' where lead_id = '$insert_lead_id' order by call_date desc limit 1;";
|
||||
my $affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDXL vicidial_xfer_log update: |$affected_rows|$new_lead_id|$VDADuser\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDXL vicidial_xfer_log update: |$affected_rows|$insert_lead_id|$VDADuser\n|$stmtA|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set user='$VDADuser' where lead_id='$new_lead_id' order by call_date desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_closer_log set user='$VDADuser' where lead_id='$insert_lead_id' order by call_date desc limit 1;";
|
||||
my $affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- closer log : |$affected_rows|update of vcl table: $new_lead_id\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- closer log : |$affected_rows|update of vcl table: $insert_lead_id\n|$stmtA|"; &agi_output;}
|
||||
|
||||
### format the remote server dialstring to get the call to the overflow agent meetme room
|
||||
$S='*';
|
||||
@@ -859,9 +855,9 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set queue_seconds='$drop_timer' where lead_id = '$new_lead_id' and call_date='$SQLdate';";
|
||||
$stmtA = "UPDATE vicidial_closer_log set queue_seconds='$drop_timer' where lead_id = '$insert_lead_id' and call_date='$SQLdate';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
@@ -920,7 +916,7 @@ $stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($affected_rows < 1)
|
||||
{
|
||||
$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) values('$VARserver_ip','$channel_group','CLOSER','$CIDlead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
|
||||
$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) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "$affected_rows|VDAC-reinsert|$stmtA|"; &agi_output;}
|
||||
}
|
||||
@@ -1000,13 +996,13 @@ if ($drop_seconds < 1)
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds' where lead_id = '$new_lead_id' order by start_epoch desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_list set status='XDROP' where lead_id = '$new_lead_id';";
|
||||
$stmtA = "UPDATE vicidial_list set status='XDROP' where lead_id = '$insert_lead_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$new_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
}
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
Reference in New Issue
Block a user