[asterisk-commits] mjordan: branch certified-11.2 r381401 - in /certified/branches/11.2: ./ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 14 09:08:21 CST 2013
Author: mjordan
Date: Thu Feb 14 09:08:15 2013
New Revision: 381401
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381401
Log:
Do not allow native RTP bridging if packetization of media streams differs.
The RTP engine will no longer allow for local and remote native RTP bridges
if packetization of streams differs. Allowing native bridging in this scenario
has been known to cause FAX failures.
(closes ASTERISK-20650)
Reported by: Maciej Krajewski
Patches:
ASTERISK-20659.patch uploaded by Mark Michelson (License #5049)
Review: https://reviewboard.asterisk.org/r/2319
........
Merged revisions 381281 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 381306 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
certified/branches/11.2/ (props changed)
certified/branches/11.2/main/rtp_engine.c
Propchange: certified/branches/11.2/
------------------------------------------------------------------------------
--- branch-11-merged (original)
+++ branch-11-merged Thu Feb 14 09:08:15 2013
@@ -1,1 +1,1 @@
-/branches/11:378038,378287,378321,378409-378411,378582,378687,378690
+/branches/11:378038,378287,378321,378409-378411,378582,378687,378690,381306
Modified: certified/branches/11.2/main/rtp_engine.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.2/main/rtp_engine.c?view=diff&rev=381401&r1=381400&r2=381401
==============================================================================
--- certified/branches/11.2/main/rtp_engine.c (original)
+++ certified/branches/11.2/main/rtp_engine.c Thu Feb 14 09:08:15 2013
@@ -1460,6 +1460,7 @@
struct ast_format_cap *cap0 = ast_format_cap_alloc_nolock();
struct ast_format_cap *cap1 = ast_format_cap_alloc_nolock();
int unlock_chans = 1;
+ int read_ptime0, read_ptime1, write_ptime0, write_ptime1;
if (!cap0 || !cap1) {
unlock_chans = 0;
@@ -1564,6 +1565,18 @@
ast_debug(1, "Channel codec0 = %s is not codec1 = %s, cannot native bridge in RTP.\n",
ast_getformatname_multiple(tmp0, sizeof(tmp0), cap0),
ast_getformatname_multiple(tmp1, sizeof(tmp1), cap1));
+ res = AST_BRIDGE_FAILED_NOWARN;
+ goto done;
+ }
+
+ read_ptime0 = (ast_codec_pref_getsize(&instance0->codecs.pref, ast_channel_rawreadformat(c0))).cur_ms;
+ read_ptime1 = (ast_codec_pref_getsize(&instance1->codecs.pref, ast_channel_rawreadformat(c1))).cur_ms;
+ write_ptime0 = (ast_codec_pref_getsize(&instance0->codecs.pref, ast_channel_rawwriteformat(c0))).cur_ms;
+ write_ptime1 = (ast_codec_pref_getsize(&instance1->codecs.pref, ast_channel_rawwriteformat(c1))).cur_ms;
+
+ if (read_ptime0 != write_ptime1 || read_ptime1 != write_ptime0) {
+ ast_debug(1, "Packetization differs between RTP streams (%d != %d or %d != %d). Cannot native bridge in RTP\n",
+ read_ptime0, write_ptime1, read_ptime1, write_ptime0);
res = AST_BRIDGE_FAILED_NOWARN;
goto done;
}
More information about the asterisk-commits
mailing list