Telephony → Lines

The lines (SIP trunks) connect the exchange to the telephone provider: calls from the outside arrive on a line and calls to the outside go out on the…

What it is for

The lines (SIP trunks) connect the exchange to the telephone provider: calls from the outside arrive on a line and calls to the outside go out on the lines. You need one or more; with several lines the exchange uses them in order of priority and moves to the next if one cannot carry the call. The page title is «SIP trunks»; the menu entry is Telephony → Lines.

In the example company the provider’s line is 198.51.100.50.

The list

Each row shows the line number (950–975, assigned by the console at creation and never shown in the form), the description, the host and, for registration lines, a status:

Status Meaning
«Registered» the provider accepted the registration: the line works
«In use» a call is in progress
«Invalid credentials» the provider rejected the user or password
«Not registered» the registration failed (provider unreachable, network)
«Status unknown» the exchange does not know yet

An IP-address line has no status in the list, because the exchange does not query the provider; the «About» window shows «Not checked (IP trunk)». «About» summarises «Extension» (the line number), «Host», «Mode» and «Status».

The fields

«ITSP server» section

Field Meaning Typical value
«Description» a name to recognise it (it appears in the rules) Main provider
«Priority» from 1 to 99, default 1: outgoing calls try first the line with the lowest priority 1
«Host» the provider’s server: name or IPv4 address (required) 198.51.100.50
«Port» the SIP port; empty uses 5060 5060
«Codecs» the codecs offered: «auto» (alaw and ulaw, the default) or a choice among alaw, ulaw, g722, gsm. «auto» excludes the single codecs and vice versa auto

«Authentication» section

Field Meaning Typical value
«Mode» «Registration (username/password)»: the exchange registers with the provider; «IP address»: the provider recognises the appliance’s address and no registration happens Registration
«Username» the registration user name (required with registration) 010000000
«Password» the registration password. When editing, empty = keeps the current one <password>
«Public number (inbound test)» only for registration lines: the number that Atlas calls every night at 05:00 to check that incoming calls get in 010000000
«From user» the user to put in the From header, if the provider requires it —
«From domain» the domain to put in the From header, if the provider requires it —

The public number of the test accepts digits, *, # and a leading +. The console rejects a registration line without user or password, an invalid host, a port outside 1–65535, a priority outside 1–99.

Line health and the night test

The registration lines are watched by a check that runs every two minutes and registers the line with the provider again in three cases: after Asterisk restarts, when the registration has been lost for two checks in a row, and when a line that usually receives calls stays silent much longer than its history allows (office time counts, not calendar time). It exists for a real defect: a provider can keep saying «Registered» and let calls out, but stop delivering them.

If you fill in «Public number (inbound test)», every night at 05:00 Atlas calls that number on the line and checks that the call comes in. The call does not ring and costs nothing: the exchange hangs it up without answering. If it does not come in, it regenerates the registration. The outcome is in the Atlas log.

Examples

Example: the main registration line.

  1. Telephony → Lines → «New trunk».
  2. «Description» Main provider, «Priority» 1, «Host» 198.51.100.50, «Port» empty, «Codecs» «auto».
  3. «Mode» «Registration (username/password)», «Username» 010000000, «Password» <password> (the one the provider gave you), «Public number (inbound test)» 010000000.
  4. Press «Create». «Item created.» appears.
  5. Check: after a few seconds (press «Reload» if needed) the row’s label becomes «Registered». If it stays «Invalid credentials», check user and password; if «Not registered», check host, port and that the provider allows the appliance’s public address.

Example: a second backup line. Create a second line with «Priority» 2: outgoing calls use 950 and move to 951 only when the first cannot carry the call (congestion or line unavailable). A busy called party does not make the line change.

Example: a line that recognises the IP address.

  1. «New trunk», «Description» SIP operator, «Host» the name of the operator’s server.
  2. «Mode» «IP address». The «Username», «Password» and «Public number» fields are not needed.
  3. Press «Create». Tell the operator the appliance’s public address (198.51.100.40) and, if the exchange sits behind the router, fill in «Public IP» in System → Settings → Telephony.

Limits and things to know

  • The console assigns at most 26 lines (950–975): when the numbers run out, creation answers «No trunk numbers left (950–975): delete an existing trunk.»
  • When you delete a registration line, the exchange deregisters it from the provider; the inbound rules that use it stop receiving calls (they stay in the list with the label «Unknown trunk»).
  • Priority concerns only outgoing calls; incoming calls follow the rules.
  • A «Registered» line that does not receive calls is checked from the rules: if the provider delivers digits that no rule receives, the red bar of Telephony → Rules shows them.
LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer