From 79683313ae483fee0e4e78054a480c30c43155c8 Mon Sep 17 00:00:00 2001 From: mattf Date: Sat, 5 Nov 2011 04:59:32 +0000 Subject: [PATCH] Small changes to allow for field updating in call menus from transfers git-svn-id: svn://192.168.202.10@1752 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi | 12 ++++++++++++ agc_2-X/trunk/agi/cm.agi | 8 ++++++++ 2 files changed, 20 insertions(+) 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 502e4f1b..6e4b1b40 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -1037,6 +1037,8 @@ else $transfer_cid = $originalCID; if (length($action_xfer_cid) > 4) { + $PADlead_id = sprintf("%010s", $insert_lead_id); while (length($PADlead_id) > 10) {chop($PADlead_id);} + $XXqueryCID = "Y$CIDdate$PADlead_id"; if ($action_xfer_cid =~ /CAMPAIGN/) { $CIDcampaign_cid='0000000000'; @@ -1180,6 +1182,8 @@ if ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_ if ($after_hours_action =~ /CALLMENU/) { $newcallerid = "\"$VCcallerid <$transfer_cid>\""; + if ($action_xfer_cid =~ /CLOSER/) + {$newcallerid = "\"$XXqueryCID <$transfer_cid>\"";} $AGI->set_callerid($newcallerid); print STDERR "Setting CID \"$newcallerid\"\n"; checkresult($result); @@ -1432,6 +1436,8 @@ if ( ($no_agent_no_queue =~ /Y|NO_PAUSED/) || ($$MCnanque_override > 0) ) if ($no_agent_action =~ /CALLMENU/) { $newcallerid = "\"$VCcallerid <$transfer_cid>\""; + if ($action_xfer_cid =~ /CLOSER/) + {$newcallerid = "\"$XXqueryCID <$transfer_cid>\"";} $AGI->set_callerid($newcallerid); print STDERR "Setting CID \"$newcallerid\"\n"; checkresult($result); @@ -3635,6 +3641,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override if ($wait_time_option =~ /CALL_MENU/) { $newcallerid = "\"$VCcallerid <$transfer_cid>\""; + if ($action_xfer_cid =~ /CLOSER/) + {$newcallerid = "\"$XXqueryCID <$transfer_cid>\"";} $AGI->set_callerid($newcallerid); print STDERR "Setting CID \"$newcallerid\"\n"; checkresult($result); @@ -4043,6 +4051,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override if ($hold_time_option =~ /CALL_MENU/) { $newcallerid = "\"$VCcallerid <$transfer_cid>\""; + if ($action_xfer_cid =~ /CLOSER/) + {$newcallerid = "\"$XXqueryCID <$transfer_cid>\"";} $AGI->set_callerid($newcallerid); print STDERR "Setting CID \"$newcallerid\"\n"; checkresult($result); @@ -4434,6 +4444,8 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) ) if ($drop_action =~ /CALLMENU/) { $newcallerid = "\"$VCcallerid <$transfer_cid>\""; + if ($action_xfer_cid =~ /CLOSER/) + {$newcallerid = "\"$XXqueryCID <$transfer_cid>\"";} $AGI->set_callerid($newcallerid); print STDERR "Setting CID \"$newcallerid\"\n"; checkresult($result); diff --git a/agc_2-X/trunk/agi/cm.agi b/agc_2-X/trunk/agi/cm.agi index 857bcc47..c3111ed1 100644 --- a/agc_2-X/trunk/agi/cm.agi +++ b/agc_2-X/trunk/agi/cm.agi @@ -253,6 +253,14 @@ if ($outboundIVR > 0) if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $affected_rowsL = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VOIL insert: |$affected_rowsL|$uniqueid|$callerid|$campaign_id|$lead_id|$context|"; &agi_output;} + + if ( (length($field)>2) && ($vicidial_list_fields =~ /\|$field\|/) ) + { + $stmtA = "UPDATE vicidial_list SET $field='$dtmf' where lead_id='$lead_id';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $affected_rowsL = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VL update: |$affected_rowsL|$field|$dtmf|$lead_id|$context|"; &agi_output;} + } } elsif ($fieldUPDATE > 0) {