From 04f2fad021580b127d9a96edfdc853f6004f2b6e Mon Sep 17 00:00:00 2001 From: Torrey Searle Date: Thu, 5 Mar 2020 10:08:54 +0100 Subject: [PATCH] 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 --- res/res_pjsip_sdp_rtp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index 15245f2247..c745bafe60 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -531,6 +531,9 @@ static void add_ice_to_stream(struct ast_sip_session *session, struct ast_sip_se 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; } -- 2.47.2