-
Notifications
You must be signed in to change notification settings - Fork 453
Time out when negotiating connection #1256
Replies: 2 comments · 17 replies
-
I can replicate the same behaviour and log messages if I re-use an RTCPeerConnection instance. Each instance is only intended to be used once. For each new WebRTC peer connection you should be creating a brand new instance. If it helps I use the webrtccmdline tool to test scenarios like this. Signalling server peer:
Signalling client peer:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm still trying to reproduce this. It turns out the issue I had previously was due to my ICE candidates not being exchanged properly. Are you able to test your TURN server connection with UDP instead of TCP? It would be useful to know if the issue happens with UDP as well. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Sorry for the delayed response - I have been offline for a few days due to the holidays.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
In an attempt to try to figure out what goes different between when connection is established correctly and when not, I started adding some logging various places (as debugging will cause the issue to stop from happening). |
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you add the two debug messages as below to your app. The idea is to see if a STUN response is being received to the use candidate check.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
I have now run again with these added (log starts with "INFO - WebRTC:".
Failed attempt:
I am truely grateful for your continued support on this. Thanks! Please let me know if there is anything else I should try out. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for the additional logs. The key difference between the success and failure cases is this log message:
In the success case that STUN response is received AFTER the ICE candidate is nominated, which is indicated in the log message below with the
The question is now why isn't the STUN binding success response received from the TURN server in some cases. If you're able to use WireShark it would be very helpful to get a packet capture of the STUN messages to/from the TURN server during the success and failure cases. That should fairly definitively point to the sipsorcery library being the culprit or not. If you do capture a WireShark trace you can send it directly to me at [email protected] to avoid publishing you IP addresses. |
Beta Was this translation helpful? Give feedback.
All reactions
-
The other end is a streaming server that should receive the audio streamed by my client. All communication is going through a coturn server. Should the BindingSuccessResponse be issued by the coturn server or should it be just be sent by the coturn server in order to reflect something triggered by the remote host? |
Beta Was this translation helpful? Give feedback.
All reactions
-
It doesn't seem to be coturn as there are two way messages flwoing through it in the failure case (if it was coturn I'd expect to see only one-way). Are you able to get the streaming server logs? It would be useful to compare those in the success and failure cases. |
Beta Was this translation helpful? Give feedback.
All reactions
-
From what I have been told it should be coturn, but I will verify that, and have also reached out to the server team. They are in another time zone, so might take a while. |
Beta Was this translation helpful? Give feedback.
All reactions
-
We have now tried running with a coturn server we set up ourselves in order to verify whether it happens there as well, but also to get access to the logs. The issue happens less frequently with this server, but it still happens, and the logs does not really provide any clue about what happens. Any suggestions on something to try on our side in order to get any further on this? |
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm struggling for ideas as well. It's very crude but what about putting a timer in your app and if the RTCPeerConnection isn't in a connected state after 10s then restart ICE and see if that does anyting. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have an implementation using WebRTC part of SIPSorcery in place which 2 out of 3 times works fine, but approximately every third attempt the flow seems to stop midway and then eventually times out. The logs will show the below (I have replaced TURN server address with 1.2.3.4, TURN server uri with TURNURI and certificate with XYZ), but then next line will be a timeout:
The times where it work I get the exact same, but then it will continue with this:
We have another web based client towards the same servers and do not see the same issue there. Does anyone have an idea what could be the reason why "ICE RTP channel sending connectivity check for" often times out?
Beta Was this translation helpful? Give feedback.
All reactions