From: Joshua Colp Date: Thu, 17 May 2007 16:10:12 +0000 (+0000) Subject: Even more direct RTP setup fixes! Don't allow a codec that isn't supported to creep... X-Git-Tag: 1.4.5~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a8ca5425727faea5be7213509e3d21ca8f32b48;p=thirdparty%2Fasterisk.git Even more direct RTP setup fixes! Don't allow a codec that isn't supported to creep into the SDP of either side. (issue #9446 reported by marcelbarbulescu) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@64754 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 34bccdee09..6e76977876 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -17024,6 +17024,11 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc p->redircodecs = codecs; changed = 1; } + if ((p->capability & codecs) != p->capability) { + p->jointcapability &= codecs; + p->capability &= codecs; + changed = 1; + } if (changed && !ast_test_flag(&p->flags[0], SIP_GOTREFER)) { if (chan->_state != AST_STATE_UP) { /* We are in early state */ if (!ast_test_flag(&p->flags[0], SIP_NO_HISTORY))