mediasoup not working on mobile data or hotspot and not connecting the client especially on IPV6 address connecting to another peer at IPV4

Hi experts,

I am facing problems on mobile data / 4g / or mobile hotspot and all devices connected with mobile hotspot with hotspot as wifi endpoint. Also connecting the device connected to proper wifi to the device on mobile data.

Desktop uses Chrome browser
On the desktop with proper wifi network, the connection is established on both send and receive transports, as seen in chrome://webrtc-internals.

  • ICE connection state: new => checking => connected
  • Connection state: new => connecting => connected
  • Signaling state: new => have-remote-offer => stable => have-remote-offer => stable
  • ICE Candidate pair: ip1:udp <=> ip2:udp

The incoming stream in the receive transport isn’t flowing. The outbound video and audio streams are flowing properly and I can see bytes sent and bits/s.

Another observation is that on the device on wifi, sender transport shows 3 outbound video streams but the receiving transport shows only 2 inbound video streams. Although it’s connected to the server.

Mobile uses Chrome browser
On the mobile chrome://webrtc-internals shows

  • ICE connection state: new

  • Connection state: new

  • Signaling state: new (receiver transport)

  • Signaling state: new => have-remote-offer => stable => have-remote-offer => stable (sender transport)

  • ICE Candidate pair: (not connected)

On this mobile device there are 4 ice Candidates generated from host - 2 udp candidates and 2 tcp candidates . 1 TCP and 1 UDP candidate have port as 9 (which is odd - which means some routing happening)

Although I faced this issue on v3demo.mediasoup.org this is persistent in the local code written and executed, along with IPV4 and IPV6. Mobile seems to get the IPV6 address and not IPV4 as public IP and has some issues connecting to the server.

It can be mediasoup-client is not connecting to the server on the mobile data / 4g. (This isn’t even a hotspot and another device. This is the mobile itself. or it can be the server settings incorrect or it can be any issue in the server library.

Not sure whether this is an issue in the main library or client library itself.

P.S.:
I have pure webrtc peer to peer connection and that needs TURN server for this scenario (behind some kind of NAT) and then it works. I guess same way for SFU, either mediasoup main library or mediasoup-client needs to handle this scenario.

Dear all,

Although this is not a 100% solution, below worked for me. I observed that my mobile is doing Traversal NAT or some other kind of NAT. It prevents to use the connection from mobile as it is. Thus, changing the mobile APN settings helped me avoid NAT and use it directly. Please refer to

and setting for vodafone India Vodafone APN Settings - India

One more update.

Passing the custom iceservers with TURN helps. Just need to setup own TURN servers and not try free online ones. Many of them don’t work properly.