[asterisk-commits] mjordan: trunk r382670 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 7 21:54:42 CST 2013


Author: mjordan
Date: Thu Mar  7 21:54:38 2013
New Revision: 382670

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382670
Log:
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.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=382670&r1=382669&r2=382670
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Mar  7 21:54:38 2013
@@ -25305,21 +25305,6 @@
 		} 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);




More information about the asterisk-commits mailing list