From: Alexander Traud Date: Sat, 21 Oct 2017 08:44:21 +0000 (+0200) Subject: chan_sip: Crypto attribute not last but first on SDP media level. X-Git-Tag: 13.19.0-rc1~196^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7a9a6ef0c3a974b7626a15cf23507665ade039f;p=thirdparty%2Fasterisk.git chan_sip: Crypto attribute not last but first on SDP media level. This matches the behavior of the other SIP channel driver, chan_pjsip. ASTERISK-27365 Change-Id: I8f23a51290a58b75816da2999ed1965441dfc5d6 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 120bdd10b9..edaa387580 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13806,11 +13806,11 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int case SDP_AUDIO: if (needaudio) { add_content(resp, ast_str_buffer(m_audio)); - add_content(resp, ast_str_buffer(a_audio)); - add_content(resp, hold); if (a_crypto) { add_content(resp, a_crypto); } + add_content(resp, ast_str_buffer(a_audio)); + add_content(resp, hold); } else { add_content(resp, offer->decline_m_line); } @@ -13856,11 +13856,11 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int /* generate new SDP from scratch, no offers */ if (needaudio) { add_content(resp, ast_str_buffer(m_audio)); - add_content(resp, ast_str_buffer(a_audio)); - add_content(resp, hold); if (a_crypto) { add_content(resp, a_crypto); } + add_content(resp, ast_str_buffer(a_audio)); + add_content(resp, hold); } if (needvideo) { /* only if video response is appropriate */ add_content(resp, ast_str_buffer(m_video));