|
1 | 1 | --- |
2 | | -- when: bbb_livekit_enable |
3 | | - block: |
4 | | - - name: Update bbb-web for livekit |
5 | | - ansible.builtin.set_fact: |
6 | | - bbb_config_web_base: | |
7 | | - {{bbb_config_web_base | combine({ |
8 | | - "audioBridge": "livekit", |
9 | | - "cameraBridge": "livekit", |
10 | | - "screenShareBridge": "livekit" |
11 | | - })}} |
| 2 | +- name: Update base configuration for livekit |
| 3 | + when: bbb_livekit_enable |
| 4 | + ansible.builtin.set_fact: |
| 5 | + bbb_config_web_base: | |
| 6 | + {{bbb_config_web_base | combine({ |
| 7 | + "audioBridge": "livekit", |
| 8 | + "cameraBridge": "livekit", |
| 9 | + "screenShareBridge": "livekit" |
| 10 | + })}} |
| 11 | + bbb_config_webrtc_sfu_base: | |
| 12 | + {{bbb_config_webrtc_sfu_base | combine({ |
| 13 | + "livekit": { |
| 14 | + "enabled": True, |
| 15 | + "key": bbb_livekit_api_key, |
| 16 | + "secret": bbb_livekit_api_secret, |
| 17 | + } |
| 18 | + })}} |
12 | 19 |
|
13 | | - - name: Update html5 for livekit |
14 | | - when: bbb_cluster_proxy is defined |
15 | | - ansible.builtin.set_fact: |
16 | | - bbb_config_html5_base: | |
17 | | - {{bbb_config_html5_base | combine({ |
18 | | - 'public': { |
19 | | - 'media': { |
20 | | - 'livekit': { |
21 | | - 'url': 'wss://'+bbb_hostname+'/livekit' |
22 | | - } |
23 | | - } |
| 20 | +- name: Update html5 config for livekit with proxy mode |
| 21 | + when: bbb_livekit_enable and bbb_cluster_proxy is defined |
| 22 | + ansible.builtin.set_fact: |
| 23 | + bbb_config_html5_base: | |
| 24 | + {{bbb_config_html5_base | combine({ |
| 25 | + 'public': { |
| 26 | + 'media': { |
| 27 | + 'livekit': { |
| 28 | + 'url': 'wss://'+bbb_hostname+'/livekit' |
24 | 29 | } |
25 | | - }, recursive=True)}} |
| 30 | + } |
| 31 | + } |
| 32 | + }, recursive=True)}} |
| 33 | +
|
| 34 | +# TODO: Does not work yet! |
| 35 | +- name: Update webrtc-sfu for livekit with dialin |
| 36 | + when: bbb_livekit_enable and bbb_dialin_enable |
| 37 | + ansible.builtin.set_fact: |
| 38 | + bbb_config_webrtc_sfu_base: | |
| 39 | + {{bbb_config_webrtc_sfu_base | combine(_bbb_config_webrtc_sfu_patch, recursive=True)}} |
| 40 | + vars: |
| 41 | + _bbb_config_webrtc_sfu_patch: |
| 42 | + livekit: |
| 43 | + rtcAgent: |
| 44 | + enabled: true |
| 45 | + sip: |
| 46 | + enabled: true |
| 47 | + requirePin: true |
| 48 | + trunk: |
| 49 | + # See https://docs.livekit.io/server-sdk-js/interfaces/CreateSipInboundTrunkOptions.html |
| 50 | + options: |
| 51 | + allowedAddresses: |
| 52 | + - "{{ bbb_dialin_provider }}" |
| 53 | + allowedNumbers: |
| 54 | + - "{{ bbb_dialin_provider_extension }}" |
| 55 | + authUsername: "{{ bbb_dialin_provider_username }}" |
| 56 | + authPassword: "{{ bbb_dialin_provider_password }}" |
| 57 | + dispatch: |
| 58 | + # See https://docs.livekit.io/reference/server-sdk-js/interfaces/CreateSipDispatchRuleOptions.html |
| 59 | + options: |
| 60 | + #attributes: {} |
| 61 | + hidePhoneNumber: "{{ bbb_dialin_mask_caller }}" |
| 62 | + #roomConfig: {} |
| 63 | + #roomPreset: 'default' |
0 commit comments