tags:

views:

100

answers:

2

I'm doing a Java implementation of RFC 3550 (RTP) and I've ran into a little problem:

In chapter 11, paragraph 2, it states that:

(...) A participant MUST NOT assume that the source port of the incoming RTP or RTCP packet can be used as the destination port for outgoing RTP or RTCP packets. When RTP data packets are being sent in both directions, each participant's RTCP SR packets MUST be sent to the port that the other participant has specified for reception of RTCP. (...)

RTP does not have any mechanism to inform of these addresses and ports (that's up to SDP or some other setup protocol), which would lead me to understand this paragraph as "if you're receiving data from an unknown source, just discard it".

But in section 6.3.3 it basically says that when an RTP or non-BYE RTCP packet is received with an unknown SSRC, a new participant should be added to the table.

So to sum up:

  1. You should add a new participant when an unknown SSRC is received;
  2. You can't use the packet's source IP/port as the destination of packets for that participant;
  3. SDP doesn't define the SSRC that will be used by each of the RTP participants;
  4. You can manually add RTP participants (discovered in other ways) BUT you have no idea what the SSRC's will be.

So the million dollar question is: just how is one supposed to handle unexpected SSRC's?

A: 

From my interpretation of the RFC, the response to your question is on section 6.3.3:

6.3.3 Receiving an RTP or Non-BYE RTCP Packet

When an RTP or RTCP packet is received from a participant whose SSRC is not in the member table, the SSRC is added to the table, and the value for members is updated once the participant has been validated as described in Section 6.2.1.

Regarding which entry should be consider valid:

(...) New entries MAY be considered not valid until multiple packets carrying the new SSRC have been received (see Appendix A.1), or until an SDES RTCP packet containing a CNAME for that SSRC has been received.(...)

May I be missing something? ;)

Nuno Costa
The big question is how do I figure out the IP/Port combination of this new participant - after its validation - since section 11, paragraph 2 states that the source IP/Port "MUST NOT" be used and "(...) packets MUST be sent to the port that the other participant has specified for reception (...)". If it's a new, unexpected participant (meaning, un-announced via SDP, possibly someone tapping in) how is the reception IP/Port combo specified?
brunodecarvalho
+1  A: 
  1. You should add a new participant when an unknown SSRC is received --> Only After verifying it as per section Section 6.2.1
  2. You can't use the packet's source IP/port as the destination of packets for that participant --> It is saying that you cant expect that Endpoint A's RTP/RTCP pair is same as Endpoint B's pair (unless specified though). (In section 11 RFC is not talking about IP address.)
  3. SDP doesn't define the SSRC that will be used by each of the RTP participants --> Yes as SSRC can be changed on the fly.
  4. You can manually add RTP participants (discovered in other ways) BUT you have no idea what the SSRC's will be. ???

So Million dollar question is still worth a million dollar. Will research and update you. In the meantime if you find answers please update us also.

alam