Merge branch 'main' of ssh://git.coopcloud.tech:2222/jjsfunhouse/bigbluebutton

This commit is contained in:
2026-08-12 15:16:26 -04:00
2 changed files with 8 additions and 46 deletions
+6 -21
View File
@@ -81,29 +81,14 @@ fi
export SOUNDS_PATH=$SOUNDS_DIR/$(echo "$SOUNDS_LANGUAGE" | sed 's|-|/|g')
sed -i -e 's/10.7.7.10/0.0.0.0/g' /etc/freeswitch/vars.xml.tmpl
sed -i -e 's/console_loglevel=info/console_loglevel=debug/g' /etc/freeswitch/vars.xml.tmpl
sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/external.xml
sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/internal.xml
# sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/external-ipv6.xml
# sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/internal.xml
# This deployment is IPv4-only (EXTERNAL_IPv6 is unset). Remove the IPv6 sofia
# profiles so they do not also bind the WebSocket audio port (5066).
rm -f /etc/freeswitch/sip_profiles/external-ipv6.xml
rm -f /etc/freeswitch/sip_profiles/internal-ipv6.xml
# Determine this container's IPv4 address on the internal overlay network.
FS_PEER_IP=$(getent hosts redis | awk '{print $1; exit}' || true)
OVERLAY_PREFIX=$(echo "$FS_PEER_IP" | cut -d. -f1,2)
OWN_IP=""
if [ -n "$OVERLAY_PREFIX" ]; then
OWN_IP=$(hostname -I | tr ' ' '\n' | grep "^${OVERLAY_PREFIX}\." | head -n1)
fi
[ -z "$OWN_IP" ] && OWN_IP=$(hostname -I | awk '{print $1}')
echo "entrypoint.freeswitch.sh: external profile binding IPv4, advertising ${OWN_IP}"
# Configure the IPv4 "external" profile for the overlay network.
sed -i -E 's#(<param name="rtp-ip" value=")[^"]*#\10.0.0.0#g' /etc/freeswitch/sip_profiles/external.xml
sed -i -E 's#(<param name="sip-ip" value=")[^"]*#\10.0.0.0#g' /etc/freeswitch/sip_profiles/external.xml
sed -i -E "s#(<param name=\"ext-rtp-ip\" value=\")[^\"]*#\1${OWN_IP}#g" /etc/freeswitch/sip_profiles/external.xml
sed -i -E "s#(<param name=\"ext-sip-ip\" value=\")[^\"]*#\1${OWN_IP}#g" /etc/freeswitch/sip_profiles/external.xml
# sed -i -e 's/$${local_ip_v4}/auto-nat/g' /etc/freeswitch/sip_profiles/external.xml
# sed -i -e 's/$${local_ip_v4}/auto-nat/g' /etc/freeswitch/sip_profiles/external-ipv6.xml
dockerize \
-template /etc/freeswitch/vars.xml.tmpl:/etc/freeswitch/vars.xml \
+2 -25
View File
@@ -14,29 +14,6 @@ else
echo >&2 "error: /run/secrets/fsesl_password does not exist"
exit 1
fi
# Determine this container's own IP on the internal overlay network.
OWN_IP=$(node -e '
const dgram = require("dgram");
const dns = require("dns");
dns.lookup("freeswitch", (err, addr, family) => {
if (err || !addr) { process.exit(1); }
const sock = dgram.createSocket(family === 6 ? "udp6" : "udp4");
sock.connect(9, addr, () => {
process.stdout.write(sock.address().address);
sock.close();
});
});
') || true
if [ -z "$OWN_IP" ]; then
echo >&2 "error: could not determine own container IP for mediasoup announcedIp"
exit 1
fi
echo "entrypoint.webrtc-sfu.sh using announcedIp=${OWN_IP} for the FreeSWITCH audio bridge"
export NODE_CONFIG="{\"mediasoup\":{\"plainRtp\":{\"listenIp\":{\"announcedIp\":\"${OWN_IP}\"}}}}"
sleep 100
# start npm in WORKDIR (should be /app ?)
npm start
npm start