aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-20 20:27:45 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-20 20:27:45 +0000
commit62ed8d0e6dc9421be2d0bb7287ff38c7448357c8 (patch)
treeda7247f99786dacabf584d08336dd431a5df5cd7 /channels/chan_iax2.c
parentf3d699283df5929c3c91e6873dec74227cca037a (diff)
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.6 only audio codec bits 0-12 and 15 are defined, leaving bits 13-14 undefined. By default all bits are enabled unless specified otherwise. Since its a 2 byte field and 13-14 are not defined, these bits are never turned off. In trunk, bits 13-14 are defined, which means 1.6 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 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177698 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a5447022d..675b843d5 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -185,7 +185,7 @@ static int defaultsockfd = -1;
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 & \