STUN / STUNS uris with a "transport" parameter are rejected
See original GitHub issueFor a stun ICE server such as stun:global.stun.twilio.com:3478?transport=udp
The regex in rtcicetransport.py
is not relaxed enough…
[2019-03-20 13:06:35,713] [relay.eventing] [ERROR] Event Listener Exception [message]:
Traceback (most recent call last)
10. File "/home/mayfield/project/librelay-python/relay/eventing.py", line 45, in dispatchEvent
await r
9. File "/home/mayfield/project/relay-calling-sfu/relay_calling_sfu/main.py", line 115, in onMessage
await self.controlHandlers[control](exchange)
8. File "/home/mayfield/project/relay-calling-sfu/relay_calling_sfu/main.py", line 154, in onCallOffer
await call.addPeerOffer(exchange)
7. File "/home/mayfield/project/relay-calling-sfu/relay_calling_sfu/call.py", line 191, in addPeerOffer
await pc.setRemoteDescription(offer)
6. File "/usr/local/lib64/python3.6/site-packages/aiortc/rtcpeerconnection.py", line 660, in setRemoteDescription
transceiver = self.__createTransceiver(direction='recvonly', kind=media.kind)
5. File "/usr/local/lib64/python3.6/site-packages/aiortc/rtcpeerconnection.py", line 834, in __createTransceiver
dtlsTransport = self.__createDtlsTransport()
4. File "/usr/local/lib64/python3.6/site-packages/aiortc/rtcpeerconnection.py", line 812, in __createDtlsTransport
iceGatherer = RTCIceGatherer(iceServers=self.__configuration.iceServers)
3. File "/usr/local/lib64/python3.6/site-packages/aiortc/rtcicetransport.py", line 147, in __init__
ice_kwargs = connection_kwargs(iceServers)
2. File "/usr/local/lib64/python3.6/site-packages/aiortc/rtcicetransport.py", line 73, in connection_kwargs
parsed = parse_stun_turn_uri(uri)
1. File "/usr/local/lib64/python3.6/site-packages/aiortc/rtcicetransport.py", line 115, in parse_stun_turn_uri
raise ValueError('malformed uri')
ValueError: malformed uri
The regex for TURN servers includes support for the transport query arg, but stun does not.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
RFC 7350 - Datagram Transport Layer Security (DTLS) as ...
A STUN URI containing an IP address MUST be rejected, unless the domain name is ... The usage of "udp" as a transport...
Read more >RFC 8489: Session Traversal Utilities for NAT (STUN)
The STUN server copies that source transport address into an XOR-MAPPED- ADDRESS attribute in ... A "stuns" URI containing an IP address MUST...
Read more >UA Configuration Parameters
Mandatory parameters. uri. SIP URI associated to the User Agent ( String ). ... stun:example.org stuns:example.org stun:example.org:8000 ...
Read more >Session Traversal Utilities for NAT (STUN) Parameters
STUN Error Codes ; 441, Wrong Credentials, [RFC8656] ; 442, Unsupported Transport Protocol, [RFC8656] ; 443, Peer Address Family Mismatch, [RFC8656].
Read more >webrtc/api/peerconnection.cc - src - Git at Google
Number of tokens must be preset when TURN uri has transport param. ... STUNS, // Indicates a STUN server used with a TLS...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That way of thinking is a bit twisted. aiortc doesn’t suffer from following standards. Twilio does from not following them. There’s absolutely no guarantee that Firefox, or the whole swath of webrtc.org based implementations, keep support for this proprietary extension. To be precise, webrtc.org just ignores the transport parameter - it doesn’t comply with it. I wouldn’t even count on a PSA for a fix for that, so it could break for them any day.
I already added a workaround and I understand the position being taken. But keep in mind you’re on a short list of webrtc implementations that don’t tolerate this; iOS, Android, Safari, Firefox and Chromium accept/ignore the extrainious query args.
It’s unlikely twilio will change, so aiortc is the one that suffers.
On Sun, Mar 24, 2019 at 1:05 PM Jeremy Lainé notifications@github.com wrote: