jicofo.conf 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
  2. {{ $ENABLE_SCTP := .Env.ENABLE_SCTP | default "0" | toBool }}
  3. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
  4. {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool }}
  5. {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool }}
  6. {{ $ENABLE_AUTO_LOGIN := .Env.ENABLE_AUTO_LOGIN | default "1" | toBool }}
  7. {{ $ENABLE_REST := .Env.JICOFO_ENABLE_REST | default "0" | toBool }}
  8. {{ $ENABLE_JVB_XMPP_SERVER := .Env.ENABLE_JVB_XMPP_SERVER | default "0" | toBool }}
  9. {{ $HEALTH_CHECKS_USE_PRESENCE := .Env.JICOFO_HEALTH_CHECKS_USE_PRESENCE | default "0" | toBool }}
  10. {{ $JIBRI_BREWERY_MUC := .Env.JIBRI_BREWERY_MUC | default "jibribrewery" -}}
  11. {{ $JIGASI_BREWERY_MUC := .Env.JIGASI_BREWERY_MUC | default "jigasibrewery" -}}
  12. {{ $JVB_BREWERY_MUC := .Env.JVB_BREWERY_MUC | default "jvbbrewery" -}}
  13. {{ $JIBRI_PENDING_TIMEOUT := .Env.JIBRI_PENDING_TIMEOUT | default 90 -}}
  14. {{ $JVB_XMPP_AUTH_DOMAIN := .Env.JVB_XMPP_AUTH_DOMAIN | default "auth.jvb.meet.jitsi" -}}
  15. {{ $JVB_XMPP_INTERNAL_MUC_DOMAIN := .Env.JVB_XMPP_INTERNAL_MUC_DOMAIN | default "muc.jvb.meet.jitsi" -}}
  16. {{ $JVB_XMPP_PORT := .Env.JVB_XMPP_PORT | default "6222" -}}
  17. {{ $JVB_XMPP_SERVER := .Env.JVB_XMPP_SERVER | default "xmpp.jvb.meet.jitsi" -}}
  18. {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
  19. {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
  20. {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
  21. {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
  22. {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
  23. {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
  24. {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
  25. jicofo {
  26. {{ if $ENABLE_AUTH }}
  27. authentication {
  28. enabled = true
  29. // The type of authentication. Supported values are XMPP, JWT or SHIBBOLETH (default).
  30. {{ if eq $AUTH_TYPE "jwt" }}
  31. type = JWT
  32. {{ else if eq $AUTH_TYPE "shibboleth" }}
  33. type = SHIBBOLETH
  34. {{ else }}
  35. type = XMPP
  36. {{ end }}
  37. {{ if eq $AUTH_TYPE "shibboleth" }}
  38. login-url = "shibboleth:default"
  39. logout-url = "shibboleth:default"
  40. {{ else }}
  41. login-url = "{{ $XMPP_DOMAIN }}"
  42. {{ end }}
  43. enable-auto-login={{ $ENABLE_AUTO_LOGIN }}
  44. }
  45. {{ end }}
  46. // Configuration related to jitsi-videobridge
  47. bridge {
  48. {{ if .Env.MAX_BRIDGE_PARTICIPANTS }}
  49. max-bridge-participants = "{{ .Env.MAX_BRIDGE_PARTICIPANTS }}"
  50. {{ end }}
  51. {{ if .Env.BRIDGE_AVG_PARTICIPANT_STRESS }}
  52. // The assumed average stress per participant. default is 0.01
  53. average-participant-stress = "{{ .Env.BRIDGE_AVG_PARTICIPANT_STRESS }}"
  54. {{ end }}
  55. {{ if .Env.BRIDGE_STRESS_THRESHOLD }}
  56. // The stress level above which a bridge is considered overstressed. 0.8 is the default value
  57. stress-threshold = "{{ .Env.BRIDGE_STRESS_THRESHOLD }}"
  58. {{ end }}
  59. {{ if .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}
  60. selection-strategy = "{{ .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}"
  61. {{ end }}
  62. {{ if .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}
  63. health-checks {
  64. enabled = {{ .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS | toBool }}
  65. use-presence = {{ $HEALTH_CHECKS_USE_PRESENCE }}
  66. }
  67. {{ end }}
  68. {{ if $ENABLE_JVB_XMPP_SERVER }}
  69. brewery-jid = "{{ $JVB_BREWERY_MUC }}@{{ $JVB_XMPP_INTERNAL_MUC_DOMAIN }}"
  70. {{ else }}
  71. brewery-jid = "{{ $JVB_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }}"
  72. {{ end }}
  73. {{ if .Env.JICOFO_BRIDGE_REGION_GROUPS }}
  74. region-groups = [{{ .Env.JICOFO_BRIDGE_REGION_GROUPS }}]
  75. {{ end }}
  76. }
  77. // Configure the codecs and RTP extensions to be used in the offer sent to clients.
  78. codec {
  79. video {
  80. {{ if .Env.ENABLE_CODEC_VP8 }}
  81. vp8 {
  82. enabled = "{{ .Env.ENABLE_CODEC_VP8 }}"
  83. }
  84. {{ end }}
  85. {{ if .Env.ENABLE_CODEC_VP9 }}
  86. vp9 {
  87. enabled = "{{ .Env.ENABLE_CODEC_VP9 }}"
  88. }
  89. {{ end }}
  90. {{ if .Env.ENABLE_CODEC_H264 }}
  91. h264 {
  92. enabled = "{{ .Env.ENABLE_CODEC_H264 }}"
  93. }
  94. {{ end }}
  95. }
  96. }
  97. conference {
  98. {{ if .Env.ENABLE_AUTO_OWNER }}
  99. enable-auto-owner = {{ .Env.ENABLE_AUTO_OWNER | toBool }}
  100. {{ end }}
  101. {{ if .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}
  102. initial-timeout = "{{ .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}"
  103. {{ end }}
  104. {{ if .Env.JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT }}
  105. single-participant-timeout = "{{ .Env.JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT }}"
  106. {{ end }}
  107. }
  108. {{ if .Env.JICOFO_ENABLE_HEALTH_CHECKS }}
  109. // Configuration for the internal health checks performed by jicofo.
  110. health {
  111. // Whether to perform health checks.
  112. enabled = {{ .Env.JICOFO_ENABLE_HEALTH_CHECKS | toBool }}
  113. }
  114. {{ end }}
  115. {{ if $ENABLE_RECORDING }}
  116. jibri {
  117. brewery-jid = "{{ $JIBRI_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }}"
  118. {{ if .Env.JIBRI_REQUEST_RETRIES }}
  119. num-retries = "{{ .Env.JIBRI_REQUEST_RETRIES }}"
  120. {{ end }}
  121. pending-timeout = "{{ $JIBRI_PENDING_TIMEOUT }}"
  122. }
  123. {{ end }}
  124. {{ if and .Env.JIGASI_SIP_URI $JIGASI_BREWERY_MUC }}
  125. jigasi {
  126. brewery-jid = "{{ $JIGASI_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }}"
  127. }
  128. {{ end }}
  129. {{ if .Env.JICOFO_OCTO_REGION }}
  130. local-region = "{{ .Env.JICOFO_OCTO_REGION }}"
  131. {{ end }}
  132. octo {
  133. // Whether or not to use Octo. Note that when enabled, its use will be determined by
  134. // $jicofo.bridge.selection-strategy. There's a corresponding flag in the JVB and these
  135. // two MUST be in sync (otherwise bridges will crash because they won't know how to
  136. // deal with octo channels).
  137. enabled = {{ $ENABLE_OCTO }}
  138. }
  139. {{ if $ENABLE_REST }}
  140. rest {
  141. host = "0.0.0.0"
  142. }
  143. {{ end }}
  144. sctp {
  145. enabled = {{ $ENABLE_SCTP }}
  146. }
  147. xmpp {
  148. client {
  149. enabled = true
  150. hostname = "{{ $XMPP_SERVER }}"
  151. port = "{{ $XMPP_PORT }}"
  152. domain = "{{ $XMPP_AUTH_DOMAIN }}"
  153. xmpp-domain = "{{ $XMPP_DOMAIN }}"
  154. username = "focus"
  155. password = "{{ .Env.JICOFO_AUTH_PASSWORD }}"
  156. conference-muc-jid = "{{ $XMPP_MUC_DOMAIN }}"
  157. client-proxy = "focus.{{ $XMPP_DOMAIN }}"
  158. disable-certificate-verification = true
  159. }
  160. {{ if $ENABLE_JVB_XMPP_SERVER }}
  161. service {
  162. enabled = true
  163. hostname = "{{ $JVB_XMPP_SERVER }}"
  164. port = "{{ $JVB_XMPP_PORT }}"
  165. domain = "{{ $JVB_XMPP_AUTH_DOMAIN }}"
  166. username = "focus"
  167. password = "{{ .Env.JICOFO_AUTH_PASSWORD }}"
  168. }
  169. {{ end }}
  170. {{ if $ENABLE_RECORDING }}
  171. trusted-domains = [ "{{ $XMPP_RECORDER_DOMAIN }}" ]
  172. {{ end }}
  173. }
  174. }