RTCMultiConnection icon indicating copy to clipboard operation
RTCMultiConnection copied to clipboard

STUN/TURN seems to not be working

Open PreDeToR opened this issue 5 years ago • 1 comments

Hi Guys

I need some help. I have been testing two cases between my phone (Safari) and my laptop (FireFox:

  1. Both on Wifi - Works
  2. Laptop on Wifi, Phone GSM - Fails.

I configure my STUN/TURN servers :

connection.iceServers = []; connection.iceServers.push( { urls : 'stun:bn-turn1.xirsys.com', } ); connection.iceServers.push( { urls : [ "turn:bn-turn1.xirsys.com:80?transport=udp","turns:bn-turn1.xirsys.com:443?transport=tcp","turns:bn-turn1.xirsys.com:5349?transport=tcp" ], credential: 'xxxx', username : 'yyyy' } );

For case 2 I get the following error: WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details

When looking through the console logs, I get the following Candidates but no relay candidates. I checked logs for both cases, the only difference is the ports but still I do not see my relay candidates at all

Set local description for remote user 8vbg3y92amj RTCMultiConnection.js:5844:25 Your candidate pairs: candidate:0 1 UDP 2122252543 172.1.1.186 64883 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:4 1 UDP 2122187007 192.168.89.214 56406 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:8 1 TCP 2105524479 172.1.1.186 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:11 1 TCP 2105458943 192.168.89.214 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:0 2 UDP 2122252542 172.1.1.186 52328 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:4 2 UDP 2122187006 192.168.89.214 54618 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:8 2 TCP 2105524478 172.1.1.186 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:11 2 TCP 2105458942 192.168.89.214 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:0 1 UDP 2122252543 172.1.1.186 54086 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:4 1 UDP 2122187007 192.168.89.214 53384 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:8 1 TCP 2105524479 172.1.1.186 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:11 1 TCP 2105458943 192.168.89.214 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:0 2 UDP 2122252542 172.1.1.186 54708 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:4 2 UDP 2122187006 192.168.89.214 60650 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:8 2 TCP 2105524478 172.1.1.186 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:11 2 TCP 2105458942 192.168.89.214 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:0 1 UDP 2122252543 172.1.1.186 64754 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:4 1 UDP 2122187007 192.168.89.214 57736 typ host RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:8 1 TCP 2105524479 172.1.1.186 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:11 1 TCP 2105458943 192.168.89.214 9 typ host tcptype active RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:1 1 UDP 1686052863 102.132.163.232 64883 typ srflx raddr 172.1.1.186 rport 64883 RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:5 1 UDP 1685987327 105.27.179.86 56406 typ srflx raddr 192.168.89.214 rport 56406 RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:1 2 UDP 1686052862 102.132.163.232 52328 typ srflx raddr 172.1.1.186 rport 52328 RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:5 2 UDP 1685987326 105.27.179.86 54618 typ srflx raddr 192.168.89.214 rport 54618 RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:1 1 UDP 1686052863 102.132.163.232 54086 typ srflx raddr 172.1.1.186 rport 54086 RTCMultiConnection.js:3398:25 Your candidate pairs: candidate:5 1 UDP 1685987327 105.27.179.86 53384 typ srflx raddr 192.168.89.214 rport 53384 RTCMultiConnection.js:3398:25 Remote peer's candidate pairs: candidate:1797431036 1 udp 2113937151 172.1.1.109 62893 typ host generation 0 ufrag qtGL network-cost 999 RTCMultiConnection.js:756:29 Remote peer's sdp: v=0

PreDeToR avatar Nov 03 '20 10:11 PreDeToR

I have the same as you, and it works here. I use xirsys too

here's how I do:

this.connection.iceServers = [
      {
        urls: ["stun:eu-turn4.xirsys.com"],
      },
      {
        username:
          "XXXXXXXXXXXXXXXX",
        credential: "XXXXXXXXXXXXXXXX",
        urls: [
          "turn:eu-turn4.xirsys.com:80?transport=udp",
          "turn:eu-turn4.xirsys.com:3478?transport=udp",
          "turn:eu-turn4.xirsys.com:80?transport=tcp",
          "turn:eu-turn4.xirsys.com:3478?transport=tcp",
          "turns:eu-turn4.xirsys.com:443?transport=tcp",
          "turns:eu-turn4.xirsys.com:5349?transport=tcp",
        ],
      },
    ]

numerized avatar Nov 06 '20 11:11 numerized