diff options
author | Peter Kozak <spag@golwen.net> | 2013-05-06 14:23:55 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-05-06 14:23:55 +0200 |
commit | af21d33a75e856e875f170498ea702b7e9d2e19c (patch) | |
tree | ca6afc10dcc4df7a3f0619785e2b40fdef194b95 /misc/freeswitch/scripts/dialplan | |
parent | 590ef7db21af6bdf670f55b74afed478d9127492 (diff) |
start_dtmf only if out-of-band DTMF is absend in SDP description
Diffstat (limited to 'misc/freeswitch/scripts/dialplan')
-rw-r--r-- | misc/freeswitch/scripts/dialplan/sip_call.lua | 12 |
1 files 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(); |