Atlas Knowledge Base
Dashboard
Line Configuration

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.

Where lines are stored

From release 96.17 (beta), the lines of a deployment are kept in one shared line store, and every SBN Media host in the deployment works from the same lines. Administrators edit them on the Lines page of the Media Console. A saved change takes effect on every host without a restart, and calls on other lines carry on.

The defaults in defaultlineconfig stay in the SBN Media configuration.

  1. Every host or named hosts: a line applies to every host, or only to the hosts the administrator names. On a named host, that host's version of the line is used in place of the deployment-wide one. This suits a SIP trunk that registers against each host's own connection.
  2. Checked before saving: a line that breaks the line configuration rules is refused, and the Lines page shows why. Nothing is stored.
  3. Secrets: SIP passwords, the routing password, the mail password and the encryption key are never shown again once saved. An administrator can keep, replace or clear them.
  4. Who changed it: each line records who last changed it and when. Earlier versions are not kept.
  5. When the store cannot be reached: each host keeps a copy of the last lines it applied and goes on handling calls with them. Changes made meanwhile reach the host when the store is back.

Upgrading to 96.17. The upgrade copies each host's existing lines into the line store, so no line needs to be entered again. A line that is the same on every host becomes one deployment-wide line. A line that differs on a host becomes a line for that host. The upgrade never overwrites a line already in the store.

Line files. Lines in the configuration file (lineconfig) remain for development and test hosts. When the store and a file both define a line, the store wins. A line deleted from the store stays deleted on every host, even where a host's file still lists it.

Beta note. In 96.17 beta, the line service (linemanager) is not started by default. Enable it on at least one host in the deployment with watchdog.host.linemanager: 1.

  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: The line store and the line service (linemanager) from 96.17. Earlier releases read lines from each host's configuration file.

How lines are configured

The example shows the settings in configuration-file form. The Lines page holds the same settings for each line.

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

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.

How do I change a line?

Open Admin in the Media Console, choose the Lines tab and edit the line. The change applies on every host the line covers as soon as it is saved.

How do I copy lines to another environment?

Use Export on the Lines page, set a passphrase, and use Import on the other environment's Lines page with the same passphrase. See Media Console Overview for the steps.

  1. SBN Media Overview (SBN-Media/overview)
  2. Deploying SBN Media (SBN-Media/deployment)
  3. SIP Server (SBN-Media/Telephony/sip-server)
  4. Alarm Protocols (SBN-Media/Configuration/protocols)
  5. Call Routing (SBN-Media/Telephony/call-routing)
  6. Media Console Overview (SBN-Media/Media-Console/overview)




Was this helpful?