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
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 –
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 –
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 –
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 …
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 –
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.
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 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
Now we can make calls to regular telephone number via our trunk we want to setup a DID (Direct Inward Dial) number so that we can receive calls from people dialing a regular phone number.
For this example I’m going to use a US number from IPKall who will provide a (free) US based telephone number. However, they are only able to do this due to a peculiarity in the law in certain states so I wouldn’t rely on the numbers being available in the future. Perfect for testing though!