Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sip-to-webrtc panic: SetRemoteDescription called with multiple conflicting ice-ufrag values #2619

Closed
heshouyong opened this issue Nov 16, 2023 · 3 comments

Comments

@heshouyong
Copy link

In sip-to-webrtc.

SDP:
sdp: v=0
o=FreeSWITCH 1700089259 1700089260 IN IP4 192.168.4.122
s=FreeSWITCH
c=IN IP4 192.168.4.122
t=0 0
a=msid-semantic: WMS hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJr
m=audio 29974 UDP/TLS/RTP/SAVPF 111 101
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1; minptime=10
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=fingerprint:sha-256 FC:C6:A1:AC:11:59:22:C1:30:A1:2E:20:09:A1:05:5D:68:24:23:5F:0A:6E:D3:3A:35:5F:A7:D5:0E:3D:8A:D8
a=setup:active
a=rtcp-mux
a=rtcp:29974 IN IP4 192.168.4.122
a=ice-ufrag:kKDgBbqJkSbZekyL
a=ice-pwd:CORwmmpD1Kg6nEpjQ0s2MMBy
a=candidate:0097408050 1 udp 2130706431 192.168.4.122 29974 typ host generation 0
a=end-of-candidates
a=ssrc:371077960 cname:3Ma4aVuQBnz1lxJK
a=ssrc:371077960 msid:hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJr a0
a=ssrc:371077960 mslabel:hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJr
a=ssrc:371077960 label:hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJra0
m=video 24074 UDP/TLS/RTP/SAVPF 96
b=AS:3072
a=rtpmap:96 VP8/90000
a=fingerprint:sha-256 FC:C6:A1:AC:11:59:22:C1:30:A1:2E:20:09:A1:05:5D:68:24:23:5F:0A:6E:D3:3A:35:5F:A7:D5:0E:3D:8A:D8
a=setup:active
a=rtcp-mux
a=rtcp:24074 IN IP4 192.168.4.122
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=ssrc:3816007360 cname:3Ma4aVuQBnz1lxJK
a=ssrc:3816007360 msid:hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJr v0
a=ssrc:3816007360 mslabel:hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJr
a=ssrc:3816007360 label:hPQFlSWoUU7vVAmQnnqZ2o0bXc1t3XJrv0
a=ice-ufrag:HeDJ1q8mofoMFMFY
a=ice-pwd:M2lkzObnMFSxEyWtma5l1D6L
a=candidate:4598179372 1 udp 2130706431 192.168.4.122 24074 typ host generation 0
a=end-of-candidates
a=mid:0

panic: SetRemoteDescription called with multiple conflicting ice-ufrag values
sip-to-webrtc/softphone/register.go

Can we support multiple ice-ufrag / ice-pwd?

@Sean-Der Sean-Der transferred this issue from pion/example-webrtc-applications Nov 16, 2023
@Odinvt
Copy link

Odinvt commented Nov 21, 2023

@heshouyong I'm not sure FreeSwitch Verto supports WebRTC Bundling. And Pion for sure doesn't support unbundled WebRTC for now.

I suggest you switch to Asterisk as they introduced WebRTC Bundling capabilities as of version 15 a couple of years ago.

If your use case relies on FreeSwitch transcoding capabilities, that is not available in Asterisk. You will have to do the transcoding yourself. Even if you do, for Pion to accept your offer, #2621 would need to be solved, or you can use my workaround here #2621 (comment) .

If you really need FreeSwitch, then you're out of luck with Pion, I suggest you switch libraries.

@heshouyong
Copy link
Author

@Odinvt thx!

RFC 8839https://datatracker.ietf.org/doc/html/rfc8839#name-ice-ufrag-and-ice-pwd-attri

The "ice-pwd" and "ice-ufrag" attributes can appear at either the session-level or media-level. When present in both, the value in the media-level takes precedence. Thus, the value at the session-level is effectively a default that applies to all data streams, unless overridden by a media-level value. Whether present at the session or media-level, there MUST be an "ice-pwd" and "ice-ufrag" attribute for each data stream. If two data streams have identical "ice-ufrag"s, they MUST have identical "ice-pwd"s.

Freeswitch + jssip works.

sdp offer:

v=0
o=FreeSWITCH 1701613161 1701613162 IN IP4 47.113.xxx.xxx
s=FreeSWITCH
c=IN IP4 47.113.xxx.xxx
t=0 0
a=msid-semantic: WMS gqct7TD05FQAZOOBwWw05vT4fq7gcLoi
m=audio 63598 RTP/SAVPF 102 8 0 103 101
a=rtpmap:102 opus/48000/2
a=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40; stereo=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:103 telephone-event/48000
a=rtpmap:101 telephone-event/8000
a=fingerprint:sha-256 CE:1C:DE:82:4F:DD:D2:9A:00:F7:CC:BB:58:52:57:F8:0F:A4:75:74:C8:97:04:7C:F1:C0:5F:A6:28:78:4B:07
a=setup:actpass
a=rtcp-mux
a=rtcp:63598 IN IP4 47.113.xxx.xxx
a=ssrc:3984245743 cname:2qCZa5P5Awvqa9Rx
a=ssrc:3984245743 msid:gqct7TD05FQAZOOBwWw05vT4fq7gcLoi a0
a=ssrc:3984245743 mslabel:gqct7TD05FQAZOOBwWw05vT4fq7gcLoi
a=ssrc:3984245743 label:gqct7TD05FQAZOOBwWw05vT4fq7gcLoia0
a=ice-ufrag:WdnRy7LEnJKpkZyc
a=ice-pwd:g02gVIbl4wB5wisimG0LDCfR
a=candidate:7967151544 1 udp 2130706431 47.113.xxx.xxx 63598 typ host generation 0
a=candidate:7967151544 2 udp 2130706431 47.113.xxx.xxx 63598 typ host generation 0
a=ptime:20
m=video 64898 RTP/SAVPF 125 120
b=AS:3072
a=rtpmap:125 H264/90000
a=fmtp:125 profile-level-id=42801E;packetization-mode=0
a=rtpmap:120 VP8/90000
a=fingerprint:sha-256 CE:1C:DE:82:4F:DD:D2:9A:00:F7:CC:BB:58:52:57:F8:0F:A4:75:74:C8:97:04:7C:F1:C0:5F:A6:28:78:4B:07
a=setup:actpass
a=rtcp-mux
a=rtcp:64898 IN IP4 47.113.xxx.xxx
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 ccm tmmbr
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 ccm tmmbr
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=ssrc:3133429099 cname:2qCZa5P5Awvqa9Rx
a=ssrc:3133429099 msid:gqct7TD05FQAZOOBwWw05vT4fq7gcLoi v0
a=ssrc:3133429099 mslabel:gqct7TD05FQAZOOBwWw05vT4fq7gcLoi
a=ssrc:3133429099 label:gqct7TD05FQAZOOBwWw05vT4fq7gcLoiv0
a=ice-ufrag:HSojCjoIN4pOhl2e
a=ice-pwd:hoBuqJ3u1YJjkEUSn81QhfoU
a=candidate:1710108620 1 udp 2130706431 47.113.xxx.xxx 64898 typ host generation 0
a=candidate:1710108620 2 udp 2130706430 47.113.xxx.xxx 64898 typ host generation 0
a=end-of-candidates

sdp answer:
v=0
o=- 7356779784958511773 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS 507fe75a-6cb9-46d8-b12e-2f304e1013c6
m=audio 56724 RTP/SAVPF 102 8 0 103 101
c=IN IP4 172.17.0.1
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1779298220 1 udp 2122260223 172.17.0.1 56724 typ host generation 0 network-id 1
a=candidate:228680011 1 udp 2122194687 192.168.2.8 52162 typ host generation 0 network-id 2
a=candidate:4095402675 1 udp 2122129151 192.168.4.64 58715 typ host generation 0 network-id 3
a=candidate:348261684 1 tcp 1518280447 172.17.0.1 9 typ host tcptype active generation 0 network-id 1
a=candidate:1936622547 1 tcp 1518214911 192.168.2.8 9 typ host tcptype active generation 0 network-id 2
a=candidate:2329215019 1 tcp 1518149375 192.168.4.64 9 typ host tcptype active generation 0 network-id 3
a=ice-ufrag:Vu1L
a=ice-pwd:ZPAqpgF0QluaTwFjawE7HXdd
a=ice-options:trickle
a=fingerprint:sha-256 23:71:4B:62:E7:42:73:ED:EE:8F:7E:1B:CE:CB:DC:1A:70:D1:10:29:9A:EB:29:BF:D7:B8:0A:EF:98:D4:4E:62
a=setup:active
a=mid:0
a=sendrecv
a=rtcp-mux
a=rtpmap:102 opus/48000/2
a=fmtp:102 minptime=10;useinbandfec=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:103 telephone-event/48000
a=rtpmap:101 telephone-event/8000
a=ssrc:3644385866 cname:R7MO1wEI320p8m2k
a=ssrc:3644385866 msid:507fe75a-6cb9-46d8-b12e-2f304e1013c6 63e53d0e-0c33-40a8-9240-7dd4a66467a8
m=video 56927 RTP/SAVPF 125 120
c=IN IP4 172.17.0.1
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1779298220 1 udp 2122260223 172.17.0.1 56927 typ host generation 0 network-id 1
a=candidate:228680011 1 udp 2122194687 192.168.2.8 33534 typ host generation 0 network-id 2
a=candidate:4095402675 1 udp 2122129151 192.168.4.64 59521 typ host generation 0 network-id 3
a=candidate:348261684 1 tcp 1518280447 172.17.0.1 9 typ host tcptype active generation 0 network-id 1
a=candidate:1936622547 1 tcp 1518214911 192.168.2.8 9 typ host tcptype active generation 0 network-id 2
a=candidate:2329215019 1 tcp 1518149375 192.168.4.64 9 typ host tcptype active generation 0 network-id 3
a=ice-ufrag:Q82i
a=ice-pwd:ntFOIeqZmCnwAahlxCUP1wXP
a=ice-options:trickle
a=fingerprint:sha-256 23:71:4B:62:E7:42:73:ED:EE:8F:7E:1B:CE:CB:DC:1A:70:D1:10:29:9A:EB:29:BF:D7:B8:0A:EF:98:D4:4E:62
a=setup:active
a=mid:1
a=sendrecv
a=rtcp-mux
a=rtpmap:125 H264/90000
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001e
a=rtpmap:120 VP8/90000
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=ssrc:1724314962 cname:R7MO1wEI320p8m2k
a=ssrc:1724314962 msid:507fe75a-6cb9-46d8-b12e-2f304e1013c6 2a369e8f-9352-4127-b382-f30996c42d1e

@Sean-Der
Copy link
Member

Sean-Der commented Apr 1, 2024

Closing as duplicate of #2621

I am going to add support for Remote Agents that support both bundled and unbundled (as described in #2621).
Pion will not support non-bundled. It would add significant complexity to Pion and I haven't seen a large demand.

I created an example repo pion-unbundled that can be used to connect a unbundled remote if needed. It uses multiple PeerConnections to simulate a PeerConnection that isn't bundled.

Thanks for the bug reports and for using Pion @heshouyong @Odinvt !

@Sean-Der Sean-Der closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants