jicofo.conf 10 KB

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