jicofo.conf 8.0 KB

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