Implementing our own STUN/TURN server for WebRTC Application [duplicate]

TURN it’s an extension of STUN, so TURN server has also STUN features. https://code.google.com/p/rfc5766-turn-server/ works also as a STUN, so you can try to write something like this: var pc_config = { “iceServers”: [{ “url”:”turn:my_username@<turn_server_ip_address>”, “credential”:”my_password” }] }; pc_new = new webkitRTCPeerConnection(pc_config);

CoTURN: How to use TURN REST API?

Few things to be clarified here are: GET /?service=turn&username=mbzrxpgjys which returns a JSON, is just a suggested uri for retrieving time-limited TURN credentials from the server, you do not have to follow that, your uri can be just /?giveMeCredentials. In fact, I use my socket connection to retrieve this data, not direct http call with … Read more

STUN/TURN server connectivity test

Edit: A nice implementation in github.io taken from comment to another answer( choose “relay” in IceTransports value): Test TURN Server following Benjamin Trent’s advice, I wrote the below code to test TURN server’s connectivity, works on both firefox n chrome: function checkTURNServer(turnConfig, timeout){ return new Promise(function(resolve, reject){ setTimeout(function(){ if(promiseResolved) return; resolve(false); promiseResolved = true; }, … Read more

How does WebRTC work?

WebRTC gives SDP Offer to the client JS app to send (however the JS app wants) to the other device, which uses that to generate an SDP Answer. The trick is that the SDP includes ICE candidates (effectively “try to talk to me at this IP address and this port”). ICE works to punch open … Read more