1
votes

When creating webrtc peer connection, I passed in a list of STUN/TURN ICE servers (no trickling ICE). But when establishing the connection I only saw local ip address in ice candidates in the offer created. The same for the answer received. The connection worked sometimes. Was that expected? Where I could check if that was wrong?

2

2 Answers

0
votes

It turned out that TURN server urls do exist in the sdp offer and answer. The issue in my case was I added the ICE servers after peer connection creation so it didn't add to the offer.

0
votes

No, the STUN/TURN ICE urls will not be present offer/answer SDP.

These servers are meant to be used by a peer connection to generate ICE candidates. The peer you would like to connect to has nothing to do with how you gather your candidates, therefore it does not care about your stun/turn configurations. It only cares about your actual ice candidates and the metadata of the media you're about to send.

If you are interested enough, I recommend you take a look at WebRTC for the curious, it covers this topic in detail yet it is quite comprehensible.