Enhance COTURN_IP setting to support domain name settings

Is it possible to enhance the COTURN_IP setting inside the docker-compose file to support domain name setting in the future?

Hi @Huioqy

The reason we’re not using a domain name in the coturn ip is because Kurento uses libnice and this library does not support hostnames for stun.

So the limitation of COTURN_IP being “an IP” is attached directly to libnice and their support of hostnames. At the moment you can only use an IP.

Baesd on my understanding of the OpenviduConfig.java and testing results, if I set DOMAIN_OR_PUBLIC_IP=doaminA and COTURN_IP=domainB, the COTURN_IP will be overwritten to domainA. And if coturn and nginx are inside one vm with the same public ip and domain name, this is still going to work.

Besides, I also modified the OpenviduConfig.java to switch off asOptionalIPv4OrIPv6(property) function and directly set the coturn ip equal to a domain name which is different from the DOMAIN_OR_PUBLIC_IP. It also works well from my end.

So, I think I can actaully conclude that the Kurento libnice is working well with Domain name. Or, is there any other logic inside the openvidu server java code that will modify the COTURN_IP apart from the OpenviduConfig.java.

So is it possible for you guys to help to do a little bit testing from ur end on this CoturnIP=doaminname setup? As DNS Domain name technology is more realiable, it will allow us to deal with complex network segemention conditions and translate to different ip addresses for coturn server.

If you want to setup the turn server for clients, you can use domain name using this property in openvidu-browser: https://docs.openvidu.io/en/2.16.0/api/openvidu-browser/classes/openvidu.html#setadvancedconfiguration

Configuring TURN server for KMS different from the one in OpenVidu master node needs IP because a limitation in KMS.

Regards