6

Scenario:

I'm using WebRTC (Google's libjingle) on iOS and PeerConnection is setup using a TURN server and I'm waiting for all candidates to gather before I send them to the peer (I'm using SIP). The problem is that although all candidates are gathered in around 1-3 seconds (I can see it in the logs) the iceGatheringChanged() callback is not called with state GatheringComplete until after around a whole minute!

Any idea why that happens?

After analyzing the traffic using Google's AppRTCDemo for iOS it seems that for GatheringComplete to fire, the client needs ​to already have received the candidates from the remote side​, and that because it seems to need to setup TURN Allocations and add Permissions on the new allocation so that data can be exchanged with the peer. Is that the case? If so why?

Best regards

atsakiridis
  • 1,002
  • 5
  • 19
  • This sounds interesting, so I tried to check it in our app. I've tried 2 configurations: one with TURN server and 2 STUN servers, the other without TURN, only with 2 STUN servers. In both cases it took 1min 20sec to reach `iceConnectionState==="completed"`. It seems that it's a timeout inside WebRTC library, but I unfortunately I have no time to check it now. – sesm May 31 '20 at 19:16
  • I know that this is a very long question but could you figure it out by any chance and know what the problem was? – VladL Sep 14 '22 at 22:33

1 Answers1

0

Are you exchanging the candidates for both party in real time? You are right, TURN client requires the other party candidates to create permission in TURN server and also to make check lists to start ICE processing.