diff --git a/README.md b/README.md
index ee8a365..b57a4eb 100644
--- a/README.md
+++ b/README.md
@@ -108,7 +108,6 @@ docker-compose -f docker-compose.greenlight.yml up -d
## Open Tasks
- add support for recording
-- add coturn support
- further separate bbb-core into individual container
- enable IPv6 support
- fix captions (they don't appear, `readOnlyPadId` is missing)
diff --git a/conf/.gitignore b/conf/.gitignore
index 232e260..55a0124 100644
--- a/conf/.gitignore
+++ b/conf/.gitignore
@@ -1,3 +1,4 @@
*/*
!.gitkeep
-!example.xml
\ No newline at end of file
+!example.xml
+*.pdf
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 278947b..18acb38 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -10,6 +10,9 @@ services:
DOMAIN: ${DOMAIN}
SHARED_SECRET: ${SHARED_SECRET}
WELCOME_FOOTER: ${WELCOME_FOOTER}
+ STUN_SERVER: stun:${STUN_IP}:${STUN_PORT}
+ TURN_SERVER: ${TURN_SERVER}
+ TURN_SECRET: ${TURN_SECRET}
volumes:
- bigbluebutton:/var/bigbluebutton
networks:
@@ -34,7 +37,7 @@ services:
network_mode: host
nginx:
- image: nginx:1.17
+ image: nginx:1.18-alpine
restart: unless-stopped
depends_on:
- etherpad
@@ -46,13 +49,14 @@ services:
- bigbluebutton:/var/bigbluebutton
- ./mod/nginx/bbb:/etc/nginx/bbb
- ./mod/nginx/bigbluebutton:/etc/nginx/conf.d/default.conf
+ - ${DEFAULT_PRESENTATION:-/dev/null}:/etc/nginx/html/default.pdf
networks:
- bbb-net
extra_hosts:
- "host.docker.internal:10.7.7.1"
etherpad:
- image: etherpad/etherpad:1.8.0
+ image: etherpad/etherpad:1.8.4
restart: unless-stopped
depends_on:
- redis
@@ -67,7 +71,7 @@ services:
ipv4_address: 10.7.7.4
redis:
- image: redis:5.0-alpine
+ image: redis:6.0-alpine
restart: unless-stopped
ports:
- "127.0.0.1:6379:6379" # TODO: remove as soon as we updated all redis host references
@@ -135,6 +139,17 @@ services:
networks:
- bbb-net
+ periodic:
+ build: mod/periodic
+ restart: unless-stopped
+ depends_on:
+ - mongodb
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - bigbluebutton:/var/bigbluebutton
+ networks:
+ - bbb-net
+
volumes:
bigbluebutton:
diff --git a/mod/core/Dockerfile b/mod/core/Dockerfile
index fe131bc..d755859 100644
--- a/mod/core/Dockerfile
+++ b/mod/core/Dockerfile
@@ -59,6 +59,8 @@ COPY red5-webapps/video-broadcast/video-broadcast.properties /usr/share/red5/web
COPY bigbluebutton.yml /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
COPY web/bigbluebutton.properties /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl
+COPY web/turn-stun-servers.xml /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl
+
COPY bbb-apps-akka/application.conf /usr/share/bbb-apps-akka/conf/application.conf.tmpl
COPY bbb-fsesl-akka/application.conf /etc/bbb-fsesl-akka/application.conf
COPY bbb-transcode-akka/application.conf /etc/bbb-transcode-akka/application.conf
diff --git a/mod/core/entrypoint.sh b/mod/core/entrypoint.sh
index f3c68e6..71e67df 100755
--- a/mod/core/entrypoint.sh
+++ b/mod/core/entrypoint.sh
@@ -19,4 +19,5 @@ chown -R bigbluebutton:bigbluebutton /var/bigbluebutton
dockerize \
-template /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties \
-template /usr/share/bbb-apps-akka/conf/application.conf.tmpl:/usr/share/bbb-apps-akka/conf/application.conf \
+ -template /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl:/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml \
/usr/bin/supervisord --nodaemon
diff --git a/mod/core/web/turn-stun-servers.xml b/mod/core/web/turn-stun-servers.xml
new file mode 100644
index 0000000..e97dcab
--- /dev/null
+++ b/mod/core/web/turn-stun-servers.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+ {{if .Env.TURN_SERVER }}
+
+
+
+
+
+ {{end}}
+
+
+
+
+
+
+
+
+
+ {{if .Env.TURN_SERVER }}
+
+ {{end}}
+
+
+
+
+
+
+
+
diff --git a/mod/html5/settings.yml b/mod/html5/settings.yml
index 5ea6600..a31ce3d 100644
--- a/mod/html5/settings.yml
+++ b/mod/html5/settings.yml
@@ -9,9 +9,9 @@ public:
skipCheck: false
clientTitle: {{ .Env.CLIENT_TITLE }}
appName: BigBlueButton HTML5 Client
- bbbServerVersion: 2.2-dev
+ bbbServerVersion: 2.2
copyright: "©2019 BigBlueButton Inc."
- html5ClientBuild: 870
+ html5ClientBuild: 924
helpLink: https://bigbluebutton.org/html5/
lockOnJoin: true
cdn: ""
@@ -68,17 +68,14 @@ public:
openActions:
accesskey: A
descId: openActions
- openStatus:
- accesskey: S
- descId: openStatus
branding:
displayBrandingArea: false
connectionTimeout: 60000
showHelpButton: true
effectiveConnection:
- - critical
- - danger
- - warning
+ - critical
+ - danger
+ - warning
externalVideoPlayer:
enabled: true
networkMonitoring:
@@ -90,27 +87,38 @@ public:
chromeDefaultExtensionLink: {{ .Env.SCREENSHARE_EXTENSION_LINK }}
chromeExtensionKey: KEY
chromeExtensionLink: LINK
- chromeScreenshareSources:
- - window
- - screen
- firefoxScreenshareSource: window
+ screenshare:
+ constraints:
+ video:
+ frameRate:
+ ideal: 5
+ max: 10
+ width:
+ max: 2560
+ height:
+ max: 1600
+ audio: false
+ chromeScreenshareSources:
+ - window
+ - screen
+ firefoxScreenshareSource: window
cameraProfiles:
- - id: low
- name: Low quality
- default: false
- bitrate: 100
- - id: medium
- name: Medium quality
- default: true
- bitrate: 200
- - id: high
- name: High quality
- default: false
- bitrate: 500
- - id: hd
- name: High definition
- default: false
- bitrate: 800
+ - id: low
+ name: Low quality
+ default: false
+ bitrate: 100
+ - id: medium
+ name: Medium quality
+ default: true
+ bitrate: 200
+ - id: high
+ name: High quality
+ default: false
+ bitrate: 500
+ - id: hd
+ name: High definition
+ default: false
+ bitrate: 800
enableScreensharing: true
enableVideo: true
enableVideoStats: false
@@ -170,6 +178,8 @@ public:
hidePresentation: false
media:
stunTurnServersFetchAddress: "/bigbluebutton/api/stuns"
+ cacheStunTurnServers: true
+ fallbackStunServer: ''
mediaTag: "#remote-media"
callTransferTimeout: 5000
callHangupTimeout: 2000
@@ -215,6 +225,8 @@ public:
mime: application/vnd.oasis.opendocument.image
- extension: .jpg
mime: image/jpeg
+ - extension: .jpeg
+ mime: image/jpeg
- extension: .png
mime: image/png
user:
@@ -301,10 +313,9 @@ public:
- pencil
- hand
clientLog:
- server: {enabled: true, level: info}
- console: {enabled: true, level: debug}
- external: {enabled: false, level: info, url: 'https://LOG_HOST/html5Log', method: POST,
- throttleInterval: 400, flushOnClose: true, logTag: ""}
+ server: { enabled: true, level: info }
+ console: { enabled: true, level: debug }
+ external: { enabled: false, level: info, url: https://LOG_HOST/html5Log, method: POST, throttleInterval: 400, flushOnClose: true, logTag: "" }
private:
app:
host: 0.0.0.0
@@ -347,23 +358,23 @@ private:
heapdump:
enabled: false
minBrowserVersions:
- - browser: chrome
- version: 59
- - browser: chromeMobileIOS
- version: Infinity
- - browser: firefox
- version: 52
- - browser: firefoxMobile
- version: 52
- - browser: edge
- version: 17
- - browser: ie
- version: Infinity
- - browser: safari
- version: [11, 1]
- - browser: mobileSafari
- version: [11, 1]
- - browser: opera
- version: 46
- - browser: electron
- version: [0, 36]
+ - browser: chrome
+ version: 59
+ - browser: chromeMobileIOS
+ version: Infinity
+ - browser: firefox
+ version: 52
+ - browser: firefoxMobile
+ version: 52
+ - browser: edge
+ version: 17
+ - browser: ie
+ version: Infinity
+ - browser: safari
+ version: [11, 1]
+ - browser: mobileSafari
+ version: [11, 1]
+ - browser: opera
+ version: 46
+ - browser: electron
+ version: [0, 36]
diff --git a/mod/nginx/bbb/web.nginx b/mod/nginx/bbb/web.nginx
index 0b99434..6d67ba9 100755
--- a/mod/nginx/bbb/web.nginx
+++ b/mod/nginx/bbb/web.nginx
@@ -47,7 +47,7 @@
}
location ~ "^/bigbluebutton/presentation/download\/[0-9a-f]+-[0-9]+/[0-9a-f]+-[0-9]+$" {
- if ($arg_presFilename !~ "^[0-9a-zA-Z]+\.[0-9a-zA-Z]+$") {
+ if ($arg_presFilename !~ "^[0-9a-zA-Z]+-[0-9]+\.[0-9a-zA-Z]+$") {
return 404;
}
proxy_pass http://core:8090$uri$is_args$args;
diff --git a/mod/nginx/default.pdf b/mod/nginx/default.pdf
new file mode 100644
index 0000000..32374bc
Binary files /dev/null and b/mod/nginx/default.pdf differ
diff --git a/mod/periodic/Dockerfile b/mod/periodic/Dockerfile
new file mode 100644
index 0000000..d04e252
--- /dev/null
+++ b/mod/periodic/Dockerfile
@@ -0,0 +1,15 @@
+FROM debian:buster-slim
+
+# -- install mongo cli
+RUN apt-get update \
+ && apt-get install -y wget libcurl4 \
+ && wget https://repo.mongodb.org/apt/debian/dists/buster/mongodb-org/4.2/main/binary-amd64/mongodb-org-shell_4.2.6_amd64.deb \
+ && dpkg -i mongodb*.deb \
+ && rm mongodb*.deb
+
+# -- install docker cli
+COPY --from=library/docker:latest /usr/local/bin/docker /usr/bin/docker
+
+COPY bbb-restart-kms bbb-resync-freeswitch entrypoint.sh /
+
+ENTRYPOINT ["/entrypoint.sh"]
\ No newline at end of file
diff --git a/mod/periodic/bbb-restart-kms b/mod/periodic/bbb-restart-kms
new file mode 100755
index 0000000..6b30b9f
--- /dev/null
+++ b/mod/periodic/bbb-restart-kms
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Source:
+# https://github.com/alangecker/bbb-packages/blob/f83431c227be2c95025ea81083baeaa87667b170/bbb-webrtc-sfu/data/etc/cron.hourly/bbb-restart-kms
+
+#
+# Restart Kurento every 24+ hours
+#
+
+if [ ! -f /tmp/bbb-kms-last-restart.txt ]; then
+ date +%Y-%m-%d\ %H:%M:%S > /tmp/bbb-kms-last-restart.txt
+ exit
+fi
+
+users=$(mongo --quiet mongodb://10.7.7.6:27017/meteor --eval "db.users.count({connectionStatus: 'online'})")
+echo "currently active users: $users"
+
+if [ "$users" -eq 0 ]; then
+
+ # Make sure 24 hours have passed since last restart
+
+ # Seconds since epoch for last restart
+ dt1=$(cat /tmp/bbb-kms-last-restart.txt)
+ t1=`date --date="$dt1" +%s`
+
+ # Current seconds since epoch
+ dt2=`date +%Y-%m-%d\ %H:%M:%S`
+ t2=`date --date="$dt2" +%s`
+
+ # Hours since last restart
+ let "tDiff=$t2-$t1"
+ let "hDiff=$tDiff/3600"
+
+ if [ "$hDiff" -ge 24 ]; then
+ echo "scheduled restart of kurento after 24h"
+ CONTAINER_ID=$(docker ps | grep kurento | awk '{print $1}')
+ docker restart $CONTAINER_ID
+ date +%Y-%m-%d\ %H:%M:%S > /tmp/bbb-kms-last-restart.txt
+ fi
+fi
diff --git a/mod/periodic/bbb-resync-freeswitch b/mod/periodic/bbb-resync-freeswitch
new file mode 100755
index 0000000..5e0c138
--- /dev/null
+++ b/mod/periodic/bbb-resync-freeswitch
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# https://github.com/bigbluebutton/bigbluebutton/pull/9597/files
+
+CONTAINER_ID=$(docker ps | grep freeswitch | awk '{print $1}')
+docker exec -it $CONTAINER_ID fs_cli -H 10.7.7.1 -P 8021 -x 'fsctl sync_clock_when_idle'
\ No newline at end of file
diff --git a/mod/periodic/entrypoint.sh b/mod/periodic/entrypoint.sh
new file mode 100755
index 0000000..fce381a
--- /dev/null
+++ b/mod/periodic/entrypoint.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#
+# How N days back to keep files
+#
+history=5
+
+while :
+do
+ # restart kurento after 24h
+ /bbb-restart-kms
+
+ # resync freeswitch
+ /bbb-resync-freeswitch
+
+ # delete presentations older than N days
+ find /var/bigbluebutton/ -maxdepth 1 -type d -name "*-*" -mtime +$history -exec rm -rf '{}' +
+
+ sleep 30m
+done
\ No newline at end of file
diff --git a/sample.env b/sample.env
index c896cbd..9849dc7 100644
--- a/sample.env
+++ b/sample.env
@@ -11,6 +11,11 @@ EXTERNAL_IP=144.76.97.10
STUN_IP=216.93.246.18
STUN_PORT=3478
+# TURN SERVER
+# uncomment and adjust following two lines to add an external TURN server
+#TURN_SERVER=turns:turn.example.com:443?transport=tcp
+#TURN_SECRET=
+
SCREENSHARE_EXTENSION_KEY=akgoaoikmbmhcopjgakkcepdgdgkjfbc
SCREENSHARE_EXTENSION_LINK=https://chrome.google.com/webstore/detail/bigbluebutton-screenshare/akgoaoikmbmhcopjgakkcepdgdgkjfbc
@@ -21,7 +26,9 @@ WELCOME_FOOTER=This server is running BigBlueButton.
To join this meeting by phone, dial:
INSERT_YOUR_PHONE_NUMBER_HERE
Then enter %%CONFNUM%% as the conference PIN number.
-
+# for a different default presentation, place the pdf file in ./conf/ and
+# adjust the following path
+DEFAULT_PRESENTATION=./mod/nginx/default.pdf
# -------------------------------