From 12748bc7354d55c460e38f1001e9cb2692c529a6 Mon Sep 17 00:00:00 2001 From: Matthew Jordan <mjordan@digium.com> Date: Fri, 8 Mar 2013 03:54:38 +0000 Subject: [PATCH] Don't reset the RTP address on a glare re-INVITE Originally, way back in r201583, we added the alternate RTP address so that the RTP engine would expect to receive audio from a new source when a glare re-INVITE occurred. In r382589, we remove the alternate RTP source, as the 'secret' probation mode allows for switching to a new RTP source when a previous source stops sending RTP. At the time, it seemed appropriate to set the RTP source based on the information in the glared re-INVITE. Unfortunately, that doesn't work so well - in a glared re-INVITE that occurs with no SDP - such as in a connected line update that glances - we'll set the RTP source to an invalid address. In subsequent re-INVITE requests from this Asterisk instance, we'll then send an invalid media address, which will result in the remote side sending a 488. Whoops. There isn't any need to reset the RTP source - if we're using strictrtp, we'll simply synchronize to a new source when we stop getting packets from the old one. If we aren't using strictrtp, then again there shouldn't be a problem. Note that the Asterisk Test Suite's connectedline test caught this error. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382670 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 627924bed9..d34fbfa445 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -25305,21 +25305,6 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, str } else { /* We already have a pending invite. Sorry. You are on hold. */ p->glareinvite = seqno; - if (p->rtp && find_sdp(req)) { - struct ast_sockaddr addr; - if (get_ip_and_port_from_sdp(req, SDP_AUDIO, &addr)) { - ast_log(LOG_WARNING, "Failed to set an alternate media source on glared reinvite. Audio may not work properly on this call.\n"); - } else { - ast_rtp_instance_set_remote_address(p->rtp, &addr); - } - if (p->vrtp) { - if (get_ip_and_port_from_sdp(req, SDP_VIDEO, &addr)) { - ast_log(LOG_WARNING, "Failed to set an alternate media source on glared reinvite. Video may not work properly on this call.\n"); - } else { - ast_rtp_instance_set_remote_address(p->vrtp, &addr); - } - } - } transmit_response_reliable(p, "491 Request Pending", req); check_via(p, req); ast_debug(1, "Got INVITE on call where we already have pending INVITE, deferring that - %s\n", p->callid); -- GitLab