0

I am developing one Android application for remote screen share using webRTC. For STUN servers I used google stun server. It is working well on WIFI and LTE in India. In USA it's not working on LTE, but it's working on WIFI.

First, I used only STUN server and then now combined STUN and TURN servers, but no use .

Below is my code,

val iceServers = ArrayList<PeerConnection.IceServer>()
iceServers.add(PeerConnection.IceServer("stun:stun.l.google.com:19302"))
iceServers.add(PeerConnection.IceServer("turn:13.250.13.83:3478?transport=udp", "YzYNCouZM1mhqhmseWk6", "YzYNCouZM1mhqhmseWk6"))
return iceServers

Still, this is not working in USA on LTE.

Is this GOOGLE stun server doesn't work for USA in LTE?

Rumit Patel
  • 8,830
  • 18
  • 51
  • 70
angrybird
  • 45
  • 1
  • 6

1 Answers1

0

Check network connections with STUN, TURN

Check these two links in latest Chrome in mobile.

https://networktest.twilio.com

https://test.webrtc.org

Probably you can check the network is okay or not.

Maybe IPv6 Problem

Also in Korea, I have some problem with IPv6 LTE mobile clients. Sometimes mobile carrier give IPv6 to their clients, then P2P connection does not work. Maybe there is same problem on there.

I solved with TURN + TCP. I don't know why, but IPv6 clients are not works with UDP.

Here are some related documents:

  • Webrtc media over tcp?

    To force strict TCP via TURN server:

    • Use only TURN url with ?transport=tcp
    • Specify iceTransportPolicy:"relay", so that all media will flow via TURN
  • TURN, STUN setting

    Provide TURN and STUN functionality over TCP and UDP:

    sudo turnserver -L <your STUN server\'s IP address> -o -a -f -r red5pro.com
    

    To run the server without TCP:

    sudo turnserver -L <your STUN server\'s IP address> -o -a -f --no-tcp --no-tcp-relay -r red5pro.com
    

    To run STUN only over UDP:

    sudo turnserver -L <your STUN server\'s IP address> -o -a -f --stun-only --no-tcp --no-tcp-relay -r red5pro.com
    
  • What happens when WebRTC shifts to TURN over TCP

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
seunggi
  • 166
  • 6