We have issues with using Ant Media server due to firewall restrictions with many customers. If I use the TURN server, Can I solve this problem (for publish/play)? We are using the Conference Room type in our code.
Thanks.
We have issues with using Ant Media server due to firewall restrictions with many customers. If I use the TURN server, Can I solve this problem (for publish/play)? We are using the Conference Room type in our code.
Thanks.
You can enable TURN server for publishing and playing pages. For instance on your publishing page(/usr/local/antmedia/webapps/WebRTCAppEE/index.html), there is pc_config JavaScript variable like this
var pc_config = {
'iceServers' : [ {
'urls' : 'stun:stun.l.google.com:19302'
} ]
};
You can just change its value according to your TURN configuration like below
var pc_config = {
iceServers: [
{ urls: "turn:{TURN_SERVER_URL}",
username: "{TURN_SERVER_USERNAME}",
credential: "{TURN_SERVER_PASS}",
}
]
};
Ant Media Server v2.4.4 and later version will support adding TURN server for the server side. In order to do that, follow the instructions.
settings.webrtc.stunServerURI=turn:WRITE_YOUR_TURN_SERVER_URL
settings.webrtc.turnServerUsername=WRITE_YOUR_TURN_SERVER_USERNAME
settings.webrtc.turnServerCredential=WRITE_YOUR_TURN_SERVER_PASSWORD
sudo service antmedia restart
You can set custom stun server to the following property settings.webrtc.stunServerURI. Just don't forget to start with stun: prefix. If you don't have username or password, you can leave the fields blank.