data channel ids are set before SCTP init is exchanged
https://github.com/w3c/webrtc-stats/issues/805#issuecomment-3162026930
I am a bit surprised that no actual DTLS negotiation is required but that seems consistent across browsers? https://w3c.github.io/webrtc-pc/#sctp-transport-connected might need to be updated as it currently says
Once an SCTP transport is connected, meaning the SCTP association of an RTCSctpTransport has been established
but as https://jsfiddle.net/fippo/gLs015hm/6 shows the SCTP transport exists without packets being exchanged. The specification is safer as it since it avoids my potential (theoretical?) concern about role conflicts but browsers behave differently and seem to determine the odd/even based on the DTLS role negotiated in the SDP (which seems ok)
I can volunteer a WPT but from the screenshot looks like implementations agree.
I want to say that I've never had an issue with DC in Red5 Pro, I'll have to check the logic, but we use client or server as our determination as to who is even or odd; never tied that into the DTLS setup/role that I can recall.
This issue had an associated resolution in WebRTC September 2025 meeting – 16 September 2025 (data channel ids set before SCTP init #3071):
RESOLUTION: Proceed with a PR