[asterisk-commits] file: branch 1.8 r401497 - /branches/1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 23 06:10:22 CDT 2013


Author: file
Date: Wed Oct 23 06:10:19 2013
New Revision: 401497

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401497
Log:
Fix an issue where an incompatible audio format may be added to SDP.

If preferred codecs included any non-audio format the code would
mistakenly add the audio format, even if it was not a joint capability
with the remote side.

(closes issue ASTERISK-21131)
Reported by: nbougues
Patches:
	patch_unsupported_codec_1.8.patch uploaded by nbougues (license 6470)

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=401497&r1=401496&r2=401497
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Wed Oct 23 06:10:19 2013
@@ -11949,7 +11949,7 @@
 		/* Prefer the audio codec we were requested to use, first, no matter what
 		   Note that p->prefcodec can include video codecs, so mask them out
 		*/
-		if (capability & p->prefcodec) {
+		if ((capability & p->prefcodec) & AST_FORMAT_AUDIO_MASK) {
 			format_t codec = p->prefcodec & AST_FORMAT_AUDIO_MASK;
 
 			add_codec_to_sdp(p, codec, &m_audio, &a_audio, debug, &min_audio_packet_size);




More information about the asterisk-commits mailing list