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
13.35
Kevin Harwell 5 years ago committed by Joshua Colp
parent 4bbc5be798
commit ef19d69c6b

@ -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);

Loading…
Cancel
Save