jicofo.conf 7.9 KB

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