jicofo.conf 9.7 KB

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