WebRTC solution using ICE - STUN, TURN not able to connect to tablet over 3G network

3,537 views
Skip to first unread message

Kenneth Thorman

unread,
Jun 26, 2013, 7:56:21 AM6/26/13
to turn-server-project...@googlegroups.com
Hi

Background:
I am currently working on building a web application that has integrated webrtc video/audio 1-1 meetings.
The application is mainly built using AngularJS on top of REST services using SAML for federated authentication.

Current status/problem:
Currently we are able to get 1 PCs to connect and do a video meeting, this works fine. We are currently using XMPP (ejabberd2) for signalling.
The problem arises when I want to connect a tablet with a supported version of Chrome installed.
On WIFI the tablet connects to the meeting just fine and all works. When I turn of the WIFI and try to connect to the meeting using the 3G connection it fails and is never able to connect to the meeting. I suspect that this has something to do with ICE/TURN or our TURN configuration.

There are several WebRTC demo projects out there where I see the same problem. Google's apprtc.appspot.com however works just fine on both 3G and WIFI.
I presume that Google's TURN server is configured "correctly" for this to work or they are using a special feature or something.

However my challenge I don't really know where to start troubleshooting this?

I presume that the Google Chrome debug_log might be a place to start and combine this with chrome://webrtc-internals and the logging feature on the turnserver.
I have already spent some time trying to find what is wrong, but I guess either I do not understand it when I see or there is nothing obvious in the logs.

Can any shed some light on how I go about solving this?

Thank you in advance.

Regards
Kenneth Thorman


Oleg Moskalenko

unread,
Jun 26, 2013, 9:58:12 AM6/26/13
to turn-server-project...@googlegroups.com
Hi Kenneth

there is not enough information in your post to tell you what is wrong in the configuration. Did you check the webrtc forum ?

There are too many cnfiguration details involved and many things can go wrong if anything is not configured correctly. Try to browse the webrtc forum for the turn server configuration examples. Check the links on the front page f the project with WebRTc - TURN configuration examples. If nothing helps, post your configuration here and somebody may help you.

Oleg

Oleg Moskalenko

unread,
Jun 26, 2013, 11:00:55 AM6/26/13
to turn-server-project...@googlegroups.com

Kenneth, see also the WebRTC section in the wiki page on the project site and double-check that you set the recommended WebRTC-related parameters correctly (authentication, etc).

Oleg Moskalenko

unread,
Jun 26, 2013, 4:00:20 PM6/26/13
to turn-server-project...@googlegroups.com
The Kenneth's problem was that he was using DNS names as paremeters, in place of IP addresses.
Message has been deleted

Oleg Moskalenko

unread,
Jun 26, 2013, 4:21:11 PM6/26/13
to turn-server-project...@googlegroups.com
This is cool, I am glad that it works.

Oleg


On Wed, Jun 26, 2013 at 1:11 PM, Kenneth Thorman <...> wrote:
Hi Oleg

You are right this was what caused all the trouble.

After changing the command (replacing the DNS name in the -X argument with the actually public visible IP address of the server) used to start the STUN server from

turnserver -v -r ec2-11-111-11-11.eu-west-1.compute.amazonaws.com -X ec2-11-111-11-11.eu-west-1.compute.amazonaws.com --no-tls --no-dtls -a -b turnuserdb.conf -c turnserver.conf -u XXXX...@ec2-11-111-11-11.eu-west-1.compute.amazonaws.com:XXXXXXXXXXX

to

turnserver -v -r ec2-11-111-11-11.eu-west-1.compute.amazonaws.com -X 11.111.11.11 --no-tls --no-dtls -a -b turnuserdb.conf -c turnserver.conf -u XXXX...@ec2-11-111-11-11.eu-west-1.compute.amazonaws.com:XXXXXXXXXXX

It now works, both across WIFI and 2G, 3G and 4G networks.

Thank you soo much!

Regards
Kenneth Thorman

Kenneth Thorman

unread,
Jun 26, 2013, 4:43:43 PM6/26/13
to turn-server-project...@googlegroups.com
And here a posting that timeline wise should have been my second response in this thread. For some reason my Google accounts got mixed  up so I ended up replying directly to Oleg and that does not benefit this thread. So here it is



--------------------------------------------- Out of timeline wise order ---------------------------------------------

A small update from here

The TURN server is running on an AWS EC2 server.

The server is started with 

turnserver -r ec2-54-212-22-11.eu-west-1.compute.amazonaws.com -X ec2-54-212-22-11.eu-west-1.compute.amazonaws.com --no-tls --no-dtls -a -b /usr/local/etc/turnuserdb.conf -c /usr/local/etc/turnserver.conf -u XXX...@ec2-54-212-22-11.eu-west-1.compute.amazonaws.com:XXXXXXXXXX

(please note: I have changed the servers DNS address in the above command to not publish the actual DNS name here)

This seems to correspond with the notes in http://www.dialogic.com/den/forums/t/10238.aspx posting #2 (unless there is a problem using DNS instead of an IP)?

The EC2 Security group the server is configured with the following ports open


TCP
Port (Service) Source
22 (SSH) 0.0.0.0/0
3478 - 3479 0.0.0.0/0
8080 (HTTP*) 0.0.0.0/0

UDP
Port (Service) Source
3478 - 3479 0.0.0.0/0
5222 0.0.0.0/0
10000 - 40000 0.0.0.0/0

Again as mentioned above internet - internet is not a problem it is only internet - 3G network that is a problem.

I guess I might be able to look at what is going on using the tablet as a wireless hotspot and then connect the computer to that hotspot.
Then using another machine to connect using the wifi, I should be able to track what addresses are passed back from the TURN server for relaying.

Maybe this this not a TURN problem at all?

Regards
Kenneth

--------------------------------------------- Out of timeline wise order ---------------------------------------------

Manish Patel

unread,
Nov 8, 2016, 12:47:19 AM11/8/16
to TURN Server (Open-Source project)
Hi I am having same problem that it works on wifi but not in 2G/3G/4G in iOS device. It works in android device for wifi and 2G/3G/4G.

so my question is : Is it a problem with DNS which you have mentioned? or problem from iOS programming?

if its DNS issue then why does works in android devices?

Please help me out on this.

Thanks,
Manish
Message has been deleted

朱嘉俊

unread,
Oct 24, 2017, 11:06:31 AM10/24/17
to TURN Server (Open-Source project)

i am having same problem. can you help me?

Neelam Parmar

unread,
Apr 16, 2019, 6:17:13 AM4/16/19
to TURN Server (Open-Source project)
Hello,

I am facing similar issue.

I am able to connect to devices using mobile data, but for Wifi I am not able to connect.
If I use google's STUn it connects, but for our own STUN it's not connecting on WiFi.

Thanks
Reply all
Reply to author
Forward
0 new messages