PBX: extensions, provider line, auto-attendant and office hours

John Smith Ltd has a telephone line from the provider (198.51.100.50) with the main number +353 1 000 0000, which the provider delivers as 010000000. Until yesterday an old telephone rang at…

Situation

John Smith Ltd has a telephone line from the provider (198.51.100.50) with the main number +353 1 000 0000, which the provider delivers as 010000000. Until yesterday an old telephone rang at reception. Now Atlas acts as the PBX and Laura White, who looks after IT, has to set up:

  • one extension for each person: John Smith 201, Jack Green 202, Julia Brown 203, Paul Black 204, plus a department extension 205 «Reception» for the reception telephone;
  • the provider line, to receive and make external calls;
  • a ring group 300 «administration» (Jack and Julia);
  • a short number 401 «Courier» towards +353 1 000 0100;
  • an auto-attendant 500: “John Smith Ltd, good morning. Press 1 for administration, 2 for production, 0 for the switchboard”;
  • the office hours (Monday–Friday 08:30–12:30 and 14:00–18:00, closed for the August holidays) with the reception voicemail outside hours.

You will see the physical desk phone in The desk phone; the softphone on the PC and on the mobile phone is another scenario. The Telephony chapter describes every page in detail.

What you need

  • A console administrator (lwhite) and the Active Directory domain already configured, with the users jsmith, jgreen, jbrown and pblack (Users). To assign an extension to a person you need the domain: without it, every page says «Domain not configured: configure Active Directory first.».
  • The details of the contract with the provider: host 198.51.100.50, user 010000000, the line’s password <password>, and the public number in national form.
  • The appliance’s public name (atlas.johnsmith.test) and public address (198.51.100.40).
  • Argos (or the router) in front of the appliance, able to forward the SIP and media ports to 10.20.0.2 (see Ports and services and the Argos chapter on publications).
  • The list of which number goes where: who answers, who does not, what happens outside hours. It is worth writing it down first.

Steps

Install the module and open the ports

  1. Open System → Modules, choose «Telephony» («VoIP PBX») and press «Next».
  2. Fill in «Public name (FQDN)» with atlas.johnsmith.test (empty would use the mail server’s name; the name pbx.<mail server> is reserved and the console refuses it) and «Public IP address» with 198.51.100.40. Press «Deploy».
  3. When the installation has finished, if «Telephony deployed, but some parts are not ready» appears, read the list: it says for example that the speech service is not deployed («speech service not deployed: auto attendants and voicemail greetings stay silent») or that the call log table was not created («call log table not created: calls are not recorded»). Each item has its remedy further down.
  4. Open Network → Local firewall, «Services» block: «Telephony» must be turned on (tcp ports 5060 and 5061, udp 5060, udp 10000–20000). In «Reachable from» choose «Anywhere» only if the provider line must register or call towards the appliance from outside; if all the phones are internal, «LAN and VPN sites». Press «Apply» and confirm within 60 seconds.
  5. On Argos publish the PBX ports towards 10.20.0.2 (udp 5060 and the media range udp 10000–20000): the steps are in the Argos manual, chapter on publications. If another device used to register the same line, an old session may keep the registration busy for a while: if the line does not register, wait and try again before looking elsewhere.

Office hours

  1. Open System → Settings, «Telephony» block (or the gear of any PBX page). Check that «International prefix» is Ireland, «Emergency numbers» 112, 999 (Ireland’s, set at installation), «Public IP» 198.51.100.40 and «Message expiry» 30 (days that voicemail messages are kept).
  2. In the «Office hours» table, for Monday–Friday write 08:30–12:30 in «Slot 1» and 14:00–18:00 in «Slot 2». Leave Saturday and Sunday empty: the PBX considers them closed.
  3. In «Holidays» the installation already has the Italian national holidays (01/01, 06/01, 25/04, 01/05, 02/06, 15/08, 01/11, 08/12, 25/12, 26/12). John Smith Ltd is in Ireland: delete them and, with «Add holiday», enter this year’s Irish public holidays, for example 01/01, 02/02, 17/03, 06/04, 04/05, 01/06, 03/08, 26/10, 25/12, 26/12. The ones on a Monday change every year: enter them again each January.
  4. In «Closures» press «Add closure» and write 10-08..24-08 (August holidays).
  5. Press «Apply»: «Telephony settings saved and applied.» appears. If the console warns that something did not reach the PBX («…have not reached the PBX…», «The PBX is stopped…»), repeat later.
The PBX office hoursThe PBX office hours
The PBX office hours

Extensions

  1. Open Telephony → Extensions. For each person press «New extension», leave the «Type» on «User», choose the «User» and write the «Extension»:
    • «John Smith (jsmith)» → 201;
    • «Jack Green (jgreen)» → 202;
    • «Julia Brown (jbrown)» → 203;
    • «Paul Black (pblack)» → 204. The number must be between 200 and 299, and the console suggests the first free one.
  2. For 201 turn on «Enable voicemail», write a PIN (for example 4821) and check «Notification email» (jsmith@johnsmith.test). Press «Create». «Changes saved.» appears.
  3. Press «New extension», choose the «Type» «Device», «Extension» 205, «Label» Reception, «WebRTC softphone» off. Turn on «Enable voicemail» with a PIN, write in «Voicemail greeting» You have reached the John Smith Ltd reception. Please leave a message. and press «Create».

A user has only one personal extension. Their phone is the softphone in the browser (and the Edon Client app): it registers by itself with the user’s credentials, the administrator configures no password. For a device the console generates a «SIP password», visible with «Show».

The ring group and the short number

  1. Open Telephony → Aliases and press «New alias». «Alias number» 300, «Label» administration. In «Ringed extensions» add 202 and 203. «Ring seconds» 25. Press «Create».
  2. Open alias 300 and turn on «Dedicated hours»: Monday–Friday slots 08:30–12:30 and 14:00–18:00, «After-hours destination» 205 — Reception (voicemail). Press «Save». This way, outside hours administration does not ring in vain: the call goes to the reception voicemail.
  3. Open Telephony → Shot numbers and press «New shot number»: «Shot number» 401, «Label» Courier, «Destination number» +35310000100. Press «Create».

Warning When an alias rings, only the alias’s hours count, and when the ring seconds run out the call ends. The voicemail and the busy state of the individual extensions do not count: a busy member simply does not ring. If you want callers who find nobody to leave a message, use the alias’s after-hours destination or point the inbound rule to an extension with voicemail.

The provider line

  1. Open Telephony → Lines and press «New trunk». In the «ITSP server» section write «Description» Main provider, «Priority» 1, «Host» 198.51.100.50, «Port» empty (it uses 5060) and «Codecs» «auto».
  2. In the «Authentication» section choose «Mode» «Registration (username/password)», «Username» 010000000, «Password» <password> and, in «Public number (inbound test)», 010000000. Press «Create». «Item created.» appears.
  3. After a few seconds (press «Reload» if needed) the line’s row has the label «Registered»: the provider has accepted the registration.

If the provider gave you the IP address instead of a user and password, choose «Mode» «IP address»: the «Username», «Password» and «Public number» fields are not needed, and you tell the provider the appliance’s public address (198.51.100.40).

For the technician Registered lines are watched by a check every two minutes that registers the line again in three cases: after Asterisk restarts, if the registration is found lost on two consecutive checks, and if a line that usually receives calls stays silent much longer than its history (office time counts). The «Public number (inbound test)» makes Atlas call that number on the line every night at 05:00: the call does not ring and is not charged. If it does not come back, it regenerates the registration. The outcome is in Atlas’s log.

The auto-attendant

  1. Open Telephony → Auto-attendant and press «New auto-attendant». «Description» Main switchboard, «Type» «Menu».
  2. «Welcome message»: John Smith Ltd, good morning. The audio is generated by a synthetic voice at every save.
  3. With «Add option» create three rows: «Key» 1, «Description» administration, «Destination» 300 — administration; «Key» 2, production, 204 — Paul Black; «Key» 0, Switchboard, 205 — Reception.
  4. «Timeout destination»: 205 — Reception. «Repeats»: 2. Press «Create»: the auto-attendant receives the number 500 (the console assigns from 500 to 549).

A menu needs at least one option, each key only once, and the «Timeout destination» cannot lead back to the auto-attendant itself.

Inbound rules

  1. Open Telephony → Rules and press «New inbound rule». «Trunk» 950 — Main provider, «Geographic number» 010000000, «Destination» 500 — Main switchboard, «After hours» 205 — Reception (voicemail). Press «Create».
  2. If the provider also delivers direct numbers, create a rule for each: for example 010000001 → 201 — John Smith, «After hours» «None». John’s always rings on 201 and, if he does not answer, ends up in his voicemail.
  3. Check the red bar at the top of the page: «Rejected calls: no rule for these numbers». If it appears, click the number: the form opens already filled in with line and number; choose the «Destination» and press «Create».

The number is written as the provider sends it (010000000). The PBX also recognises the +353…, 00353…, 353… spellings of the chosen country. A pattern begins with _ and uses X for a digit: _0100000XX covers 010000000 to 010000099. Without a rule for a number, a call arriving from the provider is rejected.

Check

Do the tests in this order, with the call log open (Telephony → Calls, «Call log»).

  1. The line. In Telephony → Lines the row Main provider is «Registered».
  2. An extension. John Smith opens the console: at the top he sees the telephone icon with the dot turning green. From that extension he dials 202: Jack’s browser rings.
  3. The group. From an extension dial 300: 202 and 203 ring; the first to pick up answers.
  4. The short number. Dial 401: the call to the courier starts.
  5. The auto-attendant. Dial 500 from an extension: you hear the welcome and the three options; press 1 and alias 300 rings.
  6. Inbound, in hours. From your mobile phone call the main number: in hours the auto-attendant’s menu answers. Press 2: Paul Black rings.
  7. Inbound, outside hours. Call on a Sunday or after 18:00: you end up in the reception voicemail (205).
  8. Outbound. From an extension dial an external number of at least four digits, with no prefix to get the line (for example 018765432): it goes out on line 950.
  9. The log. In Telephony → Calls each test is a row with date, «From», «To», «Duration», «Outcome» (green «Answered», amber «Busy» or «No answer», red «Failed» or «Congestion») and «SIP code».

To listen to the voicemail, dial *97 from the extension’s phone and type the PIN.

If something goes wrong

  • The red bar at the top: «The latest changes are saved but have not reached the PBX…». The possible reasons are «the domain controller does not answer» and «Asterisk did not reload the dialplan». Until a save manages to apply them, the PBX runs on the previous configuration. If instead the bar is orange («The PBX is stopped…») the changes apply by themselves as soon as it restarts.
  • The line stays «Invalid credentials». The provider refused the user or password: check the details again. When editing, leaving «Password» empty keeps the current one.
  • The line is «Not registered». The registration did not succeed: provider unreachable, wrong host or port, or the provider does not accept the appliance’s public address. Also check Argos (udp 5060 forwarded to 10.20.0.2) and that «Telephony» in the local firewall is on.
  • The line is «Registered» but inbound calls do not arrive. A provider can say «Registered» and stop delivering. Look at Telephony → Rules: if the provider delivers digits that no rule receives, the red bar lists them (with the line, how many times and when). A click on the number creates the rule. If the provider sends the number in a different spelling from the one you wrote, the call is rejected.
  • You hear the voice in one direction only, or nothing from outside. Almost always it is the «Public IP»: a wrong value in System → Settings → Telephony ruins the audio of calls from outside. Under the field the console shows the address it detects. Also check the forwarding of the udp 10000–20000 range on Argos.
  • The auto-attendant is mute or the row says «No prompt audio». The speech service is not running (the page says so: «The speech service is not running…») or the message is old («Prompt out of date»). Press «Regenerate spoken prompts» in the list bar. If the service does not restart, contact the technician: the console suggests running the Telephony deployment again.
  • I cannot delete extension 205: «Number 205 is still in use». It is the destination of a rule, of an auto-attendant key, of an after-hours setting. The console lists where: change those destinations first.
  • «Extension already used by:…» or «Number already in use.». A number can belong to one thing only (extension, alias, shot number, auto-attendant).
  • With two lines, the second does not take the call. If it is the called party that is busy, the caller hears busy straight away: a second line would reach the same busy number. The next line is tried only if the first cannot carry the call (congestion, line unavailable).
  • The call log is empty. The log table was not created at installation («No calls recorded.»): the module reports it; a check every two minutes brings writing back up.
  • On Easter Monday the company is “open”. The national holidays are already entered, but Easter changes every year and is not there: add it by hand, or use a closure.
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