Learning Fonica PABX and FreePBX

I’ve been testing out a few free PBX distributions, and the most recent one I’ve tried is called Fonica PABX. It’s basically a bundle of Centos, Asterisk, FreePBX, and some other asterisk modules that are wrapped together with a nice installer system.

Step 1 – Install Fonica PABX

  • Download the latest ISO and burn it to a CD
  • Follow the instructions on the Fonica PABX wiki.
  • Make sure you change all the default passwords as described in the instructions, otherwise your box will be open to the world.

Step 2 – Set up some extensions with FreePBX

  • Browse to FreePBX > Basic > Extensions
  • Add a generic sip device, specifying the user extension (e.g. 0001) and a secret (password)
  • You may also wish to enable call recording, and voice mail – if so, specify a voicemail pin.

Step 3 – Configure FreePBX to allow Inbound and Outbound calls

In this example we are going to set up a trunk to Magrathea Telecom to allow inbound / outbound calls via IAX2.

  • Browse to FreePBX > Basic > Trunks
  • Add an IAX2 Trunk.
  • For the outgoing settings, give the trunk a name such as “magrathea-out”, then specify the hostname (iax3.magrathea-telecom.co.uk) and your username / password. Magrathea or your VOIP service provide will have given you these details.
  • For the incoming settings, the user context (username) and secret (password) are the authentication details that the VOIP provider will use when connecting to you. In Magrathea’s case we can set these to anything we want, we then notify magrathea of them through an API call. E.g. username:[email protected]

After the trunk is setup, you must define both an outbound and inbound route. For the outbound route:

  • Browse to FreePBX > Basic > Outbound Routes
  • Give the route a name, e.g. default
  • Specify the dialplan pattern, e.g. XXXXXXXXXXX would match any 11 digit number
  • Specify the outgoing trunk to use e.g. magrathea-out (or the name you used when setting it up).

For the inbound route:

  • Browse to FreePBX > Inbound Call Control > Inbound Routes
  • Give the route a description (e.g. default) and a destination (e.g. an extension, voicemail, queue or ring group). You can leave the DID number blank if you want this to be a default route, but fill it out  if you want to match a specific number. Magrathea send the DID numbers in the full international format, e.g. 448448160054.

Step 4 – Install additional FreePBX modules such as Queues and Ring Groups

  • Browse to FreePBX > Admin > Module Admin
  • Click “check for updates online”
  • You should then see a list of modules. Click on the modules you would like to install, and then select the “download and install” action.
  • Once you’ve chosen all the modules you want, click the “process” button in the bottom right hand corner of the page.

Other things I plan to do:

  • Set up queues and / or ring groups with their own voicemail (how can queue members access it?)
  • Set up a phone directory to
    • Automatically look up known caller ID from a database, and append to CID on inbound calls.
    • Allow directory lookup from Snom phone itself.
  • Get auto-provisioning working, to automatically assign extensions to our snoms.
  • Work out how to set up patterns for inbound calls, so that 0844 816 XXXX goes to extension XXXX.
  • Port our existing geographic numbers from BT to Magrathea and assign to extensions.
  • Set up system to fall back to analogue lines if VOIP not working, and also to route 999 / operator calls out over PSTN.
  • Is it secure to allow “anonymous inbound sip calls” from the FreePBX > Basic > General Settings menu?