Tag Archives: extension

Monitoring your Peers (Asterisk extensions) and Trunks

As an admin for a telephone system, possibly one of the most useful things you can do is monitoring your peers and trunks. There are 2 great reasons you should do so:

1. You can respond to and resolve issues with your system before your users know about it, and you can be in the know if someone reports “none of the phones are working” when in fact only 1 or 2 are not working

2. You can actually know when there is a problem with the system – where you otherwise might not know there is a problem until someone calls on your mobile to say your office number is not working


I have 2 scripts running every 15 minutes to email me with the details of any down extensions and trunks. This is done in Crontab with the line:

*/15 8-18 * * Mon-Fri /usr/Peermonitor.sh

and similar for Trunkmonitor.sh. This line says to run every 15 minutes between 08:00 and 18:00 every Monday-Friday

Continue reading

FreePBX bulk extension setup or modify

Recently I had to set up 150 extensions and DDI numbers for a customer. Luckily they had a spreadsheet that contained all of the extension numbers and associated DDI numbers.

While it would have been possible to type all of these in using the FreePBX GUI it’s obviously not desirable, and prone to errors.

To create the extensions I used the ‘Bulk Extensions’ module in FreePBX. This is an ‘Unsupported’ module but worked well for me –

Bulk Extensions

What this module does is allows you to import a CSV file (in the correct format) to create all of the extensions. It also allows you to modify any existing extensions.

By far the most important thing to do when using this module is to back up your configuration, and back it up regularly. If you make a mistake, or this modules screws up your configuration, you will need a good backout plan!

The easiest way to get a CSV file in the correct format is to create a couple of extensions manually first. Make sure all of the settings for these extensions are set as required.

Then you can export the current extensions in to a CSV format using the module –

Export existing extensions

If you load this CSV up in to something like Excel you will see the extensions that have already been created with ‘edit’ listed in the first column –

Create new extensions

You can now create new lines but with column A set to ‘add’. Then you can import the CSV and any changes to the ‘edit’ lines will be applied, and any new extensions created. You still need to be fairly handy with Excel to create all of the required fields but it is an amazing add-on for creating more than 10 or 15 extensions. There is also a Bulk DID module that can be used in a similar way to create Inbound Routes.

I suggest the following when using this module –

  • Always back up your data before doing any import!
  • Check over the CSV in something like Notepad before importing it to ensure everything looks OK. Excel can screw up some columns, especially numbers with leading zeros
  • Be careful when dragging down fields to create the new extensions. For example one column is the SIP port. You want to make sure new extensions are create with port 5060, and not 5061, 5062, 5063 etc …

FreePBX video guide Part 1 – Creating an Extension

I’ve written quite a few guides for setting up FreePBX and A2Billing, but they can look a little daunting. So I though I’d have a go at some video tutorials.

The first one is for setting up an extension in FreePBX.

The system used was a clean install of a SysAdminMan virtual server. You can find more details about this here – http://sysadminman.net/sysadminman-freepbx-a2billing-hosting.html

The softphone used is called Blink, this works on both Windows and Linux and you can find more details on that here – http://icanblink.com/



Asterisk upgrade breaks IAX extensions

If you have upgraded your version of Asterisk and find that your IAX2 extensions no longer work then the cause could be a change to the IAX protocol. This was made to resolve a security issue that could result in a denial of service attack.

You will see this error in the Asterisk log file if you are suffering from this issue –

chan_iax2.c: Call rejected, CallToken Support required.

If you use FreePBX then Asterisk can be made to function the same as before by adding the following 2 lines to /etc/asterisk/iax_general_custom.conf –

calltokenoptional =
maxcallnumbers = 16382

You will also need to do a –

 iax2 reload

or restart Asterisk for the changes to take effect.

More information about the reason for this change and the implications for disabling call token checking can be found here –

Using DISA with FreePBX and A2Billing

DISA is great!

It allows you to call in to your Asterisk server, get a dial tone, and then dial back out as if you were using a normal extension on your system. I use this lots to make cheap international calls from my mobile phone.

You may also wish to route your DISA calls via A2Billing. If you’ve integrated FreePBX and A2Billing as described here it’s a simple case of changing one setting on your DISA setup in FreePBX.

Continue reading

Getting started with FreePBX – Part 6 Cheap phone calls using DISA and Callback

One of the great things about voip is that you can make international calls at local rates.  Combine that with Asterisk/FreePBX and you’ve got the ability to make cheap international phone calls using your mobile phone.

To do this we’re going to setup DISA (Direct Inward System Access). This will enable us to ring our Asterisk server, get a dial tone and then dial back out again.

Then I will show you how you can combine this with callbacks if that works out cheaper for you.

Installing the modules

First we need to install the DISA (if it’s not installed already) and Callback modules. See part 5 for more information about installing FreePBX modules.

Setting up DISA

Now we are going to configure a DISA…

Continue reading

Getting started with FreePBX – Part 5 Setting up an IVR

Setting up an IVR (or auto attendant, digital receptionist) is great idea for small businesses. You can have a single external number for your customers to call but then direct the call to the right department via a simple menu.

First we need some extensions to put the calls through to, then we need to record the menu the caller will hear and finally setup the actual IVR.

Configuring the extensions

Follow the instructions in part 2 to create the extensions that you need. I have created extensions for Sales, Support and Billing

Continue reading

Getting started with FreePBX – Part 3 Making external calls

This article assumes you have completed part 1 and part 2

So we have configured our trunk and our extension and now we need to tell FreePBX to use that trunk when someone dials a number. This is done by creating an Outbound Route.

The configuration below also takes in to consideration the fact that I am in the UK and that callcentric is a US company. Your setup may differ.

Creating an outbound route

First we need to click on “Outbound Routes” in the main menu on the left hand side of the screen

Continue reading