sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.39k stars 424 forks source link

Answer has extmap http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time at level 0 that was not present in offer. #1093

Closed ispysoftware closed 3 months ago

ispysoftware commented 3 months ago

Connecting to SipSorcery latest version from github the connection fails immediately - getting this error from firefox dev tools (it works fine in chrome) :

DOMException: Answer has extmap http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time at level 0 that was not present in offer.

SipSorcery is answering with a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time when that was never offered on the audio channel

The latest nuget package (6.2.1) works ok

I'm guessing it's something to do with https://github.com/sipsorcery-org/sipsorcery/commit/1c1ca9f2b74863f49bc9f44e515165fd72eaa79f

@theimowski

Offer: v=0 o=mozilla...THIS_IS_SDPARTA-99.0 1197589987011925003 0 IN IP4 0.0.0.0 s=- t=0 0 a=fingerprint:sha-256 C8:44:FD:0C:0B:CF:3B:89:FF:0A:8E:B8:14:95:FA:88:AC:C2:D0:AA:3B:BF:89:9C:D8:44:2D:01:EE:8D:A9:23 a=group:BUNDLE 0 1 2 a=ice-options:trickle a=msid-semantic:WMS * m=audio 9 UDP/TLS/RTP/SAVPF 109 9 0 8 101 c=IN IP4 0.0.0.0 a=recvonly a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1 a=fmtp:101 0-15 a=ice-pwd:6f1379310e8465d2cf74fc662461e8a5 a=ice-ufrag:fed34101 a=mid:0 a=rtcp-mux a=rtpmap:109 opus/48000/2 a=rtpmap:9 G722/8000/1 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000/1 a=setup:actpass a=ssrc:3465053168 cname:{d9cfdcd2-1130-487c-ab95-b81a583d4d7c} m=video 9 UDP/TLS/RTP/SAVPF 120 124 121 125 126 127 97 98 123 122 119 c=IN IP4 0.0.0.0 a=recvonly a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:5 urn:ietf:params:rtp-hdrext:toffset a=extmap:6/recvonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delay a=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1 a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1 a=fmtp:120 max-fs=12288;max-fr=60 a=fmtp:124 apt=120 a=fmtp:121 max-fs=12288;max-fr=60 a=fmtp:125 apt=121 a=fmtp:127 apt=126 a=fmtp:98 apt=97 a=fmtp:119 apt=122 a=ice-pwd:6f1379310e8465d2cf74fc662461e8a5 a=ice-ufrag:fed34101 a=mid:1 a=rtcp-fb:120 nack a=rtcp-fb:120 nack pli a=rtcp-fb:120 ccm fir a=rtcp-fb:120 goog-remb a=rtcp-fb:120 transport-cc a=rtcp-fb:121 nack a=rtcp-fb:121 nack pli a=rtcp-fb:121 ccm fir a=rtcp-fb:121 goog-remb a=rtcp-fb:121 transport-cc a=rtcp-fb:126 nack a=rtcp-fb:126 nack pli a=rtcp-fb:126 ccm fir a=rtcp-fb:126 goog-remb a=rtcp-fb:126 transport-cc a=rtcp-fb:97 nack a=rtcp-fb:97 nack pli a=rtcp-fb:97 ccm fir a=rtcp-fb:97 goog-remb a=rtcp-fb:97 transport-cc a=rtcp-fb:123 nack a=rtcp-fb:123 nack pli a=rtcp-fb:123 ccm fir a=rtcp-fb:123 goog-remb a=rtcp-fb:123 transport-cc a=rtcp-fb:122 nack a=rtcp-fb:122 nack pli a=rtcp-fb:122 ccm fir a=rtcp-fb:122 goog-remb a=rtcp-fb:122 transport-cc a=rtcp-mux a=rtcp-rsize a=rtpmap:120 VP8/90000 a=rtpmap:124 rtx/90000 a=rtpmap:121 VP9/90000 a=rtpmap:125 rtx/90000 a=rtpmap:126 H264/90000 a=rtpmap:127 rtx/90000 a=rtpmap:97 H264/90000 a=rtpmap:98 rtx/90000 a=rtpmap:123 ulpfec/90000 a=rtpmap:122 red/90000 a=rtpmap:119 rtx/90000 a=setup:actpass a=ssrc:146552387 cname:{d9cfdcd2-1130-487c-ab95-b81a583d4d7c} m=application 9 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 0.0.0.0 a=sendrecv a=ice-pwd:6f1379310e8465d2cf74fc662461e8a5 a=ice-ufrag:fed34101 a=mid:2 a=setup:actpass a=sctp-port:5000 a=max-message-size:1073741823

Answer:

v=0 o=- 95100 0 IN IP4 127.0.0.1 s=sipsorcery t=0 0 a=group:BUNDLE 0 1 2 m=audio 9 UDP/TLS/RTP/SAVP 0 8 9 c=IN IP4 0.0.0.0 a=ice-ufrag:RPDB a=ice-pwd:RDPXAOMUQZYWVPDMRROHSKYG a=fingerprint:sha-256 A1:23:6C:D4:13:AF:A6:D9:E0:DF:D8:C5:2F:18:94:17:17:2A:DD:C3:DD:1D:3F:A3:A1:04:E4:3B:69:DC:E2:B4 a=setup:active a=candidate:1068029474 1 udp 2113937663 192.168.0.117 54398 typ host generation 0 a=ice-options:ice2,trickle a=mid:0 a=rtpmap:0 PCMU/8000 a=rtcp-fb:0 goog-remb a=rtpmap:8 PCMA/8000 a=rtcp-fb:8 goog-remb a=rtpmap:9 G722/8000/1 a=rtcp-fb:9 goog-remb a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=rtcp-mux a=rtcp:9 IN IP4 0.0.0.0 a=sendonly a=ssrc:1368239226 cname:e0ea49cf-c79f-4b79-b1f2-6e26b3bc5b78 m=video 9 UDP/TLS/RTP/SAVP 126 97 c=IN IP4 0.0.0.0 a=ice-ufrag:RPDB a=ice-pwd:RDPXAOMUQZYWVPDMRROHSKYG a=fingerprint:sha-256 A1:23:6C:D4:13:AF:A6:D9:E0:DF:D8:C5:2F:18:94:17:17:2A:DD:C3:DD:1D:3F:A3:A1:04:E4:3B:69:DC:E2:B4 a=setup:active a=ice-options:ice2,trickle a=mid:1 a=rtpmap:126 H264/90000 a=rtcp-fb:126 goog-remb a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1 a=rtpmap:97 H264/90000 a=rtcp-fb:97 goog-remb a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1 a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=rtcp-mux a=rtcp:9 IN IP4 0.0.0.0 a=sendonly a=ssrc:720347416 cname:da475f0e-99da-4604-a43a-4b2ab7cc5e6c m=application 9 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 0.0.0.0 a=ice-ufrag:RPDB a=ice-pwd:RDPXAOMUQZYWVPDMRROHSKYG a=fingerprint:sha-256 A1:23:6C:D4:13:AF:A6:D9:E0:DF:D8:C5:2F:18:94:17:17:2A:DD:C3:DD:1D:3F:A3:A1:04:E4:3B:69:DC:E2:B4 a=setup:active a=ice-options:ice2,trickle a=mid:2 a=sctp-port:5000 a=max-message-size:262144

theimowski commented 3 months ago

Thanks for the info @ispysoftware - I didn't account for this use case. We are using SIPSorcery to create initial offer, hence missed the fact that the same piece of code can be executed when creating answer. I'll work on the fix and submit another PR soon