Atlas Knowledge Base
Dashboard
Installing and Configuring SBN Media

Installing and Configuring SBN Media

Step-by-step guide to installing SBN Media on a host, connecting it to NATS and the API Engine, and verifying it is running.

configuration
installation
nats
sbn-media
setup

Installing and Configuring SBN Media

SBN Media is a set of services that connect cameras, telephony, and alarm devices to SBN. This page walks through installing SBN Media on a new host, pointing it at your infrastructure, and confirming it is running. For a fuller description of the individual services and their settings, see the SBN Media Overview page (SBN-Media/overview).

Before you begin

You will need:

  1. A host to run SBN Media (Windows, Linux, or macOS).
  2. Network access from that host to your NATS cluster and your SBN API Engine.
  3. A running NATS cluster. SBN Media will not start without one. Setting one up is covered on the NATS Configuration page (SBN-Media/nats-configuration).
  4. GStreamer runtime installed on any host that runs media services (for example camerastream, sipmedia, webrtcpeer, transmuxer). Download the runtime from gstreamer.freedesktop.org.
  5. Permission to open the network ports listed in Step 3.

Step 1 - Install the service

SBN Media runs as a single executable that can be installed as a background service - a Windows Service, or a Linux/macOS daemon. After copying the SBN Media release onto the host, install and start it with:

./sbn-media daemon install # Register SBN Media as a service on this host
./sbn-media daemon start # Start the service
./sbn-media daemon stop # Stop the service
./sbn-media daemon remove # Unregister the service

When the service starts it launches the watchdog, which in turn starts and supervises the other SBN Media services on that host.

Note: when installing a new release, run SBN Media in the foreground rather than as a service. See "Keeping SBN Media up to date" below.

Step 2 - Connect SBN Media to your infrastructure

SBN Media reads its settings from configuration files in its working directory:

  1. sbn-media.local.yaml holds the settings specific to this host. This is the file you edit.
  2. A full set of default settings is built in. You can write a copy to ./config to view them:
./sbn-media config eject

Ejecting overwrites anything already in ./config, so the recommended approach is to view the defaults there and put only your host-specific overrides in sbn-media.local.yaml.

At minimum, set three things in sbn-media.local.yaml:

# Connection to your NATS cluster
broker:
connectionString: "nats://your-nats-host:4222"
authorization:
password: "change-me" # match the password configured on your NATS cluster

# Connection to your SBN API Engine (used to inject signals into SBN)
sbnfrontend:
url: "https://your-api-engine/"
username: "your-account"
password: "your-password"

# The web entry point that SBN Video clients and the dashboard connect to
apiproxy:
port: 8081
allowOrigins: "https://your-api-engine" # restrict to your API Engine

Most settings can be reloaded without restarting the services. The SBN Media Overview page describes the configuration of each service in more detail.

Step 3 - Open the required ports

Open the ports for the services this host will run. Defaults are shown; all are configurable.


Port

Used by

Open to

4222

NATS cluster

Other SBN Media hosts

8081

API Proxy (web entry point)

API Engine and SBN Video clients

5060 / 5061

SIP / SIP over TLS

Your telephony provider

5080 / 5081

SIP over WebSocket / WebSocket TLS

Your telephony provider

3478

TURN (firewall traversal for video)

SBN Video clients

1024 - 65535

TURN media relay

SBN Video clients

10000 - 65000

SIP call media (RTP)

Your telephony provider

The only port that must be reachable for normal video operation is the API Proxy port (8081). The SIP and TURN ports are only needed on hosts that run those services.

SBN Media includes its own TURN server, enabled by default, so video can traverse most firewalls without any extra relay software. For it to work from outside the network, the TURN control port (3478) and the media relay range must be reachable from the client, and the host must advertise an address the client can reach.

Step 4 - Configure your lines and devices

How alarms and calls are handled is set per line - a phone number, SIP trunk, or IP receiver line. Each line maps to one or more alarm protocols (tried in priority order), a caller ID, and call-handling options. SBN Media decodes alarms over the phone in formats such as ContactID, P100, CPC, TSA, and TSA-IBS, decodes IP alarm formats such as DC-09, and exchanges SCAIP messages.

Cameras and other media sources are reached through device URLs (for example an RTSP camera). The SBN Media Overview page lists the supported device types and their URL formats.

Step 5 - Start and verify

Start the services on the host and check their health:

./sbn-media service start all # Start the services on this host
./sbn-media service health # Show service health
./sbn-media service list # List the services

To confirm the host is configured correctly, run the built-in checks:

./sbn-media diagnostics # Diagnostic information, useful for support tickets
./sbn-media validate # Common configuration errors and security warnings

You can also open the SBN Media dashboard in a browser at the API Proxy address (for example https://your-host:8081) to see the running services and a snapshot of the logs.

IMAGE - SBN Media dashboard, Health view

Shows: The SBN Media dashboard open in a browser at the API Proxy address, on the Health view, listing the services running on the host with their status.

Capture: Start the services (service start all), open the API Proxy address in a browser, select the Health tab and refresh. Crop: The Health panel with the service list in frame. Roughly ~800x500 px.

SBN Media dashboard Health view

Keeping SBN Media up to date

SBN Media can update itself and roll the new version out across the hosts on the network.

./sbn-media version # Show the running version
./sbn-media release download # Download the latest release
./sbn-media release push # Apply the release and restart the services

Run SBN Media in the foreground while a release is being installed. Your settings and logs are kept across an update.

Troubleshooting setup


Symptom

What to check

Services do not start

NATS is not reachable. Confirm the cluster is running and that broker.connectionString and the NATS password are correct.

SBN Video clients cannot connect

The API Proxy is not reachable. Confirm port 8081 is open and apiproxy.port / apiproxy.address are set for this host.

Video works on the local network but not remotely

The TURN control port (3478) and the media relay range must be open to clients, and the host must advertise a reachable address.

Alarms or signals do not reach SBN

Check the API Engine connection - sbnfrontend.url and the credentials - and that the API Engine is reachable from this host.

Related pages

  1. SBN Media Overview (SBN-Media/overview) - the full set of services and how each is configured.
  2. NATS Configuration (SBN-Media/nats-configuration) - setting up the message cluster SBN Media depends on.
  3. Call Forwarding (SBN-Media/call-forwarding) - configuring how calls are routed.




Was this helpful?