jicofo.conf 10 KB

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