0

I got my webRTC application finally connecting my AT&T cellphone to my wifi using node-turn. It seems to work great, but after a minute it always changes the state of the peer and then disconnects. This is what consistently shows in the log

relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
Receiving UDP: from IPV4://166.177.121.0:12273 to IPV4://shrek.best:3478 refresh request TransactionID: 2b7569575a2b355632304b57
  lifetime: 0
  username: user
  realm: shrek.best
  nonce: 16f6398d044aba5381cedde7309fdb4c
  message-integrity: ee8f931a1dc5899d1e5c414e5ce2502e0cf93fb1
Sending UDP: from IPV4://shrek.best:3478 to IPV4://166.177.121.0:12273 refresh success TransactionID: 2b7569575a2b355632304b57
  lifetime: 0
  software: node-turn
  message-integrity: d12e0880dcd3dfe7ca37541f20cd02076b20f1e9
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273
relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273

And this is what my configuration looks like

var turn = new Turn({  
  // set options   
  listeningIps : ['shrek.best'],   
  authMech: 'long-term',  
  credentials: {  
      user: 'pass',  
  },  
  defaultAllocatetLifetime : 600000,   
  maxAllocateLifetime : 600000,  
  debugLevel : 'ALL',   
  realm : 'shrek.best',  
});

Any insight on how I could fix this?

After using a stopwatch, I found its consistently disconnecting after 40 seconds.

  • Suggestion: sign up for the free service tier at a stun/turn vendor like xirsys, get your app working perfectly, then rig your own turn servers. – O. Jones Jun 02 '20 at 23:45
  • That would be a good idea, I already have my app mostly complete so I am interested in fixing this. – Sebastian Frederick Jun 02 '20 at 23:57

0 Answers0