Atlas Knowledge Base
Dashboard
SBN Media Overview

SBN Media Overview


SBN Media is a set of services that connect cameras, telephony and alarm devices to SBN. Each service runs as its own process, and the services talk to each other over a NATS cluster. Media sources and telephony lines arrive at the connector and device services, media processing and alarm handling run as separate services, and the results are delivered to SBN for operators to act on. To choose the products for a deployment, see Start Here.

SBN Media data flow: devices and telephony, the NATS message bus, processing, SBN and operators

Platform and products

The sbn-media executable is the platform. It runs the watchdog, the API proxy, the log server and the authorization server on every host. Each product is a separate executable that provides a group of services. The watchdog starts each service from the executable that provides it.

ProductExecutableServices
SBN Media platformsbn-mediawatchdog, apiproxy, logserver, authserver
SBN Videosbn-videocamerastream, recordedstream, filestream, streammixer, yoursix, milestone, cameraloader, recorder, devicemanager
SBN Browsersbn-browserwebrtcpeer, turnserver
SBN SIP Serversbn-sipserversipserver, routing, sipmedia, recorder
SBN Receiversbn-receiveripreceiver, httpreceiver, emailreceiver, filewatchreceiver, scaip, alarmreceiver, alarmdtmfsender, alarmsupervisor, tonerecognizer
SBN Frontend Proxysbn-frontendproxysbnfrontend
SBN Automationsbn-automationapslexecutor, sbnapsl, sbnivr, scriptexecutor
SBN Voicesbn-voicetexttospeech
SBN Analyticssbn-analyticsimageclassifier, scenechangedetector, reidserver, aillm, annotation, tracksnapshot
SBN Xlatesbn-xlateaudioxlate
SBN Insightssbn-insightsflowcollector, flowserver, loganalyzer
SBN SafeLinesbn-safelinesafelinefrontend
SBN MLR2 Frontendsbn-mlr2frontendmlr2frontend

Cameras from manufacturers with their own SDK or cloud connect through vendor camera plugins in SBN Services. See Vendor camera plugins.

Add a product to a host with product add. The command downloads the executable next to sbn-media and records which services it provides:

./sbn-media product add sbn-video # Install a product and map its services
./sbn-media product list # Show the products, which are installed, and their versions

The full first-time setup of a host is on Deploying SBN Media.

Service commands

The sbn-media executable controls every service on the host:

./sbn-media service health # Show the health of services on this host
./sbn-media service list # Show the list of services
./sbn-media service restart [all | host | service] # Restart a service on this host
./sbn-media service showconfig [instanceid] # Show the configuration of a currently running instance
./sbn-media service start [all | host | servicename] # Start a service on this host
./sbn-media service stop [all | host | servicename] # Stop a service on this host

Configuration

Each host reads one configuration file, config.yaml, in the SBN Media folder. It starts as the starter configuration that config eject --product writes for the products the host runs; see Deploying SBN Media. Every setting that is not in the file keeps its built-in default.

Settings are applied in this order, the first one found wins:

  1. Environment variables that start with SBN_.
  2. config.yaml.
  3. Files in the folders listed under include in config.yaml.
  4. The built-in defaults.

A host deployed before config.yaml was introduced keeps working: when there is no config.yaml, SBN Media reads <product>.local.yaml, and then sbn-media.local.yaml.

./sbn-media config eject --product sbn-video # Write the starter configuration for a product to config.yaml
./sbn-media config view -a devicestream # Show the settings of one area, with their defaults
./sbn-media config eject # Write every default setting to ./config, for reference

The settings shared by several services each have their own page:

Logging

Each service logs to its own files. The configuration sets the file location:

logger:
    fileLocation: ./path-to-log-files

The location must be writable by the user that runs the service. Log files are not removed automatically.

Each service also logs to the log server, which keeps a central log of every service on the host in the same location. The SBN Media dashboard shows a snapshot of these entries. To look up the SIP messages and log lines of one call, use Log Search.

Watchdog

The watchdog checks the health of each service and starts or stops services to match its configuration:

watchdog:
  # The number of each service to run on this host.
  # A zero count stops any instance of that service the watchdog finds.
  host:
    apiproxy: 1
    logserver: 1
    turnserver: 1
    watchdog: 1
    webrtcpeer: 1

  # The minimum number of each service across the NATS cluster.
  # The watchdog reports an error when fewer are running.
  system:
    apiproxy:
      min: 1
    webrtcpeer:
      min: 1
    sipmedia:
      min: 1
    sipserver:
      min: 1

  # The memory limit, in MB, above which the watchdog restarts a service.
  maxMemoryMb:
    apiproxy: 200

Services

Each service has one role. Connectors accept traffic that arrives from outside: calls, browser sessions and alarm signals. Devices open a media source, such as a camera, a recording or the audio of a call, when a client asks for it. Processing services work on the streams and signals that connectors and devices produce. Delivery services pass the results to SBN and other platforms.

Platform

ServiceDescription
natsMessage bus that connects all SBN Media services. Provided by an external program; see NATS Configuration.
watchdogMonitors service health and starts or stops services as needed.
apiproxyWeb entry point used by SBN Anywhere, SBN Video clients and the dashboard. Also receives events that cameras and partner platforms post to its hooks route.
logserverCollects logs from all services on a host.
authserverSigns in SBN Media user accounts, for example for Media Console and Log Search.

Snapshots, clips and other files attached to events are kept in the file server. The file server is a shared store that the services write to and read from; it is configured once per deployment and does not run as a service of its own.

Connectors

ServiceProductDescription
sipserverSBN SIP ServerConnects SBN Media to SIP trunks and PBX systems.
routingSBN SIP ServerRoutes inbound calls per line: loops them back, bridges them to an operator or another PBX, or rejects them. See also 2-way voice forwarding.
webrtcpeerSBN BrowserConnects browser-based SBN Video clients.
turnserverSBN BrowserRelays video through firewalls so streams reach clients on most networks.
ipreceiverSBN ReceiverReceives alarm signals over TCP or UDP, such as DC-09.
httpreceiverSBN ReceiverReceives alarm signals over HTTP.
emailreceiverSBN ReceiverReceives alarm signals by email (POP3).
filewatchreceiverSBN ReceiverReceives alarm signals from files written to a watched directory.
scaipSBN ReceiverSends and receives SCAIP alarm messages, and opens two-way voice to the alarm unit.

Devices

Devices share common behaviour and configuration; see Device Streams.

ServiceProductDescription
camerastreamSBN VideoConnects to RTSP and ONVIF camera streams.
recordedstreamSBN VideoPlays back streams captured by the recorder.
filestreamSBN VideoStreams from local video files.
streammixerSBN VideoMixes the audio from several streams into one.
yoursixSBN VideoConnects to YourSix cameras.
milestoneSBN VideoConnects to Milestone XProtect, live and recorded.
cameraloaderSBN VideoConnects to cameras served by a vendor camera plugin in SBN Services. See Vendor camera plugins.
sipmediaSBN SIP ServerConnects to call (RTP) media streams.

Clients open a device by URL. Some examples:

  • rtsp: rtsp://host@user:password?key=value,key2=value2
  • recorded: recorded://deviceid?startTime=2006-01-02T15:04:05Z07:00
  • hiknet: hiknet://deviceid?key=ABCDEF
  • sipmedia: sipmedia://call-id
  • webrtc peer: peer://peerid

Vendor camera plugins

Cameras from manufacturers with their own SDK or cloud connect through a vendor plugin in SBN Services. The plugins run in the Cameras Loader Service and pass the camera's media to SBN Media unchanged. SBN Video then converts, records and delivers it like any other camera. Each plugin's settings are configured in the SBN Services Dashboard.

PluginConnects to
ONVIFONVIF cameras on the network. SBN Video pulls the stream over RTSP.
AvigilonAvigilon Control Center (ACC), live and recorded.
TP-LinkTP-Link cameras, through the TP-Link OpenAPI.
DahuaDahua cameras and recorders.
IpTecnoIpTecno cameras and recorders.
DoLynkDahua cameras through the LeChange cloud.
HikVision DirectHikVision cameras and recorders on the network. See HikVision Service.
HikVision ProConnectHikVision cameras through the Hik-Connect cloud. See HikVision Service.
UniviewUniview cameras and recorders.
HoneywellHoneywell cameras and recorders.

YourSix and Milestone XProtect connect directly through SBN Video, without a plugin.

Processing

ServiceProductDescription
devicemanagerSBN VideoManages device configuration and tracks whether each device is reachable.
recorderSBN Video, SBN SIP ServerRecords media streams to storage. Played back through recordedstream.
alarmreceiverSBN ReceiverDecodes alarms received over the phone (DTMF): ContactID, P100, CPC, TSA, TSA-IBS and more.
alarmdtmfsenderSBN ReceiverSends alarms over the phone (DTMF), such as P100.
tonerecognizerSBN ReceiverRecognizes tones such as DTMF in audio.
imageclassifierSBN AnalyticsDetects objects in video using AI models.
scenechangedetectorSBN AnalyticsDetects scene changes in camera streams.
reidserverSBN AnalyticsStores re-identification data. See Video Analytics.
aillmSBN AnalyticsProvides AI language features for vision and text. See Video Analytics.
annotationSBN AnalyticsStores annotations used to train detection models. See Video Analytics.
tracksnapshotSBN AnalyticsStores snapshot images for reviewing detections. See Video Analytics.
texttospeechSBN VoiceConverts text into spoken audio, for example for IVR.
audioxlateSBN XlateTranslates audio from one language to another.

Delivery

ServiceProductDescription
sbnfrontendSBN Frontend ProxyInjects signals and events into SBN, and is the gateway for every SBN API call.
alarmsupervisorSBN ReceiverGenerates supervisory signals from the state of the system.
safelinefrontendSBN SafeLineIntegrates with the Safe Line Orion platform.
mlr2frontendSBN MLR2 FrontendSends alarms to an MLR2 receiver.

Automation

ServiceProductDescription
apslexecutorSBN AutomationRuns action-plan scripts for automated alarm response.
sbnapslSBN AutomationQueues incidents for action-plan processing.
sbnivrSBN AutomationHandles interactive voice (IVR) for outbound calls.
scriptexecutorSBN AutomationRuns Lua scripts for call control and IVR.

Diagnostics

ServiceProductDescription
flowcollectorSBN InsightsCollects call flows and log lines into the flow-log store.
flowserverSBN InsightsAnswers queries against the flow-log store.
loganalyzerSBN InsightsSearches collected logs for analysis.
tcpsplitterSBN SplitterDuplicates a network connection to capture signal traffic. Released separately.

Test tools

SBN Test Tools (sbn-testtools) provides services for test and staging hosts: scaiptest, testrouting, messagetrace, teststream and streamertest. Do not run them on a production host.



Was this helpful?