Jump to content
  • 0

Help on stun and tun server for antmedia


Nagendra Kumar1648581702
 Share

Question

Hello Team AntMedia,
   We are using an enterprise Antimedia server in production. I need some clarity on whether we need to use a stun/turn server.  In the case of antmedia when client is talking to the server (antmedia) then it's peer to peer b/w client and ant-media-server. On ant-media-server there is a default stun server.

1. Do we need to send the stun server configuration on the client-side as well?
2. Do I need to set up a turn server as well? We may need this to cover VPN cases. I thought ant-media-server is internally managing a turn as well as this is a server.

Thanks
Nagendra
Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

Hi Nagendra,

Thank you for using Ant Media Server my old friend :)

Let me try to answer your question. 

1. When there is a peer to peer b/w client and ant-media-server. You may need STUN server on the client-side. I mean it may require in some clients but does not require some others. So it's good to have that.  By default, google stun server is used. You can even change it on server side by specifying like below in app configuration WEB-INF/red5-web.properties

settings.webrtc.stunServerURI=stun:stun1.l.google.com:19302

2. If Ant Media Server can be directly accessible from your client (having an address that client can make request), you don't need to use TURN server. On the other hand, if there are some VPN cases or some kind of network virtualization, you may need TURN server so you can configure TURN server for the client side by changing pc_config variable. You can also check if your TURN server is working with Trickle ICE. If you have a candidate with relay type, it means your TURN server is working. Please keep in mind that TURN server is also a STUN server.  

 

var pc_config = 

{

       iceServers: [

                    { urls: "",

                      username: "",

                      credential: "",

                    }

                   ]

    };

I hope I could answer your questions. Please let us know if we can help further. 

Regards,
A. Oguz     

 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...