From 3c9a7470a675a7544a769bef5d4ff0ba0558533d Mon Sep 17 00:00:00 2001 From: mattf Date: Sat, 3 Jan 2009 08:15:00 +0000 Subject: [PATCH] Added sip-silence playback before transfers in inbound AGI to fix MoH issue git-svn-id: svn://192.168.202.10@1027 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi | 19 +++++++++++++++++++ 1 file changed, 19 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 31d38b8e..be417de9 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -89,6 +89,7 @@ # 81024-0006 - Changed LOOKUP to insert new lead if phone_number < 3 digits, changed queue_sec calculation # 81104-0301 - Changed code to alter callerIDnumber for remote agents to the number of the caller # 81105-0248 - Added MySQL error logging +# 90103-0311 - Added sip-silences before transfers to fix rare MoH issues # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -948,6 +949,9 @@ $hold_message_counter=($prompt_interval - 10); $hold_tone_counter=0; + + + ############################################ ### Loop to try to send call to an agent ### while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) @@ -1266,6 +1270,9 @@ if ($agent_search_method =~ /^SO|^LO/) $dbhP=$dbhA; $mysql_count='02052'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|$insert_close_id|\n|$stmtA|"; &agi_output;} + $AGI->stream_file('sip-silence'); + $AGI->stream_file('sip-silence'); + print "SET CONTEXT $ext_context\n"; checkresult($result); print "SET EXTENSION $VDADconf_exten\n"; @@ -1595,6 +1602,9 @@ if ($agent_search_method =~ /^LO|^LB/) $dbhP=$dbhA; $mysql_count='02072'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;} + $AGI->stream_file('sip-silence'); + $AGI->stream_file('sip-silence'); + print "SET CONTEXT $ext_context\n"; checkresult($result); print "SET EXTENSION $VDADremDIALstr\n"; @@ -1720,6 +1730,9 @@ if ($hold_recall_xfer_group !~ /NONE/) $dbhB->disconnect(); } + $AGI->stream_file('sip-silence'); + $AGI->stream_file('sip-silence'); + if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;} print "SET CONTEXT $ext_context\n"; checkresult($result); @@ -2128,6 +2141,9 @@ if ($wait_in_queue < 1) $dbhB->disconnect(); } + $AGI->stream_file('sip-silence'); + $AGI->stream_file('sip-silence'); + if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;} print "SET CONTEXT $ext_context\n"; checkresult($result); @@ -2289,6 +2305,9 @@ if ($AGILOG) {$agi_string = "-- VDCL DROP: |$drop_action|$DROPexten|"; &agi sleep(1); } + $AGI->stream_file('sip-silence'); + $AGI->stream_file('sip-silence'); + if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;} print "SET CONTEXT $ext_context\n"; checkresult($result);