The Team Voice Calls feature is currently in beta. Report any issues to Rocket.Chat support.
Rocket.Chat supports team voice calls through VoIP, powered by FreeSWITCH. FreeSWITCH is an open-source telephony platform that supports modern communication standards like WebRTC, SIP over WebSocket, and Secure RTP (SRTP). When integrated correctly, it allows you to make voice calls directly within your Rocket.Chat workspace. See the official FreeSWITCH VoIP Server for Rocket.Chat to learn more.
This guide provides clear steps to deploy FreeSWITCH and configure VoIP in your workspace as an administrator. In this guide, you’ll learn the following:
Prerequisite
Before you begin, ensure the following requirements are met:
System requirements
For production environments, review the Rocket.Chat system requirements and FreeSWITCH performance guidelines.
For a small test environment, the minimum recommended system specifications are:
2 vCPUs
4 GB RAM
30 GB disk space
A domain name that can be used to expose the VoIP server to the internet, which is different from the Rocket.Chat domain. You may use a self-signed certificate, but it requires additional configuration.
A public external IPV4 address that can be used to expose the VoIP server to the internet, with the capacity to open UDP ports.
Network configurations
The server running the FreeSWITCH container must allow traffic on the following ports:
Port | Protocol | Purpose |
---|---|---|
443 | TCP | Required for WebSocket connections between Rocket.Chat clients and FreeSWITCH. |
8021 | TCP | Used by Rocket.Chat to connect to the FreeSWITCH Event Socket Layer (ESL) interface. Do not expose this port to the internet. If Rocket.Chat is hosted on a different server, ensure this port is accessible only from the Rocket.Chat server’s IP. |
20001–20048 | UDP | Used for SRTP media streams. Each call requires one port; the default range supports up to 24 concurrent calls. You can adjust the range based on your expected call volume. |
5060 | UDP(optional) | Used for SIP connections. It is required only if you intend to connect SIP phones or other SIP clients to FreeSWITCH. It’s not required for Rocket.Chat integration. |
Confirm that your firewall or security group explicitly allows these ports.
Deploy FreeSWITCH in Rocket.Chat
FreeSWITCH can run in containerized environments like Docker and Kubernetes. In this guide, we’ll focus on Docker-based deployment, which aligns with Rocket.Chat’s recommended setup using Docker and Traefik.
This guide assumes that you’ve already deployed your Rocket.Chat workspace using Docker Compose and Traefik. If not, start with our Deploy with Docker & Docker Compose guide.
Before you proceed, make sure you have an active VoIP license. Contact our Sales team to purchase one if you haven’t already.
Step 1: Set VoIP environment variables
Update your
.env
file with the following to set the FreeSWITCH domain where the SIP websocket will be open and the required passwords :VOIP_DOMAIN=voip.example.com EXTENSION_PASSWORD=set_your_password FREESWITCH_PASSWORD=set_your_password
VOIP_DOMAIN
must be different from your Rocket.Chat domain, due to Traefik’s host rule matching.
Step 2: Update Traefik configuration
Modify your
traefik.yml
to add--serverstransport.insecureSkipVerify=true
to the command section:[...] services: traefik: image: docker.io/traefik:${TRAEFIK_RELEASE:-v2.9.8} restart: always command: [...] - --certificatesresolvers.le.acme.storage=/letsencrypt/acme.json - --serverstransport.insecureSkipVerify=true [...]
Recreate the Traefik container with this command:
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
FreeSWITCH is now successfully deployed. You can proceed to connect it to your Rocket.Chat workspace.
Step 4: Connect Rocket.Chat with FreeSWITCH
After successfully deploying the FreeSWITCH server, the next step is to configure its integration with your Rocket.Chat workspace.
In your Rocket.Chat workspace, navigate to Administration > Workspace > Settings > Team Voice Calls.
Update the required settings from the table below:
Field | Description |
---|---|
FreeSwitch Host * | The domain of your FreeSWITCH docker container. (e.g ubuntu-freeswitch-1) |
FreeSwitch Port | The FreeSwitch port. By default, it is 8021. |
FreeSwitch Password * | The FreeSwitch password you set in your |
FreeSwitch Request Timeout | The time it takes for the server to time out. By default, it is 3000. Don’t change it. |
WebSocket Path* | The WebSocket Path follows this example : |
Ice Servers | A comma-separated list of STUN and/or TURN servers used to gather network address candidates for VoIP calls. Usernames and passwords may be HTML-encoded. Only one working address is needed for a call, but all configured servers are contacted before the call starts. |
ICE Gathering Timeout | Specify how long (in milliseconds) the system should wait for ICE candidate gathering to complete before starting a call. |
Click Save Changes.
Configure VoIP permissions
To use VoIP efficiently, certain permissions must be assigned based on user roles:
Workspace admin/VoIP managers require the
Manage Voice Calls
permission to administer VoIP settings and extensions.VoIP users require the
View Voice Call Extensions
andAllow Voice Calls
permissions.
It's recommended to create custom roles for these permissions and assign them to the appropriate users.
Assign extensions to users
Once FreeSWITCH is connected, assign extensions to users in your Rocket.Chat workspace. Each extension represents a user on the FreeSWITCH server, enabling them to make and receive voice calls. By default, 19 extensions (1001 - 1019) are available in the workspace.
To assign an extension to a user:
Go to Administration > Workspace > Users.
Click Assign Extension in the top-right corner.
Choose the User and select from the Available Extensions, then click Associate to assign the extension.
Alternatively, you can assign an extension by clicking the kebab menu next to the user in the user list and selecting Assign Extension from the options.
To unassign an extension:
Click the kebab menu next to the user in the list.
Select Unassign Extension and click Remove.
If you're using LDAP, you can automatically assign user extensions by mapping the Extension Field setting. Ensure this attribute is configured in your LDAP mapping; otherwise, extensions will need to be assigned manually.
Great job so far! —With FreeSWITCH deployed and configured, users with assigned extensions can now make and receive calls within Rocket.Chat. In the next section, you’ll learn how to make the most of these calling features, including placing, receiving, and managing calls within Rocket.Chat.