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