Open Bug 1668597 Opened 6 years ago Updated 6 years ago

Firefox disables RTCP ICE components when SAVP is used, not just rtcp-fb

Categories

(Core :: WebRTC: Signaling, defect, P3)

Firefox 83
defect

Tracking

()

REOPENED
Tracking Status
firefox-esr78 --- fix-optional
firefox81 --- fix-optional
firefox82 --- fix-optional
firefox83 --- affected

People

(Reporter: u555665, Assigned: bwc)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

I'm working on a SIP<->Matrix VoIP bridge, and was testing establishing calls initiated from SIP. The SIP terminal sends separate candidates for RTP and RTCP. The Matrix side of things is being tested with a Web Matrix client in Firefox.

Actual results:

When calling from SIP, and answering from Matrix, the call fails because the SIP terminal can't connect to a RTCP candidate, as the candidates that are sent are only sent with the RTP component ID, and Firefox multiplexes RTP and RTCP on these candidates' ports. RFC 5761 says such multiplexing should be advertised using the "rtcp-mux" attribute, but this attribute is missing from the answer's SDP payload generated by Firefox.
FWIW I've also tested this scenario with Chromium, and it correctly includes this attribute in the SDP payload.
I've stumbled upon bugs here mentioning this attribute, but they didn't seem to be about this issue, or 8-year old closed bugs. I figured they were probably not directly related since I stumbled upon this issue less than an hour ago.

Expected results:

The "rtcp-mux" attribute is present in SDP payloads.

If that helps, the invite from the SIP side Firefox tries to answer is:

v=0
o=brendan 1274 3045 IN IP4 192.168.1.77
s=Talk
c=IN IP4 192.168.1.77
t=0 0
a=ice-pwd:6136bf7f6b53fe65c52b129e
a=ice-ufrag:d0551eae
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
m=audio 7078 UDP/TLS/RTP/SAVP 96 97 98 0 8 18 101 99 100
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=fmtp:18 annexb=yes
a=rtpmap:101 telephone-event/48000
a=rtpmap:99 telephone-event/16000
a=rtpmap:100 telephone-event/8000
a=setup:actpass
a=fingerprint:SHA-256 3B:AF:45:0D:0F:C8:3E:F0:05:85:8B:1C:81:71:32:38:15:52:DE:6C:2B:7C:B9:E1:B9:8B:24:E1:1B:0B:6F:21FTR it looks like that attribute is present in invite payloads.
a=ssrc:1439729063 cname:sip:brendan+localhost@127.0.0.2
a=candidate:1 1 UDP 2130706303 192.168.1.77 7078 typ host
a=candidate:1 2 UDP 2130706302 192.168.1.77 7079 typ host
a=candidate:2 1 UDP 2130706303 172.17.0.1 7078 typ host
a=candidate:2 2 UDP 2130706302 172.17.0.1 7079 typ host
a=rtcp-fb:* trr-int 5000
a=rtcp-fb:* ccm tmmbr

And the answers it sends (mangled a bit to include candidates) is:

v=0
o=mozilla...THIS_IS_SDPARTA-80.0.1 6557259516699707380 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 8B:6F:F4:68:54:54:90:31:1E:86:58:72:24:3D:B4:A8:05:1E:2F:AF:C8:72:9F:5F:C9:3D:52:CA:B7:B5:CA:F4
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 47520 UDP/TLS/RTP/SAVP 96 0 8 100
c=IN IP4 192.168.1.77
a=sendrecv
a=fmtp:96 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:100 0-15
a=ice-pwd:e4254d10af63bb99e0abf1abaf023ea3
a=candidate:0 1 UDP 2122187007 192.168.1.77 47520 typ host
a=candidate:2 1 UDP 2122252543 172.17.0.1 38496 typ host
a=candidate:4 1 TCP 2105458943 192.168.1.77 9 typ host tcptype active
a=candidate:5 1 TCP 2105524479 172.17.0.1 9 typ host tcptype active
a=candidate:1 1 UDP 1685987327 80.250.101.234 47520 typ srflx raddr 192.168.1.77 rport 47520
a=candidate:3 1 UDP 1686052863 80.250.101.234 38496 typ srflx raddr 172.17.0.1 rport 38496
a=ice-ufrag:0f83a022
a=mid:0
a=msid:{59203dfe-e20f-4c1c-a571-33788f24b0cb} {d6f0a009-b4e4-4924-be88-9f9d76f4f2c5}
a=rtpmap:96 opus/48000/2
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:100 telephone-event/8000
a=setup:active
a=ssrc:1105006554 cname:{4c6ee66c-d1e4-410d-8da7-a9c4cd4ce1b7}

On invites, it looks like Firefox sends candidates with components 1 and 2 (does it not multiplex then?), but does includes the rtcp-mux attribute.

Summary: a=rtcp-mux is missing from WebRTC SDP payloads → a=rtcp-mux is missing from WebRTC SDP answer payloads

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → WebRTC: Signaling
Product: Firefox → Core

The offer does not have a=rtcp-mux in it; it is invalid to put a=rtcp-mux in the answer when this is the case (https://tools.ietf.org/html/rfc8035#section-1).

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

(In reply to Byron Campen [:bwc] from comment #3)

The offer does not have a=rtcp-mux in it; it is invalid to put a=rtcp-mux in the answer when this is the case (https://tools.ietf.org/html/rfc8035#section-1).

Right, but then shouldn't Firefox send RTCP candidates (without multiplexing) in the answer if the other side isn't multiplexing? Otherwise it feels like the only way to make it work in this case is for a 3rd party software (e.g. the bridge in this case) to go off-spec and add this attribute on the fly.

Ok, so that is a problem. We have tests for this though, but maybe we don't have a test for the single m-section case?

(That said, be aware that webrtc-pc says that rtcp-mux is supposed to be hard-coded into browsers, although Firefox still tries to interop with endpoints that don't want to use it)

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Summary: a=rtcp-mux is missing from WebRTC SDP answer payloads → Firefox is not gathering rtcp candidates when rtcp-mux is not negotiated (at least when there is just one m-section)

I cannot reproduce this on current release or nightly. Here's a fiddle that generates an audio-only sendrecv offer without bundle or rtcp-mux, and prints the candidate gathering from the other side to the console:

https://jsfiddle.net/seqcxfa8/1/

Can't repro on ESR 78 either using the fiddle. Can you attach a copy of about:webrtc for this case?

Flags: needinfo?(contact)

I see the problem. The offer sdp uses "UDP/TLS/RTP/SAVP", which means no RTCP at all.

Status: REOPENED → RESOLVED
Closed: 6 years ago → 6 years ago
Resolution: --- → INVALID
Flags: needinfo?(contact)

(In reply to Byron Campen [:bwc] from comment #8)

I see the problem. The offer sdp uses "UDP/TLS/RTP/SAVP", which means no RTCP at all.

https://tools.ietf.org/html/rfc4566#section-5.14 seems to say that line means there may be RTCP, not that there won't be any, and that 7078 UDP/TLS/RTP/SAVP without a a=rtcp: attribute (nor a a=rtcp-mux) means RTCP will be sent over port 7079, which is the case according to the candidates.

(In reply to Brendan Abolivier from comment #9)

(In reply to Byron Campen [:bwc] from comment #8)

I see the problem. The offer sdp uses "UDP/TLS/RTP/SAVP", which means no RTCP at all.

https://tools.ietf.org/html/rfc4566#section-5.14 seems to say that line means there may be RTCP, not that there won't be any, and that 7078 UDP/TLS/RTP/SAVP without a a=rtcp: attribute (nor a a=rtcp-mux) means RTCP will be sent over port 7079, which is the case according to the candidates.

Hmm, so we should be allowing rtcp in this case, but disallowing RTCP feedback.

A side-note, the offer uses a=rtcp-fb, which probably means the intent was to use SAVPF, which will work around this bug.

Assignee: nobody → docfaraday
Severity: -- → S3
Status: RESOLVED → REOPENED
Priority: -- → P3
Resolution: INVALID → ---
Summary: Firefox is not gathering rtcp candidates when rtcp-mux is not negotiated (at least when there is just one m-section) → Firefox disables RTCP ICE components when SAVP is used, not just rtcp-fb
Version: 80 Branch → Firefox 83
You need to log in before you can comment on or make changes to this bug.