[asterisk-commits] dvossel: branch 1.4 r177696 - in /branches/1.4: channels/ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 20 14:17:37 CST 2009


Author: dvossel
Date: Fri Feb 20 14:17:37 2009
New Revision: 177696

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=177696
Log:
Fixes issue with undefined audio codecs in chan_iax2

During iax2 call negotiation, supported codecs are passed in an Information Element containing a 2 byte field where each bit correlates to a specific codec.  In 1.4 only audio codec bits 0-12 are defined, leaving bits 13-15 undefined.  By default all bits are enabled unless specified otherwise.  Since its a 2 byte field and 13-15 are not defined, these bits are never turned off.  In trunk, bits 13-15 are defined, which means 1.4 is advertising support for codecs it does not have when talking to trunk.  I fixed this by adding #define for undefined audio codec bits.  These bits are then removed from iax2's full bandwidth capabilities.   

(closes issue #14283)
Reported by: jcovert


Modified:
    branches/1.4/channels/chan_iax2.c
    branches/1.4/include/asterisk/frame.h

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=177696&r1=177695&r2=177696
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Fri Feb 20 14:17:37 2009
@@ -175,7 +175,7 @@
 int (*iax2_regfunk)(const char *username, int onoff) = NULL;
 
 /* Ethernet, etc */
-#define IAX_CAPABILITY_FULLBANDWIDTH 	0xFFFF
+#define IAX_CAPABILITY_FULLBANDWIDTH 	(0xFFFF & ~AST_FORMAT_AUDIO_UNDEFINED)
 /* T1, maybe ISDN */
 #define IAX_CAPABILITY_MEDBANDWIDTH 	(IAX_CAPABILITY_FULLBANDWIDTH & 	\
 					 ~AST_FORMAT_SLINEAR &			\

Modified: branches/1.4/include/asterisk/frame.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/include/asterisk/frame.h?view=diff&rev=177696&r1=177695&r2=177696
==============================================================================
--- branches/1.4/include/asterisk/frame.h (original)
+++ branches/1.4/include/asterisk/frame.h Fri Feb 20 14:17:37 2009
@@ -260,6 +260,8 @@
 #define AST_FORMAT_G726		(1 << 11)
 /*! G.722 */
 #define AST_FORMAT_G722		(1 << 12)
+/*! Unsupported audio bits */
+#define AST_FORMAT_AUDIO_UNDEFINED	((1 << 13) | (1 << 14) | (1 << 15))
 /*! Maximum audio format */
 #define AST_FORMAT_MAX_AUDIO	(1 << 15)
 /*! Maximum audio mask */




More information about the asterisk-commits mailing list