Atlas Knowledge Base
Dashboard
Line Configuration

Line Configuration

Line configuration in SBN Media - how each phone number, SIP trunk, or receiver line is handled: protocols, caller ID, call limits, and more.

alarm
configuration
line-configuration
lineconfig
protocols
sbn-media
sip

Line Configuration

A line is a phone number, SIP trunk, or receiver line that calls and alarms arrive on. The line configuration sets how each line is handled - which alarm protocols to expect, the caller ID, the call limits, and more. It is used by the SIP Server, the alarm receiver, and the IP receiver.

Overview

Line configuration has two parts:

  1. defaultlineconfig - the defaults applied to every line.
  2. lineconfig - the settings for individual lines, each keyed by the line's address (for example a SIP address). A line's settings override the defaults for that line only.

So you set the common behaviour once in defaultlineconfig, and add an entry under lineconfig only for a line that needs something different.

Line configuration can be reloaded while the services are running with ./sbn-media config reload - changes take effect without a restart, so you can adjust a line without interrupting calls in progress.

  1. Applies to: The SIP Server, the alarm receiver, and the IP receiver.
  2. Required: Needed to handle alarms and calls the way you want. A line works on the defaults until you give it its own settings.
  3. Depends on: Nothing extra; it is part of the SBN Media configuration.

How lines are configured

# Defaults applied to every line.
defaultlineconfig:
transport: udp
toneRecognizer: dtmf
language: en
protocols:
- p100
- tsa

# Settings for specific lines, keyed by the line address.
lineconfig:
"sip:+4578759982":
callerId: "+4578759982"
dealer: "1001" # required to view this line's video in SBN Anywhere
protocols:
- tsaibs
maxConcurrentCalls: 50

Key settings

The same settings can appear in defaultlineconfig (as a default) or under a specific line (as an override).

Identity and connection


Setting

Description

address

The address the line's calls come from.

callerId / fixedCallerId

The caller ID for the line. fixedCallerId always uses it, which some SIP trunks need because they authenticate on the caller ID.

transport

How the line connects: tcp, udp, ws, tls, or wss.

uac.username / uac.password

Credentials used when SBN Media connects out to an extension on an external SIP server.

dealer

The SBN dealer account for the line. Required to view the line's video from SBN Anywhere.

prefix

A prefix added to the account number (for example SL-).

language

The default language for the line.

Alarm protocols


Setting

Description

protocols

The alarm protocols to expect on the line, listed in priority order (for example p100, tsa, tsaibs). The alarm receiver tries them in this order.

toneRecognizer

How tones are recognized: dtmf or pulse.

processRtpDtmf

Whether to process RTP DTMF tones on the line.

encryptionKey

The key used to decrypt and encrypt signals on the line.

statusWithMedia

The event codes that are two-way voice.

Call limits


Setting

Description

maxConcurrentCalls

The most calls allowed on this line at once.

maxExtensionCalls

Per-extension call limits within the line.

These sit beneath the server-wide limit set by sipserver.maxConcurrentCalls - a call must be within every limit that applies to it.

Protocol recognition

When a line can use more than one alarm protocol, these settings control how SBN Media works out which one a caller is using - it sends handshake tones and retries through the list:

  1. handshakeDelayInMs (default 1500) - the delay before sending handshake tones.
  2. protocolRecognizeTimeoutInMs (default 1000) - how long to try one protocol before moving on.
  3. protocolRetries (default 5) - how many times to retry the protocols.
  4. protocolRetryDelayIncrementInMs (default 100) - extra delay added with each retry.
  5. ignorePreviousCallerIdProtocol - try the protocols in the exact order listed, rather than starting with the one used last time.
  6. switchProtocolUsingHangup - switch protocols by hanging up and waiting for the next call.

Media settings (advanced)

A line can also override how its call media is handled - symmetricRtp (disabled, enabled, or preemptive), forceIce, useHostIPinSDP, and useHostIPinICE. Most installations leave these at the defaults; view them with ./sbn-media config eject.

After changing line configuration in sbn-media.local.yaml, apply it with ./sbn-media config reload. The running services pick up the new line settings without a restart.

Call routing

A line can be given a routing block that tells SBN Media what to do with a call the moment it arrives. This is how you turn a line into a test loopback, link it through to an operator or another PBX, or have it turn calls away. A line with no routing block is handled normally.

There are three modes:

  1. echo - plays the caller's own audio back to them. Useful for checking that audio is flowing.
  2. bridge - dials a second destination and joins the two calls into one two-way conversation. This is how one site reaches an operator or another PBX through SBN Media.
  3. reject - refuses the call before answering, returning a SIP status (603 Decline by default).

Setting

Description

routing.mode

echo, bridge, or reject.

routing.destination

For bridge: the address to dial. It must point at another configured line - the outbound trunk. Put a {user} token in it to carry the dialed number across, so a call to alice@site-a bridging to sip:{user}@site-b dials alice@site-b.

routing.rejectCode

For reject: the SIP status to send back. Defaults to 603 Decline.

routing.crossDealer

For bridge: the dealer accounts this line is allowed to bridge into. See "Keeping tenants apart" below.

lineconfig:
"sip:echo@host":
routing:
mode: echo
"sip:reject@host":
routing:
mode: reject
rejectCode: 603
"sip:bridge@host":
dealer: "1001" # tenant account
routing:
mode: bridge
destination: "sip:operator@trunk.example"
"sip:*@trunk.example": # the outbound trunk the bridge dials
dealer: "1001"
transport: udp

Keeping tenants apart

A bridge only connects two lines that belong to the same dealer account. To let a line bridge into a different dealer on purpose, list that dealer under crossDealer. If the dealers do not match and the target is not listed, the bridge is refused. A line with no dealer set cannot bridge at all.

SBN Media also refuses a bridge that would loop a call straight back out the line it arrived on, or one where the two sides cannot agree on an audio format (both sides must use the same codec). In each of these cases the incoming call is hung up cleanly rather than left connected to silence.

FAQ

How do I make a line use a specific alarm protocol?

List the protocols for that line under lineconfig, in the order you want them tried. The alarm receiver works through the list in order. Set ignorePreviousCallerIdProtocol if you want it to always start from the top of the list rather than the protocol that worked last time.

Why can't I see a line's video in SBN Anywhere?

The line needs a dealer account set. SBN Anywhere uses it to authorize access to the line's stream, so without it the video cannot be viewed.

How do I limit how many calls a line takes?

Set maxConcurrentCalls on the line, and maxExtensionCalls to cap individual extensions. These work together with the server-wide sipserver.maxConcurrentCalls.

Do I have to configure every line?

No. Put the common behaviour in defaultlineconfig, and add an entry under lineconfig only for the lines that need different settings.

How do I link a call through to an operator or another PBX?

Give the incoming line a routing block with mode: bridge and set destination to the address to dial - which must be another configured line (the outbound trunk). SBN Media joins the two calls into one two-way conversation. The incoming line and the trunk must share the same dealer account, unless you list the trunk's dealer under crossDealer. To pass the dialed number straight through to the trunk, put a {user} token in the destination, for example sip:{user}@site-b.

Related pages

  1. SBN Media Overview (SBN-Media/overview)
  2. Installing and Configuring SBN Media (SBN-Media/installation)
  3. SIP Server (SBN-Media/Telephony/sip-server)
  4. Alarm Protocols (SBN-Media/Configuration/protocols)
  5. Call Routing (SBN-Media/Telephony/call-routing)




Was this helpful?