pion / sdp

A Go implementation of the SDP
https://pion.ly/
MIT License
148 stars 56 forks source link

Parser can not read attributes with wildcards #172

Closed atoppi closed 6 months ago

atoppi commented 7 months ago

Your environment.

What did you do?

Trying to negotiate RFC 8888 a=rtcp-fb:* ack ccfb feedback with a media server (Janus) that is offering the feature.

What did you expect?

Pion parses the attribute and adds it to the SDP answer

What happened?

Pion can not parse the attribute due to the presence of wildcard * (as requested by RFC 8888). https://github.com/pion/sdp/blob/9704a3f4fd5e01af9faceea50d9b1561c623c900/util.go#L171-L173

The problem is that the parsing helper is expecting a PT number, whereas the RFC 8888 mandates a wildcard:

The payload type used with "ccfb" feedback MUST be the wildcard type
   ("*").  This implies that the congestion control feedback is sent for
   all payload types in use in the session, including any Forward Error
   Correction (FEC) and retransmission payload types.
atoppi commented 6 months ago

FYI the ccfb attribute is now being negotiated, however pion is putting a a=rtcp-fb:X ack ccfb line even if the feedback is not being reigstered on the mediaEngine (e.g. NOT calling ConfigureCongestionControlFeedback). Is this a regression or an intended behavior?

Sean-Der commented 6 months ago

@atoppi I believe that is wrong. We should probably only respond with a rtcp-fb if we locally we support it!