From: Kevin Harwell Date: Tue, 30 Jun 2020 15:40:47 +0000 (-0500) Subject: PJSIP_MEDIA_OFFER: override what's specified on configuration X-Git-Tag: 13.35.0-rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef19d69c6b11e77b9fcf70b9be661364bf63516c;p=thirdparty%2Fasterisk.git PJSIP_MEDIA_OFFER: override what's specified on configuration When using the PSJIP_MEDIA_OFFER dialplan function it was not overriding an endpoint's configured codecs unless they had a shared codec between the two. This patch makes it so whatever is set using PJSIP_MEDIA_OFFER is used when creating the SDP definition no matter what. ASTERISK-28878 #close Change-Id: I0f7dc86fd0fb607c308e6f98ede303c54d1eacb6 --- diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index 25fbdec3de..77a2803cfa 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -1319,8 +1319,7 @@ static int create_outgoing_sdp_stream(struct ast_sip_session *session, struct as if (direct_media_enabled) { ast_format_cap_get_compatible(session->endpoint->media.codecs, session->direct_media_cap, caps); - } else if (!ast_format_cap_count(session->req_caps) || - !ast_format_cap_iscompatible(session->req_caps, session->endpoint->media.codecs)) { + } else if (!ast_format_cap_count(session->req_caps)) { ast_format_cap_append_from_cap(caps, session->endpoint->media.codecs, media_type); } else { ast_format_cap_append_from_cap(caps, session->req_caps, media_type);