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:
On a separate server dedicated to VoIP handling.
Prerequisites
Before you begin, make sure you have the following:
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.
A public external IPV4 address:To expose the VoIP server to the internet and to open UDP ports for RTP communication.
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.
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.
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.
For production use, deploy FreeSWITCH in a distributed environment.
This guide assumes you’ve already deployed Rocket.Chat using Docker Compose with Traefik. If not, follow the Deploy with Docker & Docker Compose guide first.
If you don’t have an active VoIP license, contact the Sales team to purchase one before continuing.
Step 1: Update your .env file
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
andFREESWITCH_PASSWORD
.
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
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
After updating the file, recreate the Traefik container:
docker compose -f traefik.yml up --force-recreate -d
Step 3: Install FreeSWITCH
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>
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.