forked from juanluisbaptiste/ansible-bigbluebutton
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,12 @@ To get up _BigBlueButton_ up and running the following variables can be configur | |
* `bbb_install_webhooks`: Install the bbb-webhooks package, useful to integrate bbb into other web applications (Default: `True`). | ||
* `bbb_install_greenlight`: Install the Greenlight frontend (Default: `False`) | ||
|
||
To configure optional SIP dial-in, define a dict `bbb_sip_providers` (Default: unset) to supply information about each SIP provider. Each key in the dict | ||
corresponds to a provider config. Its value is another dict where each key maps to a parameter of the same name in the BBB SIP configuration. At least | ||
`username`, `password` (for the SIP credentials), `proxy` (FQDN of the SIP gateway), and extension (dial-in number) have to be set. The default dial-in | ||
number for display in human-readable format should be supplied in `bbb_sip_default_dialin`. A verbose dial-in message can be supplied in | ||
`bbb_sip_welcome_footer` (defaults to the message example given in the BBB SIP documentation). | ||
|
||
In order to deploy a basic setup of the _Greenlight_ frontend alongside _BigBlueButton_, the following variables can be set: | ||
|
||
* `bbb_greenlight_image`: Docker image to run for Greenlight (Default: `bigbluebutton/greenlight:v2`) | ||
|
@@ -68,5 +74,23 @@ In order to deploy a basic setup of the _Greenlight_ frontend alongside _BigBlue | |
bbb_install_check: True | ||
bbb_configure_ssl: True | ||
bbb_ssl_email: [email protected] | ||
bbb_sip_default_dialin: "+613-555-1234" | ||
bbb_sip_welcome_footer: "<br/><br/>dial %%DIALNUM%%, then enter %%CONFNUM%% as conference PIN." | ||
bbb_sip_providers: | ||
sipprovider1: | ||
username: "123456789" | ||
password: "topsecret" | ||
extension: "6135551234" | ||
proxy: sip.example.com | ||
register: "true" | ||
context: "public" | ||
sipprovider2: | ||
username: "11114444" | ||
password: "changeme" | ||
extension: "8005554321" | ||
proxy: sip.example.org | ||
register: "true" | ||
context: "public" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
- name: Create external SIP provider configuration for FreeSWITCH | ||
template: | ||
src: templates/sip_provider.xml.j2 | ||
dest: /opt/freeswitch/conf/sip_profiles/external/{{ item.key }}.xml | ||
owner: freeswitch | ||
group: daemon | ||
backup: yes | ||
loop: "{{ bbb_sip_providers | dict2items }}" | ||
register: sip_profile_config | ||
no_log: true | ||
tags: | ||
- bbb-add-sip-provider-config | ||
|
||
- name: Create dialplan for SIP provider | ||
template: | ||
src: templates/sip_dialplan.xml.j2 | ||
dest: /opt/freeswitch/conf/dialplan/{{ item.value.context | default("public") }}/{{ item.key }}.xml | ||
owner: freeswitch | ||
group: daemon | ||
backup: yes | ||
loop: "{{ bbb_sip_providers | dict2items }}" | ||
register: sip_dialin_config | ||
no_log: true | ||
tags: | ||
- bbb-add-sip-provider-config | ||
|
||
- name: Restart FreeSWITCH to activate SIP changes | ||
systemd: | ||
name: freeswitch | ||
state: restarted | ||
when: | ||
sip_profile_config.changed or sip_dialin_config.changed | ||
tags: | ||
- bbb-add-sip-provider-config | ||
|
||
- name: Configure default dial-in number | ||
replace: | ||
path: "/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties" | ||
regexp: '^defaultDialAccessNumber=.*' | ||
replace: 'defaultDialAccessNumber={{ bbb_sip_default_dialin | default("+" + (bbb_sip_providers.values() | first).extension) }}' | ||
backup: yes | ||
tags: | ||
- bbb-add-sip-dialin-config | ||
|
||
- name: Configure dial-in numbers in welcome footer | ||
replace: | ||
path: "/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties" | ||
regexp: '^defaultWelcomeMessageFooter=.*' | ||
replace: 'defaultWelcomeMessageFooter={{ bbb_sip_welcome_footer | default("<br><br>To join this meeting by phone, dial:<br> %%DIALNUM%%<br>Then enter %%CONFNUM%% as the conference PIN number.") }}' | ||
backup: yes | ||
tags: | ||
- bbb-add-sip-dialin-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<extension name="from_{{ item.key }}"> | ||
<condition field="destination_number" expression="^{{ item.value.destination_number | default(item.value.extension) }}"> | ||
<action application="answer"/> | ||
<action application="sleep" data="1000"/> | ||
<action application="play_and_get_digits" data="5 5 3 7000 # conference/conf-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+"/> | ||
<action application="transfer" data="SEND_TO_CONFERENCE XML public"/> | ||
</condition> | ||
</extension> | ||
<extension name="check_if_conference_active"> | ||
<condition field="${conference ${pin} list}" expression="/sofia/g" /> | ||
<condition field="destination_number" expression="^SEND_TO_CONFERENCE$"> | ||
<action application="set" data="bbb_authorized=true"/> | ||
<action application="transfer" data="${pin} XML default"/> | ||
</condition> | ||
</extension> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<include> | ||
<gateway name="{{ item.value.gateway | default(item.key) }}"> | ||
{% for param in item.value | dict2items %} | ||
<param name="{{ param.key }}" value="{{ param.value }}"/> | ||
{% endfor %} | ||
</gateway> | ||
</include> |