sipsorcery icon indicating copy to clipboard operation
sipsorcery copied to clipboard

How to know which STUN.TURN server is used in PeerConnection

Open mail2mhossain opened this issue 1 year ago • 1 comments

We are providing a list of STUN and TURN servers url. Now we want to know which one is used in a PeerConnection.

mail2mhossain avatar Aug 11 '24 09:08 mail2mhossain

In case of relay server. You can subscribe to the onicecandidate event and get the DestinationEndPoint.

pc.onicecandidate += (ice) =>
{
    if(ice.type == RTCIceCandidateType.relay)
        _relayServer = ice.DestinationEndPoint;
}

ha-ves avatar Aug 15 '24 18:08 ha-ves

Is this solved?

sipsorcery avatar Oct 28 '24 23:10 sipsorcery