[Asterisk-code-review] PJSIP_MEDIA_OFFER: override what's specified on configuration (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Tue Jun 30 11:25:18 CDT 2020


Kevin Harwell has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14622 )


Change subject: PJSIP_MEDIA_OFFER: override what's specified on configuration
......................................................................

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
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 1 insertion(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/14622/1

diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 25fbdec..77a2803 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -1319,8 +1319,7 @@
 
 	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);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14622
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I0f7dc86fd0fb607c308e6f98ede303c54d1eacb6
Gerrit-Change-Number: 14622
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200630/9bdcdb06/attachment.html>


More information about the asterisk-code-review mailing list