]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
We can not reliably do P2P bridging with DTMF passing back with compensation if we...
authorJoshua Colp <jcolp@digium.com>
Wed, 7 Feb 2007 17:53:03 +0000 (17:53 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 7 Feb 2007 17:53:03 +0000 (17:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53434 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 78349f23671c3be10a6317f04d24dbfeaeee2d79..b3731a3e7dcffc6d23a954f2d91ee24b1bc414f8 100644 (file)
@@ -3227,6 +3227,14 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel
                audio_p1_res = AST_RTP_TRY_PARTIAL;
        }
 
+       /* If the core will need to compensate and the P2P bridge will need to feed up DTMF frames then we can not reliably do so yet, so do not P2P bridge */
+       if ((audio_p0_res == AST_RTP_TRY_PARTIAL && ast_test_flag(p0, FLAG_P2P_NEED_DTMF) && ast_test_flag(p0, FLAG_DTMF_COMPENSATE)) ||
+           (audio_p1_res == AST_RTP_TRY_PARTIAL && ast_test_flag(p1, FLAG_P2P_NEED_DTMF) && ast_test_flag(p1, FLAG_DTMF_COMPENSATE))) {
+               ast_channel_unlock(c0);
+               ast_channel_unlock(c1);
+               return AST_BRIDGE_FAILED_NOWARN;
+       }
+
        /* Get codecs from both sides */
        codec0 = pr0->get_codec ? pr0->get_codec(c0) : 0;
        codec1 = pr1->get_codec ? pr1->get_codec(c1) : 0;