[Asterisk-code-review] res_pjsip_sdp_rtp: Don't wait for ICE if not negotiated (asterisk[13])

George Joseph asteriskteam at digium.com
Tue Mar 10 13:36:35 CDT 2020


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13856 )

Change subject: res_pjsip_sdp_rtp: Don't wait for ICE if not negotiated
......................................................................

res_pjsip_sdp_rtp: Don't wait for ICE if not negotiated

If ICE support is enabled but not negotiated, the rtp->ice structure is
not being destroyed. This leads to Asterisk waiting for ICE to complete
instead of immediately starting the DTLS handshake, resulting in the
call leg having no RTP.

ASTERISK-28769 #close

Change-Id: I17c137546dc9ecfb9583c24dcf4c2ced8bbd7a27
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 15245f2..c745baf 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -531,6 +531,9 @@
 
 	if (!session->endpoint->media.rtp.ice_support || !(ice = ast_rtp_instance_get_ice(session_media->rtp)) ||
 		!session_media->remote_ice || !(candidates = ice->get_local_candidates(session_media->rtp))) {
+		if (ice) {
+			ice->stop(session_media->rtp);
+		}
 		return;
 	}
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I17c137546dc9ecfb9583c24dcf4c2ced8bbd7a27
Gerrit-Change-Number: 13856
Gerrit-PatchSet: 2
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200310/cf9b996e/attachment-0001.html>


More information about the asterisk-code-review mailing list