WebRTC: TURN server deployment and usage

The TURN server is a part of WebRTC environment that transmits media traffic between peers if a direct peer-to-peer connection is not available (for example due to firewall restrictions). 

When should you have it? 
- When you want to transmit WebRTC streams between any random points of the internet or have no information about the transmission routes.  
- When your WebRTC transmission is critical and the content should be delivered at any cost.

There are a lot of TURN server installation packages. We have used a TurnServer from the SourceForge, but it's not a mandatory. You can use any other  TURN server in your environment. 

To deploy the TurnServer you need to: 

To use a TURN server you should specify the address and password by "turn_server" and  "turn_password" MWebRTC object properties.
Here is a syntax example: 
turn_server = turn:[email protected]:3478 
turn_password = password1 

"turn" - service keyword
"user1" - the username
"medialooks.com:3478" - turn server address and port
"password1" - password

You can specify this parameter values it in 2 ways:
1) In a registry. This value will be used by default by all newly created  MWebRTC objects.    
turn_server = turn:[email protected]:3478
turn_password = password1

2) Using PropsSet method. This value will be used within the object's lifetime.
m_objWebRTC.PropsSet("turn_server", "turn:[email protected]:3478"); 
m_objWebRTC.PropsSet("turn_password", "password1");

TURN server consumes a lot of traffic and calculation power because it has to transmit the media content between the peers. Make sure that you have a powerful hardware and wide traffic bandwidth to manage this task.