Configure Rocket.Chat Voice via SIP Integration

Prev Next

By default, Rocket.Chat uses WebRTC for peer-to-peer calls between users within the workspace. While this is ideal for internal communication, it does not support calls to or from the Public Switched Telephone Network (PSTN). The SIP Integration extends Rocket.Chat's capabilities beyond internal calls to an enterprise-grade telephony. This advanced approach allows organizations to route all Rocket.Chat voice calls through a controlled SIP-based telephony infrastructure. It enables:

  • PSTN connectivity: Placing and receiving calls from traditional external phone numbers.

  • Centralized control: Routing all traffic for centralized call logging, recording, and policy enforcement.

  • Compliance: Meeting regulatory requirements for regulated environments by maintaining full control over voice traffic.

  • PBX integration: Connecting to and integrating with existing PBX or VoIP systems.

This guide explains the architecture, component configuration, and workspace setup for configuring Rocket.Chat Team Voice Calls via SIP.

Architecture

The SIP integration architecture bridges the WebRTC used by Rocket.Chat with the traditional SIP protocol used by external telephony networks (PSTN) and your SIP provider. At it’s core, this integration relies on three major components: Dratchio, SIP provider and an ICE server.

Dratchio

Drachtio is a signaling gateway that serves as the translator and traffic controller between Rocket.Chat and your SIP infrastructure. When a user places a call from the Rocket.Chat client, the signaling is sent as SIP over WebSocket (WSS) to the Drachtio server. Drachtio converts that WebRTC-based request into a standard SIP INVITE and forwards it to the SIP provider. It manages session control, authentication, and routing between the WebRTC and SIP layers.

Drachtio must be reachable by both Rocket.Chat and the SIP provider and configured with:

  • WebSocket bindings for Rocket.Chat connections.

  • SIP credentials and routing rules to your SIP provider.

  • Optional logging for debugging and compliance tracing.

SIP provider

The SIP provider is the engine of the telephony system. It handles SIP registration, routes calls, manages RTP media, and connects to external networks such as the PSTN. It decides where a call should go — whether to another Rocket.Chat user, an internal extension, or the PSTN.

When Drachtio forwards the SIP INVITE, the SIP provider:

  • Applies your organization’s dial plan or routing rules.

  • Manages media negotiation, codecs, and encryption.

  • Connects the call to its destination and maintains RTP streams.

Rocket.Chat has verified FreeSWITCH as a compatible SIP provider. However, any WebRTC-compatible SIP provider can work, provided it supports SRTP and ICE negotiation. We are actively testing additional SIP providers and will publish a verified compatibility list as it evolves.

ICE server

Team Voice Calls rely on WebRTC to establish direct audio links between users' browsers. Because users are often behind different firewalls and Network Address Translators (NATs), a crucial component known as the ICE (Interactive Connectivity Establishment) server is required.

This ICE server is required to help users discover a reliable media path for a direct connection. It includes:

  1. STUN (Session Traversal Utilities for NAT): Assists in finding the public IP address and port of a user behind a NAT.

  2. TURN (Traversal Using Relays around NAT): Acts as a relay server when a direct peer-to-peer connection is impossible (e.g., due to restrictive firewalls), ensuring the call can still connect by relaying the media traffic.

Rocket.Chat does not include or provide STUN or TURN servers. You are responsible for deploying, configuring, and providing the addresses for these servers to ensure reliable connectivity, particularly in complex or air-gapped network environments. For basic testing, you may use publicly available STUN servers.

How calls work through SIP integration

When a user initiates a call on the SIP integration, it works through a series of handoffs:

  1. Signaling initiation (Rocket.Chat Drachtio): The call begins in the Rocket.Chat client, sending its signaling over a secure WebSocket (WSS) connection. The client also uses ICE servers (STUN/TURN) to gather network candidates for the media stream.

  2. Protocol translation (Drachtio FreeSWITCH): The Drachtio signaling gateway receives the WSS traffic, translates the request into a standard SIP INVITE message, and forwards it to the SIP Provider. Drachtio ensures the necessary WebRTC-specific details are adapted for the SIP environment.

  3. Call routing (FreeSWITCH Destination): The SIP Provider executes its internal routing logic to connect the call to the final destination (an external PSTN number or another internal extension).

  4. Centralized control (Rocket.Chat Server FreeSWITCH): The entire process is controlled by the Rocket.Chat server, which communicates directly with the SIP Provider's Event Socket Layer (ESL) interface to manage extensions, monitor call status, and set policies.

Prerequisites

Before you begin the setup, verify that you have the following:

  1. An active Enterprise plan and the Team Voice Calls add-on enabled. If you don’t have one, request a trial or contact the Sales Team to purchase a license.

  2. An active Dratchio server deployed and running on an accessible IP address.

  3. A SIP provider deployed and configured to accept traffic from Drachtio.

  4. ICE server setup

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 your underlying infrastructure and prerequisites are ready, proceed to configure the integration within your workspace.

Step 1: Enable Team Voice Calls

  1. Go to Administration > Workspace > Settings > Team Voice Calls.

  2. 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

A comma-separated list of STUN and/or TURN servers used to gather network address candidates for Voice calls.

Use the format: [username:password@]stun:host:port   or [username:password@]turn:host:port .

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.

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

  1. 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, internal calls between Rocket.Chat users also pass through the SIP provider. It is useful for call recording or unified routing policies.

    Dratchio Host

    The hostname or IP address where your Drachtio signaling gateway is running. Rocket.Chat connects here to send call signaling.

    Dratchio Port

    The port on which Drachtio listens for WebSocket signaling traffic (typically 9022 or as configured).

    Dratchio password

    The authentication password Rocket.Chat uses to communicate securely with Drachtio.

    SIP Server Host

    The hostname or IP address of your SIP provider (e.g., FreeSWITCH). This defines where Drachtio forwards SIP requests.

    SIP Server Port

    The SIP port your provider uses for incoming signaling (commonly 5060 for UDP/TCP or 5061 for TLS).

  2. 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 Rocket.Chat team for guidance with your SIP integration setup.

Next steps

After successfully setting up SIP integration, the next step is to Set up Team Voice Call Permissions . Once the permissions have been set up, users can follow the Team Voice Calls User Guide to start making calls in Rocket.Chat.