Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused FreeSWITCH modules from configuration #11864

Conversation

znerol
Copy link
Contributor

@znerol znerol commented Apr 2, 2021

What does this PR do?

Remove FreeSWITCH configuration for modules which are of no use in the context of BigBlueButton. This patch removes most files from autoload_config and reduces the modules.conf.xml to the following lines:

<configuration name="modules.conf" description="Modules">
  <modules>
    <!-- Loggers (I'd load these first) -->
    <load module="mod_console"/>
    <load module="mod_logfile"/>

    <!-- Event Handlers -->
    <load module="mod_event_socket"/>

    <!-- Endpoints -->
    <load module="mod_sofia"/>

    <!-- Applications -->
    <load module="mod_commands"/>
    <load module="mod_conference"/>
    <load module="mod_dptools"/>

    <!-- Dialplan Interfaces -->
    <load module="mod_dialplan_xml"/>

    <!-- Codec Interfaces -->
    <load module="mod_opus"/>
    <load module="mod_opusfile"/>

    <!-- File Format Interfaces -->
    <load module="mod_sndfile"/>
    <load module="mod_native_file"/>

  </modules>
</configuration>

The following tree remains:

$ tree 
.
├── autoload_configs
│   ├── acl.conf.xml
│   ├── conference.conf.xml
│   ├── console.conf.xml
│   ├── event_socket.conf.xml
│   ├── logfile.conf.xml
│   ├── modules.conf.xml
│   ├── opus.conf.xml
│   ├── sndfile.conf.xml
│   ├── sofia.conf.xml
│   ├── switch.conf.xml
│   └── timezones.conf.xml
├── dialplan
│   ├── default
│   │   ├── bbb_conference.xml
│   │   ├── bbb_echo_test.xml
│   │   └── bbb_echo_to_conference.xml
│   ├── default.xml
│   ├── public
│   │   ├── bbb_sip.xml
│   │   └── bbb_webrtc.xml
│   └── public.xml
├── directory
│   ├── default
│   │   └── bbbuser.xml
│   └── default.xml
├── freeswitch.xml
├── sip_profiles
│   ├── external
│   │   └── example.xml
│   ├── external-ipv6
│   │   └── example.xml
│   ├── external-ipv6.xml
│   ├── external.xml
│   ├── internal-ipv6.xml
│   └── internal.xml
└── vars.xml

9 directories, 28 files

Motivation

A slim FreeSWITCH configuration reduces the attack surface.

Manual test instructions

  1. Perform a fresh install of BBB on some server
  2. Ensure that everything works (including Audio, Video, Screensharing, Recording, etc.)
  3. Apply this patch (as root):
curl -LO https://patch-diff.githubusercontent.com/raw/bigbluebutton/bigbluebutton/pull/11864.patch
patch -d /opt/freeswitch -p4 < 11864.patch
  1. Restart bbb (as root) bbb-conf --restart
  2. Check that everything still works (including Audio, Video, Screensharing, Recording, etc.)

@ffdixon
Copy link
Member

ffdixon commented Apr 2, 2021

Thanks @znerol! Have you used this configuration in a production of BigBlueButton?

@znerol
Copy link
Contributor Author

znerol commented Apr 3, 2021

I use similar config in production in 2.2. I did a smoke test of this PR on a fresh 2.3 beta install and verified that all the components still are able to interconnect (nginx, webrtc-sfu, fsesl-akka, etc.). I also did some limited test calls and verified that audio in both flavors (microphone, listen only) and recording is working.

I was hoping that some more people could test-drive this PR by following the instructions from the PR summary before it is merged into 2.3 beta branch.

The purpose of this PR is to remove the obviously extraneous stuff. There is still room for improvement in the remaining files (e.g., vars.xml, the dialplan etc.). But I believe it is better to move in much smaller steps after this PR here landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants