Deploy FreeSWITCH for Team Voice Calls with Docker

Prev Next

If you've deployed your Rocket.Chat workspace using Docker, this guide will walk you through the key steps to deploy FreeSWITCH to power voice calls in Roccket.Chat.

You can choose to deploy FreeSWITCH:

Prerequisites

Before you begin, make sure you have the following:

  1. A domain name: To expose your VoIP server to the internet. It should be different from your Rocket.Chat domain.

    You can use a self-signed SSL certificate, but it requires extra configuration steps.

  2. A public external IPV4 address:To expose the VoIP server to the internet and to open UDP ports for RTP communication.

  3. VoIP license and add-on: Check the Rocket.Chat VoIP requirements and verify that the Team Voice Calls add-on has been enabled for your workspace.

  4. Hardware requirements: Review the Rocket.Chat system requirements, Team Voice call requirements, and the FreeSWITCH performance guidelines to verify your setup is suitable for use.

  5. Network and firewall configuration: Go through the Firewall Configuration requirements and make sure your server allows the required ports.

Deploy FreeSWITCH with Docker in a co-located environment

This section walks you through setting up FreeSWITCH on the same server as your Rocket.Chat instance. This setup is only recommended for testing environments or small proof-of-concept (POC) deployments.

Step 1: Update your .env file

  1. Add the following environment variables to your .env file to set the FreeSWITCH domain where the SIP websocket will be open as well as the required passwords :

    VOIP_DOMAIN=<enter_your_voip_domain>
    EXTENSION_PASSWORD=<set_your_password>
    FREESWITCH_PASSWORD=<set_your_password>
    • VOIP_DOMAIN must be different from your Rocket.Chat domain because Traefik uses host-based routing.

    • Set strong passwords for both EXTENSION_PASSWORD and FREESWITCH_PASSWORD.

  2. To specify a custom range of extensions (instead of the default 1000–1008), add the following  to your .env file:

    EXTENSIONS="<enter-extension-range>"

    For example, EXTENSIONS="1000-1050" will generate extensions from 1000 to 1050.

Step 2: Update Traefik configuration

  1. Edit your traefik.yml file and add the following flag under the command section to bypass certificate verification between services:

    - --serverstransport.insecureSkipVerify=true

    Your traefik.yml file should look similar this:

    services:
      traefik:
        image: docker.io/traefik:${TRAEFIK_RELEASE:-v2.9.8}
        restart: always
        command:
          [...]
          - --certificatesresolvers.le.acme.storage=/letsencrypt/acme.json
          - --serverstransport.insecureSkipVerify=true
  2. After updating the file, recreate the Traefik container:

    docker compose -f traefik.yml up --force-recreate -d

Step 3: Install FreeSWITCH

  1. Go to the official FreeSWITCH compose.yaml file. Copy the URL and download the file with this command:

    wget -O freeswitch.yaml <compose-file-url>
  2. Start the FreeSWITCH container by running :

    docker compose -f freeswitch.yaml up -d

You have successfuly deployed FreeSWITCH in your Rocket.Chat workspace. You can proceed to configure and connect it to your Rocket.Chat workspace in the next section.