diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-01-29 21:27:34 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-01-29 21:27:34 +0000 |
commit | 2d0e8864aa9b685540221c01960559d236550691 (patch) | |
tree | c96b988851ff7295c3a513633d4cf0848f1c15ef /main | |
parent | a1d764c00afaf19d65dd4d983e2a31f3db234d3b (diff) |
Merged revisions 52645 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r52645 | russell | 2007-01-29 15:26:27 -0600 (Mon, 29 Jan 2007) | 6 lines
Fix a problem with packet-to-packet bridging and DTMF mode translation. P2P
bridging can only be used when the DTMF modes don't match if the core is
monitoring DTMF in both directions. Then, the core will handle the translation.
Otherwise, this bridging method can not be used.
(issue #8936)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/rtp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c index ba5e11dae..709fef56c 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -3308,11 +3308,19 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel * |-----------|------------|-----------------------| * | Inband | False | True | * | RFC2833 | True | True | - * | SIP Info | False | False | + * | SIP INFO | False | False | * -------------------------------------------------- + * However, if DTMF from both channels is being monitored by the core, then + * we can still do packet-to-packet bridging, because passing through the + * core will handle DTMF mode translation. */ if ( (ast_test_flag(p0, FLAG_HAS_DTMF) != ast_test_flag(p1, FLAG_HAS_DTMF)) || (!c0->tech->send_digit_begin != !c1->tech->send_digit_begin)) { + if (!ast_test_flag(p0, FLAG_P2P_NEED_DTMF) || !ast_test_flag(p1, FLAG_P2P_NEED_DTMF)) { + ast_channel_unlock(c0); + ast_channel_unlock(c1); + return AST_BRIDGE_FAILED_NOWARN; + } audio_p0_res = AST_RTP_TRY_PARTIAL; audio_p1_res = AST_RTP_TRY_PARTIAL; } |