aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-17 16:10:12 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-17 16:10:12 +0000
commitae4d14ea313841a649f7a16d13a51692128df6c6 (patch)
tree7faf5ea60cf1e748b1d4e2d4ad77d0bb531a024f /channels
parent2509b36b1bd37aee2dd287cc142b370afc77a1e9 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@64754 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 34bccdee0..6e7697787 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))