Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).

about turnServer

Siping_Q_
Beginner
671 Views
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.
0 Kudos
7 Replies
IHack
Beginner
671 Views
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?
0 Kudos
Siping_Q_
Beginner
671 Views

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?

0 Kudos
IHack
Beginner
671 Views
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.
0 Kudos
Siping_Q_
Beginner
671 Views

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))

 

0 Kudos
Siping_Q_
Beginner
671 Views

Hi Ivan H.,

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

Best wishes

0 Kudos
Siping_Q_
Beginner
671 Views
can anyone help me solve the problem? many thanks
0 Kudos
Siping_Q_
Beginner
671 Views

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

0 Kudos
Reply