jicofo.conf 7.8 KB

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