[asterisk-commits] russell: trunk r52646 - in /trunk: ./ main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 29 14:27:35 MST 2007


Author: russell
Date: Mon Jan 29 15:27:34 2007
New Revision: 52646

URL: http://svn.digium.com/view/asterisk?view=rev&rev=52646
Log:
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)

........

Modified:
    trunk/   (props changed)
    trunk/main/rtp.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=52646&r1=52645&r2=52646
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Mon Jan 29 15:27:34 2007
@@ -3308,11 +3308,19 @@
 	 * |-----------|------------|-----------------------|
 	 * | 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;
 	}



More information about the asterisk-commits mailing list