TT#73900 ignore stray RTCP packets when confirming peer addresses

fixes #697

Change-Id: Id2fdbd1b0b419b7fcc032c865a62a7ceed84f9f3
changes/32/36732/1
Richard Fuchs 5 years ago
parent 9e05578aca
commit 6d22af9566

@ -1532,6 +1532,18 @@ static int media_packet_address_check(struct packet_handler_ctx *phc)
goto out; goto out;
} }
// GH #697 - apparent Asterisk bug where it sends stray RTCP to the RTP port.
// work around this by detecting this situation and ignoring the packet for
// confirmation purposes when needed. This is regardless of whether rtcp-mux
// is enabled or not.
if (!PS_ISSET(phc->mp.stream, CONFIRMED) && PS_ISSET(phc->mp.stream, RTP)) {
if (rtcp_demux_is_rtcp(&phc->s)) {
ilog(LOG_DEBUG | LOG_FLAG_LIMIT, "Ignoring stray RTCP packet for "
"peer address confirmation purposes");
goto out;
}
}
/* do not pay attention to source addresses of incoming packets for asymmetric streams */ /* do not pay attention to source addresses of incoming packets for asymmetric streams */
if (MEDIA_ISSET(phc->mp.media, ASYMMETRIC) || rtpe_config.endpoint_learning == EL_OFF) if (MEDIA_ISSET(phc->mp.media, ASYMMETRIC) || rtpe_config.endpoint_learning == EL_OFF)
PS_SET(phc->mp.stream, CONFIRMED); PS_SET(phc->mp.stream, CONFIRMED);

Loading…
Cancel
Save