about turnServer

about turnServer

Could anyone please give me an example about how to use turnserver on Android? I'm using coturn currently. I tried many ways to connect the Android P2P Demo to my coturn but logs showed 401 auth fail.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Where do you try to use turn server?
Is it dedicated server with domain, or you try to connect by IP?
To which port do you try to connect?

Is connection works on PC?

I was trying to use android API  PeerClientConfiguration.setIceServers  to set IceServers on Android device. I use IP to connect my server, turnserver port is 3478. I did a test with "https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/" on PC and I could get my ip successfully. Android p2p demo didn't show any logs when client couldn't connect to turnserver. I didn't know what was going on there. Could you tell me a way to debug client's program?

Please, show how do you try to connect in android, it seems like you are unathorized. If connection on PC is ok, than it should be ok on android. Are you using static login and password?

It would be great to see your turn settings.
Post your server here. Maybe some config is wrong.

Hello Ivan H.  Sorry for this late reply. I used dynamic usercombo and password. Following is my config file for turnserver.

listening-device=eth0
listening-port=3478
tls-listening-port=5349
listening-ip=205.209.144.237
relay-ip=205.209.144.237
verbose
fingerprint
lt-cred-mech
use-auth-secret
static-auth-secret=12369874
server-name=shequ
realm=shequ
cert=/etc/turn_server_cert.pem
pkey=/etc/turn_server_pkey.pem
log-file=/var/tmp/turn.log
no-tlsv1
no-tlsv1_1
#no-tlsv1_2

The dynamic username and password used on android followed the rule below:

# usercombo -> "timestamp:userid"
# turn user -> usercombo      
# turn password -> base64(hmac(secret key, usercombo))

 

Hi Ivan H.,

you can also check the attachment which is the whole config file for my turnserver.

Best wishes

Attachments: 

AttachmentSize
Downloadtext/plain turnserver.txt20.92 KB

can anyone help me solve the problem? many thanks

Problem resolved.  The link helps me : https://groups.google.com/forum/#!topic/turn-server-project-rfc5766-turn.... My timestamp is wrong.

Leave a Comment

Please sign in to add a comment. Not a member? Join today