]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
PJSIP_MEDIA_OFFER: override what's specified on configuration
authorKevin Harwell <kharwell@digium.com>
Tue, 30 Jun 2020 15:40:47 +0000 (10:40 -0500)
committerJoshua Colp <jcolp@sangoma.com>
Mon, 6 Jul 2020 15:50:04 +0000 (10:50 -0500)
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

index 25fbdec3de8a4d22dbf05d3f591b71a64236355f..77a2803cfa7460dcfbbac1368c3d67180bbb25fc 100644 (file)
@@ -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);