[asterisk-commits] res rtp asterisk: Use RTP component for ICE if RTCP-MUX is i... (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 17 14:54:22 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6028 )

Change subject: res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use.
......................................................................

res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use.

This change makes it so that if an RTCP packet is being sent
the RTP ICE component is used for sending if RTCP-MUX is in use.

ASTERISK-27133

Change-Id: I6200f611ede709602ee9b89501720c29545ed68b
---
M res/res_rtp_asterisk.c
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Matthew Fredrickson: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 9d3969f..a2e63ec 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2650,8 +2650,14 @@
 
 #ifdef HAVE_PJPROJECT
 	if (transport_rtp->ice) {
+		enum ast_rtp_ice_component_type component = rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP;
 		pj_status_t status;
 		struct ice_wrap *ice;
+
+		/* If RTCP is sharing the same socket then use the same component */
+		if (rtcp && rtp->rtcp->s == rtp->s) {
+			component = AST_RTP_ICE_COMPONENT_RTP;
+		}
 
 		pj_thread_register_check();
 
@@ -2661,8 +2667,7 @@
 		if (instance == transport) {
 			ao2_unlock(instance);
 		}
-		status = pj_ice_sess_send_data(ice->real_ice,
-			rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP, temp, len);
+		status = pj_ice_sess_send_data(ice->real_ice, component, temp, len);
 		ao2_ref(ice, -1);
 		if (instance == transport) {
 			ao2_lock(instance);

-- 
To view, visit https://gerrit.asterisk.org/6028
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6200f611ede709602ee9b89501720c29545ed68b
Gerrit-Change-Number: 6028
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170717/2359cb6b/attachment-0001.html>


More information about the asterisk-commits mailing list