Installation

LiveSwitch Servers can be installed on Windows and Linux machines.

Installing on Windows

This section describes how to setup LiveSwitch on a Windows host. For information on Linux host setup, skip ahead to the next section on Installing on Linux.

LiveSwitch has several server components that are necessary for the application to run. To make the installation and configuration of these components easier, an installer is available that streamlines the setup process.  Run the FM.LiveSwitch.Installer.msi file from the LiveSwitch download package to begin installation.  After accepting the License Agreement, you will be prompted to select the Install Type.

Install Type

The LiveSwitch installer offers two installation types:

  • Standalone Server: Installs a LiveSwitch Gateway and Media Server on the local machine.  No extra configuration is required before installing.  This is the recommended install type for first time users and local development environments.
  • Cluster: You have the option to specify the components that are installed on the local machine.  This requires a Redis server to already be setup and accessible.  This install type is only recommended for advanced users that want to install each server component on a different machine and/or setup a server cluster.

If you select the Standalone Server install type then no other configuration is necessary and installation will begin immediately.  If you select the Cluster install type then you will be taken to the next step, selecting Product Features.

Product Features

If you select the Cluster install type, you can select the product features you want to install. On this screen, you will be prompted to select these features:

  • LiveSwitch Gateway: Connects the various parts of LiveSwitch together, at least one Gateway is required.
  • LiveSwitch Media Server: Manages SFU and MCU sessions, at least one Media Server is required.
  • LiveSwitch SIP Connector: Allows LiveSwitch to connect to SIP endpoints, optional.

Select which features you would like installed and click the Next button.

Note that, although the application will allow you to skip installation of the LiveSwitch Gateway and Media Server components, these components are still required somewhere if you want a full installation of LiveSwitch. The installer allows you to skip these components on a given installation so that you can build up a server cluster by installing individual components on separate servers. In this case, you would run the installer multiple times, once on each server, and each installation would select a single component.

Redis Server Configuration

Redis Persistence

Redis needs to be properly configured for persistence or you will lose all your server settings any time your Redis instance is restarted.

If you select the Cluster install type, you must provide a Redis Server that has already been setup and is accessible from the local machine.  On this screen, you will provide the necessary information to connect to that Redis Server. 

  • Manual: In this mode you just need to specify the Hostname and Port to your Redis Server.  Optionally, you can provide a Password and enable SSL if required.
  • Redis Connection String: You can provide the complete connection string to your Redis server.  Information on the format of connection strings can be found here.


The Redis Server will be validated when you press Next and you will not be able to continue with the installation until that is successful.


Installation Results

The installation components will be installed to C:\Program Files\Frozen Mountain Software\LiveSwitch. This directory will contain up to four sub-directories, depending on the product features that you have installed. If you have installed the Gateway, SIP Connector or Media Server product features, a corresponding service for each of these will also be installed. These services are named "LiveSwitch Gateway", "LiveSwitch SipConnector" and "LiveSwitch MediaServer", respectively. They will be started automatically when your machine starts.

Application Default HTTP URL Default HTTPS URL
LiveSwitch Gateway http://localhost:8080/sync

https://localhost:8443/sync

LiveSwitch Media Server n/a (media servers have no http listeners) n/a (media servers have no http listeners)
LiveSwitch Console http://localhost:9090/admin

https://localhost:9443/admin

If you wish to uninstall LiveSwitch, you can do so as you would any other application, from the Programs and Features section of Windows.

Installing on Linux

Install .NET Core

LiveSwitch for Linux is built on the .NET Core SDK. To run LiveSwitch on Linux, you must install .NET Core. Instructions for this step vary based on the distribution of your Linux host. Fortunately, Microsoft provides step-by-step instructions for common Linux distributions. To get instructions for your host, visit the following site: https://www.microsoft.com/net/learn/get-started/linux. Once there, select your distribution from the drop down box and follow the steps. Once .NET Core is installed, proceed to the next section.

Install Dependencies

LiveSwitch for linux requires libfontconfig1. To install libfontconfig1, use the following command:

apt-get update
apt-get install libfontconfig1

Install the Services

As mentioned above, LiveSwitch is composed of three core services. The default LiveSwitch installation assumes that these services will exist in the /opt/liveswitch directory and that the services will run on systemd.  You can, of course, run the services in any way you choose, but this guide will focus on installing the three core services as systemd service units.

First, unzip the tarball to the /opt directory.

tar -xvzf liveswitch.tar.gz -C /opt

Afterwards, you should see four sub-folders, /opt/liveswitch/gateway/opt/liveswitch/media-server/opt/liveswitch/sip-connector, and /opt/liveswitch/config-tool.  Inside each of the first three directories is a config.json file that needs to be edited to point to the location of your Redis server.  Update the "Default" entry under "ConnectionStrings" to the connection string for your Redis server in the following three config files:

  • FM.LiveSwitch.Gateway.Service.config.json
  • FM.LiveSwitch.MediaServer.Service.config.json
  • FM.LiveSwitch.Connector.Sip.Service.config.json

Also inside each of the first three directories is a systemd service unit file specific to the each service. Respectively, they are gateway.servicemedia-server.service and sip-connector.service.

You can use these service units as-is, by symlinking them into the systemd service unit directory.

ln /opt/liveswitch/gateway/gateway.service /etc/systemd/system/gateway.service
ln /opt/liveswitch/media-server/media-server.service /etc/systemd/system/media-server.service
ln /opt/liveswitch/sip-connector/sip-connector.service /etc/systemd/system/sip-connector.service

Once the services have been symlinked, use systemctl to enable them and then reload the systemd daemon.

systemctl enable gateway
systemctl enable media-server
systemctl enable sip-connector
systemctl daemon-reload

If the services have not been started already, you can start them with systemctl.

systemctl start gateway
systemctl start media-server
systemctl start sip-connector

Launch the LiveSwitch Configuration Console to configure your servers.

Firewall Configuration

Gateway

  • Allow inbound TCP traffic on port 8080 (default, configurable) for HTTP
  • Allow inbound TCP traffic on port 8443 (default, configurable) for HTTPS

Media Server

  • Allow inbound UDP traffic on ports 49152-65535 for client connections
  • Allow inbound TCP traffic on port 8445 if clustering Media Server.  If 8445 is unavailable the next port will be tried incrementally until one is available (i.e. 8446, 8447, 8448, 8449, etc).
  • Allow inbound UDP and/or TCP traffic on configured ports if TURN/TURNS bindings enabled on Media Server.

Sip Connector

  • Allow inbound TCP/UDP traffic on port 5060 (default, configurable)

Server Requirements

LiveSwitch has several server components that have particular hardware requirements. The following specifications describe the requirements of each component, which will help you when you are setting up your application's infrastructure.

Gateway

Minimum Hardware

  • 2x CPU
  • 2GB RAM
  • Moderate network performance

Recommended Hardware

  • 4x CPU
  • 4GB RAM
  • High network performance

High Availability

  • 2+ gateways
  • Load balance the with high-availability guarantees

Media Server

Minimum

  • 4x CPU
  • 4GB RAM
  • High network performance

Recommended Hardware

  • 8x CPU
  • 8GB RAM
  • Highest network performance

High Availability

  • 2+ media servers

Troubleshooting

The best resource for troubleshooting issues during installation are the logs.  For most installations, logs can be found at "%ProgramData%\Frozen Mountain Software\-service-\" for Windows, and "/var/log/fm/liveswitch/-service-/" for Linux.  If they are not there then check your Logging Configuration.

Services Failed To Start

The logs will provide more information about why the service(s) failed to start.

Unable to connect to Redis server

All configuration is stored on the Redis server.  If the service is unable to connect to the Redis server then it will not be able to start.  If this error is reported then:

  1. Confirm that the correct Redis connection string has been set in your Server Specific Configuration file.
  2. Check that the Redis server is up and running.
  3. Check that the service is able to access the Redis server over the network.

Ports are already in use

By default, the LiveSwitch Gateway binds to ports 8080 and 9090 on the server.  If those ports are already in use by another application then the service will fail to start.  If this error is reported then:


  1.  Disable the other application or change the port it uses.

    Other Services

    We do not recommend running other services on the same server as LiveSwitch as it could adversely affect performance.

  2. If you are running multiple Gateways, access the LiveSwitch Configuration Console from a different Gateway and configure the HTTP Bindings with a different port.


  3. If you cannot disable the other application then change the port that LiveSwitch uses.  This can be done using the LiveSwitch CLI Tool:

    Windows
    & 'C:\Program Files\Frozen Mountain Software\LiveSwitch\Config Tool\FM.LiveSwitch.Cli.exe' reset http --sync=<sync_port> --admin=<admin_port>
    
    Linux
    dotnet /opt/liveswitch/config-tool/FM.LiveSwitch.Cli.dll reset password reset http --sync=<sync_port> --admin=<admin_port>
    

    Restart all the services after running the tool.  You can now access the LiveSwitch Configuration Console at http://localhost:<admin_port>/admin to complete your configuration.