I've been looking into an easy fix to detect the correct external IP
also when using the OpenVZ environment and it probably really
simple, since when issuing an ifconfig on an OpenVZ Ubuntu14.04 the
network interface has a quite unique name (venet0:0). By simply
checking for that string in ifconfig, the environment can be
detected and in that case we simply choose the last in stead of the
first ip on the ifconfig list, which is the external IP in OpenVZ, I
tried this on several OpenVZ boxes and it works on OpenVZ and it also detects the correct IP
in KVM which is similar to a dedicated server. Here is the
code segment to replace the IP= line in bbb-conf:
# Determine IP so it works on multilingual installations
#
if [[ `sudo ifconfig` == *venet0:0* ]]
then
# IP detection for OpenVZ environment
IP=$(ifconfig | grep -v '127.0.0.1' | grep -E
"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | tail -1 | cut -d: -f2 | awk '{
print $1}')
else
# IP detection for regular environment
IP=$(ifconfig | grep -v '127.0.0.1' | grep -E
"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | head -1 | cut -d: -f2 | awk '{
print $1}')
fi
MEM=`free -m | grep Mem | awk '{ print $2}'`
This should avoid several "My WebRTC audio isn't working" posts...
Best regards
Oliver