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
changes/78/78/1
Matthew Jordan 12 years ago
parent 3f0ea90ce6
commit 12748bc735

@ -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);

Loading…
Cancel
Save