From ef19d69c6b11e77b9fcf70b9be661364bf63516c Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Tue, 30 Jun 2020 10:40:47 -0500 Subject: [PATCH] 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 --- res/res_pjsip_sdp_rtp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);