diff options
author | Alexander Traud <pabstraud@compuserve.com> | 2015-10-26 17:42:03 +0100 |
---|---|---|
committer | Alexander Traud <pabstraud@compuserve.com> | 2015-10-26 11:46:48 -0500 |
commit | 1256aedf66b062c011959c422df1fa08e9f55522 (patch) | |
tree | bff20a46b1c2f87774ee06e222fa602c3c10f9f9 /channels | |
parent | 31f13a1e930c62d49e713fca3f3978f26a9b2954 (diff) |
chan_sip: Do not send all codecs on INVITE.
Since version 13, Asterisk sent all allowed codecs as callee, even when the
caller did not request/support them. In case of dynamic RTP payloads, this led
to the same ID for different codecs, which is not allowed by SIP/SDP. Now, the
intersection between the requested and the supported codecs is send again.
ASTERISK-24543 #close
Change-Id: Ie90cb8bf893b0895f8d505e77343de3ba152a287
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8a7ca5454..f28296627 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13332,7 +13332,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int } /* Finally our remaining audio/video codecs */ - for (x = 0; x < ast_format_cap_count(p->caps); x++) { + for (x = 0; ast_test_flag(&p->flags[0], SIP_OUTGOING) && x < ast_format_cap_count(p->caps); x++) { tmp_fmt = ast_format_cap_get_format(p->caps, x); if (ast_format_cap_iscompatible_format(alreadysent, tmp_fmt) != AST_FORMAT_CMP_NOT_EQUAL) { |