Question

If I am receiving a rtp stream, which port do I send rtcp receiver reports? For example if I use an SDP to negotiate a receive only stream with the server say through SIP, I would only specify my ports for receiving rtp and rtcp streams. How should the server respond. It only needs to send rtp sterams. So it can choose any port on its end of the socket. How should it specify the rtcp port on which it would be listening to rtcp receiver report?

Was it helpful?

Solution

Normally the RTCP port is the next port number up from the one being used for RTP. So for example if the RTP port is 30000 then port 30001 will be used for RTCP.

In the case you've mentioned you could wait until you receive an RTP packet from the server and then send the RTCP receiver reports to the RTP port number + 1.

OTHER TIPS

Normally, it is the next port number up from the negotiated RTP port.

Rare exception to this "RTP + 1 = RTCP" rule would be when a SIP session travels through a network address translation device, and where port mapping is involved.

RFC 3605 explains the SDP extension to handle this scenario.

According to RFC3264, there are no differences for recvonly streams and sendrecv streams. The RTCP message can be sent to RTP port number + 1.

For recvonly and sendrecv streams, the port number and address in the offer indicate where the offerer would like to receive the media stream. For sendonly RTP streams, the address and port number indirectly indicate where the offerer wants to receive RTCP reports. Unless there is an explicit indication otherwise, reports are sent to the port number one higher than the number indicated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top