The Rocket.Chat Voice is currently in beta. Report any issues to Rocket.Chat support.
By default, Rocket.Chat Voice uses WebRTC for peer-to-peer calls between users within a workspace. While this is effective for internal calls, it does not support calls to or from the Public Switched Telephone Network (PSTN).
The SIP Integration extends Rocket.Chat’s capabilities to an enterprise-grade telephony solution. This advanced approach routes all Rocket.Chat voice calls through a controlled SIP-based telephony infrastructure, enabling:
PSTN connectivity: Placing and receiving calls from traditional external phone numbers.
Centralized control and compliance: Routing calls through a single system for logging, recording, and regulatory compliance.
PBX integration: Connecting seamlessly to existing Private Branch Exchange (PBX) or Voice over IP (VoIP) systems.
This guide explains the architecture and required workspace setup for configuring Rocket.Chat Voice via SIP.
Core components of Rocket.Chat Voice SIP integration
At its core, the SIP integration bridges the WebRTC protocol (used by Rocket.Chat clients) with the standard SIP protocol (used by SIP providers and the PSTN). This process is facilitated by three primary components: Drachtio, a SIP provider, and optional ICE Servers.
1. Drachtio
Drachtio serves as a vital signaling translator between the Rocket.Chat server and your SIP provider. It converts Rocket.Chat’s internal call signaling into standard SIP messages and translates SIP responses back into Rocket.Chat’s internal protocol.
Once your Drachtio server is operational, configure a dedicated password for it. This password is required for the Rocket.Chat server to authenticate its connection to the Drachtio signaling gateway.
2. SIP provider
The SIP provider is the engine of the telephony system. It handles SIP registration, routes calls, manages Real-time Transport Protocol (RTP) media, and connects to external networks like the PSTN. It decides the destination of a call—another Rocket.Chat user, an internal extension, or the PSTN.
Rocket.Chat has verified FreeSWITCH as a compatible SIP provider. However, any WebRTC-compatible SIP provider that supports SRTP and ICE may also work. We’re currently testing more providers and will publish a verified list soon.
3. ICE server (optional)
ICE servers are highly recommended to establish reliable audio connections, especially for participants behind firewalls or Network Address Translators (NATs). ICE includes two key servers:
STUN (Session Traversal Utilities for NAT): Helps a client discover its own public IP address and port when behind a NAT, allowing it to attempt a direct, low-latency connection to another peer.
TURN (Traversal Using Relays around NAT): When a direct P2P connection is impossible (e.g., due to restrictive firewalls), the TURN server acts as an audio relay, routing the entire media stream to guarantee the call connects.
If no ICE servers are configured, calls will still work only if clients or the SIP provider can directly reach one another, for example, in simple local networks. In most real-world deployments, using an ICE server is necessary to maintain reliable connectivity.
By default, STUN is enabled using the public service provided by Google. It is recommended to configure your own STUN/TURN servers and provide their addresses in the ICE Servers settings for better control and reliability.
How calls work through SIP integration
When a user makes or receives a call through the SIP integration, Rocket.Chat coordinates several components to connect the client with the external telephony network.
Outbound call flow (Rocket.Chat → SIP/PSTN)
This sequence details a user initiating a call from the Rocket.Chat client to an external destination.
When a user starts a call from the Rocket.Chat Client, the Rocket.Chat Server sends a signaling request to Drachtio through its internal socket connection.
Drachtio translates Rocket.Chat’s internal signaling into standard SIP messages and forwards them to the configured SIP provider (for example, FreeSWITCH).
The SIP provider determines how to route the call—either to another Rocket.Chat user, an internal PBX extension, or the Public Switched Telephone Network (PSTN).
Once the call is accepted, the audio will be exchanged through a direct UDP connection between the SIP Provider and the user's browser (or its TURN server). In the case of FreeSwitch, one of the ports configured in the RTP range will be used for this connection.
The SIP provider exchanges RTP and SIP messages with Rocket.Chat, Drachtio, and any external PBX involved in the call.
Inbound call flow (SIP/PSTN →Rocket.Chat)
This sequence details a user receiving a call initiated from the external telephony network.
When an incoming call arrives from the SIP provider or the PSTN, Drachtio receives the SIP INVITE.
Drachtio signals the Rocket.Chat Server over its socket connection. Each Rocket.Chat instance maintains its own persistent connection to the Drachtio service, which distributes signaling messages to ensure consistent and reliable call handling.
Rocket.Chat identifies the target user and notifies the recipient in the workspace to accept or decline the call.
Once the user accepts, Rocket.Chat completes the signaling exchange through Drachtio.
The SIP provider establishes the RTP session with the user’s browser to begin exchanging audio.
Prerequisites
Before you begin the setup, verify that you have the following:
An active Enterprise plan and the Rocket.Chat Voice add-on enabled on your workspace. If you don’t have the plan, request a trial or contact the Sales Team to purchase a license.
An active Drachtio server running on an IP address accessible only to Rocket.Chat and the SIP provider. Avoid exposing it to the public internet to prevent spam.
A SIP provider deployed and configured to accept traffic from Drachtio.
ICE server setup (optional)
To simplify the process of setting up the necessary dependencies, Rocket.Chat has a preconfigured Docker setup that bundles FreeSWITCH and Drachtio to accelerate your deployment.
Configure SIP settings
Once the prerequisites are ready, proceed to configure the SIP integration settings within your workspace.
Step 1: Enable Team Voice Calls
Go to Administration > Workspace > Settings > Team Voice Calls.
Enable Team Voice Calls.
Step 2: Configure WebRTC (ICE)
Go to WebRTC settings and update the following fields to ensure call connectivity across firewalls.:
Field | Description |
|---|---|
Ice Servers | Enter a comma-separated list of your STUN and/or TURN servers used to gather network address candidates for Voice calls. Only one working address is needed for a call, but all configured servers are contacted before the call starts.
By default, STUN is enabled using the public service provided by Google. |
ICE Gathering Timeout | Specify how long (in milliseconds) the system should wait for ICE candidate gathering to complete before starting a call. A longer timeout ensures TURN servers have time to respond, but may delay call setup. For local or STUN-only setups, a shorter timeout may reduce call startup delays. |
Step 3: Configure SIP Integration
Go to SIP integration settings and update the following fields to configure your Drachtio and SIP provider connection:
Field
Description
SIP Integration Enabled
Toggle ON to enable all related configuration fields and route external calls through the provider.
Route internal calls through the SIP integration
When enabled, intra-workspace calls between Rocket.Chat users also pass through the SIP provider. It is useful for call recording or unified routing policies.
Drachtio Host
The hostname or IP address where your Drachtio signaling gateway is running. Rocket.Chat connects here to send call signaling.
Drachtio Port
The port on which Drachtio listens for socket signaling traffic (typically 9022 or as configured).
Drachtio password
The authentication password Rocket.Chat uses to communicate securely with Drachtio.
SIP Server Host
The hostname or IP address of your SIP provider. This defines where Drachtio forwards SIP requests.
SIP Server Port
The SIP port configured on your SIP server for Rocket.Chat incoming signaling (commonly 5060 for UDP/TCP or 5061 for TLS).
After completing the configuration, click Save Changes.
Every SIP environment is unique, and network architecture plays a key role in achieving stable and compliant voice call integration. To ensure a successful deployment, contact the Sales team for guidance with your SIP integration setup.
Step 4: Assign extensions to users
After successfully connecting your SIP server, the next step is to assign extensions to the users who’ll making and receiving voice calls in your workspace. Each extension is a unique identifier on your SIP server that allows a user to place and receive voice calls.
To assign an extension to a user:
Navigate to Administration > Workspace > Users.
Click the name of the user you want to assign an extension.
On the user's profile page, click Edit.
Enter the extension number in the Voice call extension field.
Click Save.
If you're using LDAP, you can automatically assign user extensions by mapping the Extension Field setting. If this attribute isn't configured in your LDAP mapping, you must assign extensions manually.
Next steps
After successfully setting up SIP integration, the next step is to Set up Rocket.Chat Voice Permissions. Once the permissions have been set up, users can follow the Rocket.Chat Voice User Guide to start making calls in Rocket.Chat.