diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi index cfc5faec..6ec2e92a 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -405,9 +405,9 @@ if ($call_handle_method =~ /^CLOSER/) $callerid = $JqueryCID; $VCcallerid = $JqueryCID; ### set the new call callerid to track the call - print "SET CALLERID $JqueryCID\n"; - checkresult($result); - if ($AGILOG) {$agi_string = "callerID changed: $JqueryCID"; &agi_output;} + $Jnewcallerid = "\"$JqueryCID <$phone_number>\""; + $AGI->set_callerid($Jnewcallerid); + if ($AGILOG) {$agi_string = "callerID changed: $Jnewcallerid"; &agi_output;} } } @@ -1189,9 +1189,9 @@ $YqueryCID = "Y$CIDdate$PADlead_id"; $callerid = $YqueryCID; $VCcallerid = $YqueryCID; ### set the callerid -print "SET CALLERID $YqueryCID\n"; -checkresult($result); -if ($AGILOG) {$agi_string = "callerID changed: $YqueryCID"; &agi_output;} +$Ynewcallerid = "\"$YqueryCID <$originalCID>\""; +$AGI->set_callerid($Ynewcallerid); +if ($AGILOG) {$agi_string = "callerID changed: $Ynewcallerid"; &agi_output;} if ($call_handle_method =~ /DIGITID$/) { diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_outbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_outbound.agi index 6db9b421..5f6a07ae 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_outbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_outbound.agi @@ -1573,6 +1573,11 @@ while ($drop_timer <= $DROP_TIME) $newcallerid = "\"$callerid $eac_extension <$phone_number>\""; $AGI->set_callerid($newcallerid); } + else + { + $newcallerid = "\"$callerid <$phone_number>\""; + $AGI->set_callerid($newcallerid); + } } $stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer', extension='$VDADconf_exten' where callerid='$callerid';"; @@ -1857,6 +1862,11 @@ while ($drop_timer <= $DROP_TIME) $newcallerid = "\"$callerid $eac_extension <$phone_number>\""; $AGI->set_callerid($newcallerid); } + else + { + $newcallerid = "\"$callerid <$phone_number>\""; + $AGI->set_callerid($newcallerid); + } } $VDADremDIALstr .= "$VDADconf_exten"; diff --git a/agc_2-X/trunk/bin/FastAGI_log.pl b/agc_2-X/trunk/bin/FastAGI_log.pl index 6c28531b..47f2d57c 100644 --- a/agc_2-X/trunk/bin/FastAGI_log.pl +++ b/agc_2-X/trunk/bin/FastAGI_log.pl @@ -670,32 +670,31 @@ sub process_request } $sthA->finish(); } - - ### BEGIN Double-log end logging ### - $DOUBLEunique_id = $unique_id . "99"; - $stmtA = "SELECT start_epoch FROM call_log where uniqueid='$DOUBLEunique_id' and channel_group='DOUBLE_LOG' order by start_time desc limit 1;"; - $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; - $DOUBLEstart_epoch = $aryA[0]; - - $DOUBLElength_in_sec = ($now_date_epoch - $DOUBLEstart_epoch); - $DOUBLElength_in_min = ($DOUBLElength_in_sec / 60); - $DOUBLElength_in_min = sprintf("%8.2f", $DOUBLElength_in_min); - - $stmtA = "UPDATE call_log set end_time='$now_date',end_epoch='$now_date_epoch',length_in_sec=$DOUBLElength_in_sec,length_in_min='$DOUBLElength_in_min' where uniqueid='$DOUBLEunique_id' and channel_group='DOUBLE_LOG' order by start_time desc limit 1"; - - if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} - $affected_rowsDB = $dbhA->do($stmtA); - - if ($AGILOG) {$agi_string = "DOUBLE QUERY done: start time = $DOUBLEstart_epoch | sec: $DOUBLElength_in_sec | min: $DOUBLElength_in_min |$affected_rowsDB"; &agi_output;} - } - $sthA->finish(); - ### END Double-log end logging ### } + ### BEGIN Double-log end logging ### + $DOUBLEunique_id = $unique_id . "99"; + $stmtA = "SELECT start_epoch FROM call_log where uniqueid='$DOUBLEunique_id' and channel_group='DOUBLE_LOG' order by start_time desc limit 1;"; + $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; + $DOUBLEstart_epoch = $aryA[0]; + + $DOUBLElength_in_sec = ($now_date_epoch - $DOUBLEstart_epoch); + $DOUBLElength_in_min = ($DOUBLElength_in_sec / 60); + $DOUBLElength_in_min = sprintf("%8.2f", $DOUBLElength_in_min); + + $stmtA = "UPDATE call_log set end_time='$now_date',end_epoch='$now_date_epoch',length_in_sec=$DOUBLElength_in_sec,length_in_min='$DOUBLElength_in_min' where uniqueid='$DOUBLEunique_id' and channel_group='DOUBLE_LOG' order by start_time desc limit 1"; + + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $affected_rowsDB = $dbhA->do($stmtA); + + if ($AGILOG) {$agi_string = "DOUBLE QUERY done: start time = $DOUBLEstart_epoch | sec: $DOUBLElength_in_sec | min: $DOUBLElength_in_min |$affected_rowsDB"; &agi_output;} + } + $sthA->finish(); + ### END Double-log end logging ### $stmtA = "DELETE from live_inbound where uniqueid IN('$unique_id','$CALLunique_id') and server_ip='$VARserver_ip'"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}