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.
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:
- A host to run SBN Media (Windows, Linux, or macOS).
- Network access from that host to your NATS cluster and your SBN API Engine.
- 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). - GStreamer runtime installed on any host that runs media services (for example
camerastream,sipmedia,webrtcpeer,transmuxer). Download the runtime from gstreamer.freedesktop.org. - 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:
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:
sbn-media.local.yamlholds the settings specific to this host. This is the file you edit.- A full set of default settings is built in. You can write a copy to
./configto view them:
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:
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:
To confirm the host is configured correctly, run the built-in checks:
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.
Keeping SBN Media up to date
SBN Media can update itself and roll the new version out across the hosts on the network.
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 |
SBN Video clients cannot connect | The API Proxy is not reachable. Confirm port 8081 is open and |
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 - |
Related pages
- SBN Media Overview (
SBN-Media/overview) - the full set of services and how each is configured. - NATS Configuration (
SBN-Media/nats-configuration) - setting up the message cluster SBN Media depends on. - Call Forwarding (
SBN-Media/call-forwarding) - configuring how calls are routed.