From af21d33a75e856e875f170498ea702b7e9d2e19c Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 6 May 2013 14:23:55 +0200 Subject: start_dtmf only if out-of-band DTMF is absend in SDP description --- misc/freeswitch/scripts/dialplan/sip_call.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 0cde601..f401c5c 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -233,11 +233,19 @@ function SipCall.fork(self, destinations, arg ) end if arg.detect_dtmf_after_bridge_caller and self.caller.auth_account then - session:execute('start_dtmf'); + if not string.match(self.caller:to_s('switch_r_sdp'), '101 telephone%-event') then + self.log:notice('FORK A_LEG inband dtmf detection - channel_uuid: ', session:get_uuid()); + session:execute('start_dtmf'); + end end + if arg.detect_dtmf_after_bridge_callee and destination.type == 'sipaccount' then - session_callee:execute('start_dtmf'); + if not string.match(tostring(session_callee:getVariable('switch_r_sdp')), '101 telephone%-event') then + self.log:notice('FORK B_LEG inband dtmf detection - channel_uuid: ', session_callee:get_uuid()); + session_callee:execute('start_dtmf'); + end end + if arg.bypass_media_network then local callee_uuid = session_callee:get_uuid(); -- cgit v1.2.3