mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 02:18:15 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@177698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -185,7 +185,7 @@ static int defaultsockfd = -1;
|
|||||||
int (*iax2_regfunk)(const char *username, int onoff) = NULL;
|
int (*iax2_regfunk)(const char *username, int onoff) = NULL;
|
||||||
|
|
||||||
/* Ethernet, etc */
|
/* Ethernet, etc */
|
||||||
#define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF
|
#define IAX_CAPABILITY_FULLBANDWIDTH (0xFFFF & ~AST_FORMAT_AUDIO_UNDEFINED)
|
||||||
/* T1, maybe ISDN */
|
/* T1, maybe ISDN */
|
||||||
#define IAX_CAPABILITY_MEDBANDWIDTH (IAX_CAPABILITY_FULLBANDWIDTH & \
|
#define IAX_CAPABILITY_MEDBANDWIDTH (IAX_CAPABILITY_FULLBANDWIDTH & \
|
||||||
~AST_FORMAT_SLINEAR & \
|
~AST_FORMAT_SLINEAR & \
|
||||||
|
|||||||
@@ -267,6 +267,8 @@ extern struct ast_frame ast_null_frame;
|
|||||||
#define AST_FORMAT_G726 (1 << 11)
|
#define AST_FORMAT_G726 (1 << 11)
|
||||||
/*! G.722 */
|
/*! G.722 */
|
||||||
#define AST_FORMAT_G722 (1 << 12)
|
#define AST_FORMAT_G722 (1 << 12)
|
||||||
|
/*! Unsupported audio bits */
|
||||||
|
#define AST_FORMAT_AUDIO_UNDEFINED ((1 << 13) | (1 << 14))
|
||||||
/*! Raw 16-bit Signed Linear (16000 Hz) PCM */
|
/*! Raw 16-bit Signed Linear (16000 Hz) PCM */
|
||||||
#define AST_FORMAT_SLINEAR16 (1 << 15)
|
#define AST_FORMAT_SLINEAR16 (1 << 15)
|
||||||
/*! Maximum audio mask */
|
/*! Maximum audio mask */
|
||||||
|
|||||||
Reference in New Issue
Block a user