Deploying SBN Media
An SBN Media deployment is one or more hosts connected to the same NATS cluster. Every host runs the SBN Media platform, sbn-media, and the products that host needs, such as SBN Video for cameras or SBN Receiver for alarms. To choose the products, see Start Here.
What you need
- A host for SBN Media: Windows, Linux or macOS.
- A NATS cluster that the host can reach. See Step 2.
- Network access from the host to the SBN API Engine, and to the release FTP site, or a local copy of the release tree.
- The GStreamer runtime, on any host that runs SBN Video, SBN SIP Server, SBN Receiver, SBN Analytics or SBN Xlate. Download it from gstreamer.freedesktop.org.
Step 1 - Download and install into a folder
Copy the SBN Media release for your platform into an empty folder, for example C:\Innovative\SBN-Media on Windows. Run every command on this page from that folder.
Step 2 - Configure NATS
SBN Media does not start NATS. It connects to an existing NATS cluster, installed with innovative-nats. Set up the cluster and choose the NATS token that SBN Media uses to connect; see NATS Configuration.
Step 3 - Eject the configuration for your products
Write the starter configuration for the product this host runs:
The starter is written to config.yaml. It holds only the settings that product needs, marks the ones you must set with REQUIRED, and lists the product's services in the watchdog host map. Eject never overwrites an existing file.
For a host that runs more than one product, write each further starter to its own file and copy its sections into config.yaml. Sections that every starter shares, such as broker, apiproxy and releases, appear only once.
The products and the services each one provides are listed on the SBN Media Overview.
Step 4 - Edit the configuration
Open config.yaml and set every value marked REQUIRED. Every starter asks for:
broker.connectionStringandbroker.authorization.password: the NATS node on this host (normallynats://localhost:4222), and the NATS token from Step 2.apiproxy.adminToken: a long random secret for the administrative endpoints.apiproxy.allowOrigins: the web origin allowed to call SBN Media, such as your API Engine.releases.ftp.password: the release FTP password, used to download the products. To install from a local copy of the release tree, setreleases.sourceto that folder.
Each product then asks for its own settings, for example the recordings folder for SBN Video or the SIP lines for SBN SIP Server. The settings of each service are on its own page; see the SBN Media Overview. For how lines are handled, see Line Configuration and Alarm Protocols.
Every other setting keeps its built-in default. To list the settings of one area, or to write every default into a ./config folder for reference:
Step 5 - Add the products
Download each product the host runs into the folder:
A product that is not added here is downloaded the first time the services start.
Step 6 - Start and verify
Start the services in the foreground:
The watchdog starts and supervises every service in the host map. From a second window, check the services and the configuration:
The SBN Media dashboard, at the API Proxy address (for example https://your-host:8081), shows the running services and a snapshot of the logs.
When everything is healthy, stop the services with Ctrl+C in the first window.
Step 7 - Set up the daemon
Register SBN Media as a background service, a Windows Service or a Linux or macOS daemon, so it starts with the host:
./sbn-media daemon stop stops the service, and ./sbn-media daemon remove unregisters it.
Network ports
Open the ports for the services the host runs. The defaults are shown; all are configurable.
| Port | Used by | Open to |
|---|---|---|
| 4282 | NATS cluster (server to server) | The other NATS nodes of the deployment |
| 4222 | NATS client | Local services only; not opened to other 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 |
Video needs only the API Proxy port (8081) to be reachable. The SIP and TURN ports are needed only on hosts that run SBN SIP Server or SBN Browser. For clients outside the network, the TURN control port (3478) and the media relay range must be reachable, and the host must advertise an address the client can reach. See TURN Server and Firewall.
Keeping SBN Media up to date
SBN Media updates itself and rolls the new version out across the hosts in the deployment:
An update keeps your settings and logs, and installs any product a host needs for the services in its host map. To bring the products on a host to the platform's version after an update that did not refresh them, run ./sbn-media product update all.
Troubleshooting
| Symptom | What to check |
|---|---|
| Services do not start | NATS is not reachable. Confirm the cluster is running and that broker.connectionString and the NATS token are correct. |
A service is missing from service health | The service is not in the watchdog.host map, or its product is not installed. Check config.yaml and product list. |
| A product does not download | Check releases.ftp.password, or releases.source when installing from a local release tree. |
| SBN Video clients cannot connect | The API Proxy is not reachable. Confirm port 8081 is open and that apiproxy.allowOrigins names the client's origin. |
| 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 and credentials in the SBN Frontend Proxy settings, and that the API Engine is reachable from this host. |
Related pages
- Start Here for choosing the products.
- SBN Media Overview for the full set of services and how each is configured.
- NATS Configuration for the message cluster SBN Media depends on.
- Certificates for the TLS certificates of the SIP and HTTPS endpoints.
- 2-way voice forwarding for connecting a PBX.