For video calling i am using Phonertc (based on Webrtc)
I set up turnserver in Ubuntu 14.04.3 LTS I followed the instruction from https://github.com/coturn/rfc5766-turn-server/
i dowloaded turnserver-3.2.5.9-debian-wheezy-ubuntu-mint-x86-64bits.tar.gz
from http://turnserver.open-sys.org/downloads/v3.2.5.9/ and setup according to provided instruction.
After installing i change the /etc/turnserver.conf and uncomment following lines:
fignerprint
lt-cred-mech
realm (i set my domain name)
on etc/turnuserdb.conf i added plain username and password
when i run turnserver using command 'turnserver' it prints log as
0: log file opened: /var/tmp/turn_14007_2016-05-17.log
0:
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Citrix-3.2.5.9 'Marshal West'
0:
Max number of open files/sockets allowed for this process: 4096
0:
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 2000 (approximately)
0:
==== Show him the instruments, Practical Frost: ====
0: TLS supported
0: DTLS supported
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: OpenSSL compile-time version 0x1000105f: fresh enough
0: Default Net Engine version: 2 (UDP thread per network endpoint)
=====================================================
0: Config file found: /etc/turnserver.conf
0: Config file found: /etc/turnserver.conf
0: Config file found: /etc/turnuserdb.conf
0: WARNING: cannot find certificate file: turn_server_cert.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly
0: WARNING: cannot find private key file: turn_server_pkey.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly
0: NO EXPLICIT LISTENER ADDRESS(ES) ARE CONFIGURED
0: ===========Discovering listener addresses: =========
0: Listener address to use: 127.0.0.1
0: Listener address to use: 10.240.0.2
0: =====================================================
0: Total: 1 'real' addresses discovered
0: =====================================================
0: NO EXPLICIT RELAY ADDRESS(ES) ARE CONFIGURED
0: ===========Discovering relay addresses: =============
0: Relay address to use: 10.240.0.2
0: =====================================================
0: Total: 1 relay addresses discovered
0: =====================================================
Cannot create pid file: /var/run/turnserver.pid: Permission denied
0: Cannot create pid file: /var/run/turnserver.pid
0: pid file created: /var/tmp/turnserver.pid
0: IO method (main listener thread): epoll (with changelist)
0: Wait for relay ports initialization...
0: relay 10.240.0.2 initialization...
0: relay 10.240.0.2 initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
0: Total UDP servers: 1
0: Total General servers: 1
0: IO method (cli thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)
i have setup ice servers in client as
iceServers: [
{
url: 'stun:stun.l.google.com:19302'
},
{
url: self.config.turn.host,
username: self.config.turn.username,
password: self.config.turn.password
}]
Here, when user calls from mobile, web user is supposed to see the video from mobile device. And it works fine on wifi network Now the problem is when i tried to call from 3g network or 4g network call will be established but there is no transfer of data(video). Screen gets black.
I also tried to check different link to check if my turnserver is running. Easy way to test TURN server and it says that the turnserver is not running.
I am confused if really my turnserver is not running or switching between stun and turn is not working.
i was having problem because my turnserver was not running in a public ip. i installed turnserver in an instance having public ip and access it through other network and now its working fine.