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

createOffer() is creating two different a=ice-ufrag lines, confusing media servers #370

Closed
space88man opened this issue May 27, 2020 · 4 comments

Comments

@space88man
Copy link

space88man commented May 27, 2020

Using pypi release and HEAD on master:

  1. The SDP from createOffer() for a audio+video MediaPlayer has different ice-ufrag and ice-pwd lines for m=audio and m=video. This causes ICE failures.
  2. aiortc stores the first pair in the Connection object. A media server (Kurento) uses the second pair to do ICE REQUEST, this leads to integrity check and username match failures.
  3. Browser offers use the same ice-ufrag/ice-pwd attributes for both streams.
  4. If aiortc does the answer SDP, it creates the same ice-ufrag/ice-pwd for both media streams.

Symptoms of this failure:

  • ICE REQUEST/RESPONSE from aiortc to Kurento works (answer SDP has identical ice-ufrag/ice-pwd pairs)
  • ICE REQUEST from Kurento to aiortc fails: ValueError due to integrity check; if you bypass integrity check in aioice, then ValueError due to mismatch username.

Would it be possible for aiortc to emulate browsers and reuse ice-ufrag/ice-pwd attributes in both media streams on offer?

The first ice-ufrag/ice-pwd pair is stored in the Connection and used to verify integrity and username. But the media server uses the second pair.

# SDP offer with different ice-ufrag ice-pwd

a=candidate:d3528481068ed87c99af586f1926906f 1 udp 2130706431 192.168.1.7 45836 typ host                                                                                                                                                                 
a=candidate:11b689b4112f791f3859a4d254e61e25 1 udp 2130706431 192.168.125.1 51993 typ host                                                                                                                                                               
a=candidate:4928f5caa10844d454e97e1af3038bee 1 udp 2130706431 192.168.122.1 32856 typ host                                                                                                                                                               
a=candidate:653e4b9fd74e9451ff76d5b7d540707e 1 udp 2130706431 192.168.81.5 45101 typ host                                                                                                                                                                
a=end-of-candidates                                                                                                                                                                                                                                      
a=ice-ufrag:zXsi                                                                                                                                                                                                                                         
a=ice-pwd:FtFO6ChcdyYcB1VXgSXY8Q                                                                                                                                                                                                                         
a=fingerprint:sha-256 53:C4:92:EF:11:C0:88:39:CB:33:B3:43:BE:9C:B0:ED:CB:6A:C0:8A:7C:7E:A2:3B:C2:22:6B:70:8B:B3:B8:18                                                                                                                                    
a=setup:actpass                                                                                                                                                                                                                                          
m=video 41338 UDP/TLS/RTP/SAVPF 97 98 99 100 101 102                                                                                                                                                                                                     
c=IN IP4 192.168.1.7                                                                                                                                                                                                                                     
a=sendrecv                                                                                                                                                                                                                                               
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid                                                                                                                                                                                                           
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time                                                                                                                                                                                    
a=mid:1                                                                                                                                                                                                                                                  
a=msid:96de37fb-5b3b-474d-adc3-7f215e73e542 9451c57b-7777-4445-b2bb-1eaf81037d61                                                                                                                                                                         
a=rtcp:9 IN IP4 0.0.0.0                                                                                                                                                                                                                                  
a=rtcp-mux                                                                                                                                                                                                                                               
a=ssrc-group:FID 1477349285 2207491607                                                                                                                                                                                                                   
a=ssrc:1477349285 cname:10db87c7-ea3f-4f1e-b7e3-23db3c535517                                                                                                                                                                                             
a=ssrc:2207491607 cname:10db87c7-ea3f-4f1e-b7e3-23db3c535517                                                                                                                                                                                             
a=rtpmap:97 VP8/90000                                                                                                                                                                                                                                    
a=rtcp-fb:97 nack                                                                                                                                                                                                                                        
a=rtcp-fb:97 nack pli                                                                                                                                                                                                                                    
a=rtcp-fb:97 goog-remb                                                                                                                                                                                                                                   
a=rtpmap:98 rtx/90000                                                                                                                                                                                                                                    
a=fmtp:98 apt=97                                                                                                                                                                                                                                         
a=rtpmap:99 H264/90000                                                                                                                                                                                                                                   
a=rtcp-fb:99 nack                                                                                                                                                                                                                                        
a=rtcp-fb:99 nack pli                                                                                                                                                                                                                                    
a=rtcp-fb:99 goog-remb                                                                                                                                                                                                                                   
a=fmtp:99 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001f                                                                                                                                                                         
a=rtpmap:100 rtx/90000                                                                                                                                                                                                                                   
a=fmtp:100 apt=99                                                                                                                                                                                                                                        
a=rtpmap:101 H264/90000                                                                                                                                                                                                                                  
a=rtcp-fb:101 nack                                                                                                                                                                                                                                       
a=rtcp-fb:101 nack pli                                                                                                                                                                                                                                   
a=rtcp-fb:101 goog-remb                                                                                                                                                                                                                                  
a=fmtp:101 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f                                                                                                                                                                        
a=rtpmap:102 rtx/90000                                                                                                                                                                                                                                   
a=fmtp:102 apt=101                                                                                                                                                                                                                                       
a=candidate:d3528481068ed87c99af586f1926906f 1 udp 2130706431 192.168.1.7 41338 typ host                                                                                                                                                                 
a=candidate:11b689b4112f791f3859a4d254e61e25 1 udp 2130706431 192.168.125.1 37361 typ host                                                                                                                                                               
a=candidate:4928f5caa10844d454e97e1af3038bee 1 udp 2130706431 192.168.122.1 50189 typ host                                                                                                                                                               
a=candidate:653e4b9fd74e9451ff76d5b7d540707e 1 udp 2130706431 192.168.81.5 43653 typ host                                                                                                                                                                
a=end-of-candidates                                                                                                                                                                                                                                      
a=ice-ufrag:E8CY                                                                                                            
a=ice-pwd:tdmBCyR8ZPw0JelU6Etjht                                                                                            
a=fingerprint:sha-256 53:C4:92:EF:11:C0:88:39:CB:33:B3:43:BE:9C:B0:ED:CB:6A:C0:8A:7C:7E:A2:3B:C2:22:6B:70:8B:B3:B8:18       
a=setup:actpass

See the closed issue #369 for more background. I wasn't clear about what was happening so the explanation there is bad but left for reference.

@space88man
Copy link
Author

space88man commented May 27, 2020

Test: between aiortc and Kurento I rewrote aiortc's offer SDP to reuse ice-ufrag/ice-pwd from m=audio.

This does indeed work and the two are able to exchange RTP.

@jlaine
Copy link
Collaborator

jlaine commented May 27, 2020

At first look I'd suggest looking for a fix on the kurento side, as it's perfectly legitimate to have ice-ufrag / ice-pwd at the media level, and not at the session level. Is the failure specific to kurento or are you able to reproduce it with aiortc vs a browser?

@jlaine
Copy link
Collaborator

jlaine commented Aug 27, 2020

No reply from submitter, closing

@jlaine jlaine closed this as completed Aug 27, 2020
@kenaniah
Copy link

The Rust webrtc crate also complains about having different ice-ufrag values, viewing it as an error when the values differ.

@jlaine could you please reopen this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants