Skip to content

Commit 3a77aac

Browse files
jicofo: support visitors in jicofo configuration (jitsi#1610)
1 parent f860c5d commit 3a77aac

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ services:
284284
- ENABLE_OCTO
285285
- ENABLE_RECORDING
286286
- ENABLE_SCTP
287+
- ENABLE_VISITORS
287288
- ENABLE_AUTO_LOGIN
288289
- JICOFO_AUTH_LIFETIME
289290
- JICOFO_AUTH_PASSWORD
@@ -319,6 +320,9 @@ services:
319320
- SENTRY_ENVIRONMENT
320321
- SENTRY_RELEASE
321322
- TZ
323+
- VISITORS_MAX_PARTICIPANTS
324+
- VISITORS_MAX_VISITORS_PER_NODE
325+
- VISITORS_XMPP_SERVER
322326
- XMPP_DOMAIN
323327
- XMPP_AUTH_DOMAIN
324328
- XMPP_INTERNAL_MUC_DOMAIN

jicofo/rootfs/defaults/jicofo.conf

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" -}}
2+
{{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}}
23
{{ $JICOFO_ENABLE_AUTH := .Env.JICOFO_ENABLE_AUTH | default $ENABLE_AUTH | toBool -}}
34
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}}
45
{{ $JICOFO_AUTH_TYPE := .Env.JICOFO_AUTH_TYPE | default $AUTH_TYPE -}}
@@ -18,13 +19,17 @@
1819
{{ $JVB_XMPP_INTERNAL_MUC_DOMAIN := .Env.JVB_XMPP_INTERNAL_MUC_DOMAIN | default "muc.jvb.meet.jitsi" -}}
1920
{{ $JVB_XMPP_PORT := .Env.JVB_XMPP_PORT | default "6222" -}}
2021
{{ $JVB_XMPP_SERVER := .Env.JVB_XMPP_SERVER | default "xmpp.jvb.meet.jitsi" -}}
22+
{{ $VISITORS_XMPP_SERVER := .Env.VISITORS_XMPP_SERVER | default "" -}}
23+
{{ $VISITORS_XMPP_SERVERS := splitList "," $VISITORS_XMPP_SERVER -}}
24+
{{ $VISITORS_XMPP_PORT := .Env.VISITORS_XMPP_PORT | default "52220" }}
2125
{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
2226
{{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
2327
{{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
2428
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
2529
{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
2630
{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
2731
{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
32+
{{ $ENV := .Env }}
2833

2934
jicofo {
3035
{{ if $JICOFO_ENABLE_AUTH }}
@@ -58,9 +63,16 @@ jicofo {
5863
stress-threshold = "{{ .Env.BRIDGE_STRESS_THRESHOLD }}"
5964
{{ end }}
6065

66+
{{ if $ENABLE_VISITORS }}
67+
selection-strategy = VisitorSelectionStrategy
68+
visitor-selection-strategy = RegionBasedBridgeSelectionStrategy
69+
participant-selection-strategy = RegionBasedBridgeSelectionStrategy
70+
topology-strategy = VisitorTopologyStrategy
71+
{{ else }}
6172
{{ if .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}
6273
selection-strategy = "{{ .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}"
6374
{{ end }}
75+
{{ end }}
6476

6577
{{ if .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}
6678
health-checks {
@@ -193,8 +205,39 @@ jicofo {
193205
sctp {
194206
enabled = {{ $ENABLE_SCTP }}
195207
}
208+
{{ if $ENABLE_VISITORS }}
209+
visitors {
210+
enabled = true
196211

212+
{{ if .Env.VISITORS_MAX_PARTICIPANTS }}
213+
max-participants = {{ .Env.VISITORS_MAX_PARTICIPANTS }}
214+
{{ end }}
215+
{{ if .Env.VISITORS_MAX_VISITORS_PER_NODE }}
216+
max-visitors-per-node = {{ .Env.VISITORS_MAX_VISITORS_PER_NODE }}
217+
{{ end }}
218+
}
219+
{{ end }}
197220
xmpp {
221+
{{ if $ENABLE_VISITORS }}
222+
{{ if $.Env.VISITORS_XMPP_SERVER }}
223+
visitors {
224+
{{ range $index, $element := $VISITORS_XMPP_SERVERS -}}
225+
{{ $SERVER := splitn ":" 2 $element }}
226+
v{{ $index }} {
227+
enabled = true
228+
conference-service = conference.v{{ $index }}.{{ $XMPP_DOMAIN }}
229+
hostname = {{ $SERVER._0 }}
230+
{{ $DEFAULT_PORT := add $VISITORS_XMPP_PORT $index }}
231+
port = {{ $SERVER._1 | default $DEFAULT_PORT }}
232+
domain = "{{ $XMPP_AUTH_DOMAIN }}"
233+
xmpp-domain = v{{ $index }}.{{ $XMPP_DOMAIN }}
234+
password = "{{ $ENV.JICOFO_AUTH_PASSWORD }}"
235+
disable-certificate-verification = true
236+
}
237+
{{ end }}
238+
}
239+
{{ end }}
240+
{{ end }}
198241
client {
199242
enabled = true
200243
hostname = "{{ $XMPP_SERVER }}"

0 commit comments

Comments
 (0)