2
0

jicofo.conf 8.0 KB

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