Atlas Knowledge Base
Dashboard
Start Here

Start Here


SBN Media is a set of services that allows connectivity to cameras, telephony, and alarm devices. SBN Media uses a micro service architecture, using NATS to provide the glue.

Media sources and telephony lines arrive at the device and connector services, media processing and alarm handling run as separate services on the bus, and the results are delivered to SBN for operators to act on. To install SBN Media on a host, connect it to your infrastructure, and keep it up to date, see Installing and Configuring SBN Media (SBN-Media/installation).

Services overview

SBN Media operates in a micro service architecture. The services are either internal - packaged with the main sbn-media executable - or external - provided by an external program. In general, the services operate together and can be controlled by the sbn-media executable.

The following commands are available to control a service.

./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

SBN Media uses a file based approach to configure the services. The configuration is accessed by the services in the local path, using the following hierarchy.

  1. sbn-media.local.yaml provides the base configuration. This should contain host specific configuration.
  2. config/*.yaml provides individual configuration files for each service. The base configuration takes precedence on any files found here.

SBN Media is pre-configured with a default configuration. This default configuration can be accessed by ejecting the configuration.

./sbn-media config eject

This will eject the default configuration into ./config. Individual options can then be viewed and set. Note ejecting the configuration will overwrite any existing configuration. It is therefore advisable to only view the configuration and override anything specific in sbn-media.local.yaml.

Only key configuration options are discussed in this document. Others should be viewed by ejecting the configuration.

Logging

Each service logs to their own files. The file location is specified in the configuration.

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

The log files are not automatically removed.

The file location must be writable by the user running the service. In addition, each service logs to logserver which collects a central log of all running services on a specific host. The log server also provides a snapshot of log entries via the SBN Media dashboard.

The logserver service will use the file location above as the path to store its logs.

Watchdog

The SBN Media watchdog provides a monitoring service that confirm the health of individual services will stop and start services as necessary.

The basic configuration of the watchdog is:

watchdog:
# The watchdog can ensure x services are running on this host
#
# Do not include services in this list that are not managed by the watchdog
# A zero count means that the watchdog will kill the service if it sees the
# service as part of the health check process
host:
apiproxy: 1
logserver: 1
transmuxer: 1
turnserver: 1
watchdog: 1
webrtcpeer: 1

# The watchdog can ensure that between x and y services are running across
# a NATS cluster. It will report an error if there are not the requisite
# services
system:
apiproxy:
min: 1
transmuxer:
min: 1
webrtcpeer:
min: 1
sipmedia:
min: 1
sipserver:
min: 1

# The watchdog can kill a service based on the memory usage
maxMemoryMb:
apiproxy: 200

Services

SBN Media is made up of the services listed below. Most are packaged with SBN Media; a few are provided by external programs. Each service is summarised here; fuller descriptions and configuration for each will be available on its own page.

Infrastructure and control


Service

Description

nats

Message bus that connects all SBN Media services.

watchdog

Monitors service health and starts or stops services as needed.

apiproxy

External web entry point used by SBN Video clients and the dashboard.

logserver

Collects logs from all services on a host.

loganalyzer

Searches collected logs for analysis.

turnserver

Relays video through firewalls so streams reach clients on most networks.

scriptexecutor

Runs Lua scripts for call control and IVR.

apslexecutor

Runs action-plan scripts for automated alarm response.

sbnapsl

Queues incidents for action-plan processing.

sbnivr

Handles interactive voice (IVR) for outbound calls.

alarmsupervisor

Generates supervisory signals from the state of the system.

tcpsplitter

Duplicates a network connection to capture signal traffic.

flowserver

Answers queries against the flow-log store.

reidserver

Stores re-identification data for video analytics.

Connectors


Service

Description

sipserver

Connects SBN Media to SIP trunks and PBX systems.

webrtcpeer

Connects browser-based SBN Video clients.

sipproxy

Routes calls between SBN Media SIP servers.

routing

Routes inbound calls per line - loops them back, bridges them to an operator or another PBX, or rejects them.

Devices

Device services connect a media source, such as a camera or a call, to SBN Media.

These services share common behaviour and configuration - see Device Streams.


Service

Description

camerastream

Connects to RTSP camera streams.

recordedstream

Plays back streams previously captured by the recorder.

filestream

Streams from local video files.

sipmedia

Connects to call (RTP) media streams, generally telephony.

streammixer

Mixes the audio from several streams into one.

yoursix

Connects to YourSix cameras.

devicemanager

Manages device configuration.

Devices are accessed from the SBN Video client using a URL format. Some examples:

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

An external HikVision connector (hikvision) connects to a HikVision ProConnect camera.

Media processing and analytics


Service

Description

transmuxer

Converts camera streams into a format browsers can play.

recorder

Records media streams to storage.

imageclassifier

Detects objects in video using AI models.

scenechangedetector

Detects scene changes in camera streams.

tonerecognizer

Recognizes tones such as DTMF in audio.

texttospeech

Converts text into spoken audio, for example for IVR.

audioxlate

Translates audio from one language to another.

aillm

Provides AI language features for vision and text.

annotation

Stores annotations used to train detection models.

tracksnapshot

Stores snapshot images for reviewing detections.

Alarm and signal handling


Service

Description

alarmreceiver

Receives alarms over the phone (DTMF) - ContactID, P100, CPC, TSA, TSA-IBS, and more.

alarmdtmfsender

Sends alarms over the phone (DTMF), such as P100.

ipreceiver

Receives alarms over IP, such as DC-09.

scaip

Sends and receives SCAIP alarm messages.

sbnfrontend

Injects signals and events into SBN.

safelinefrontend

Integrates with the Safe Line Orion platform.

mlr2frontend

Sends alarms to an MLR2 receiver.




Was this helpful?