Tag Archives: trunk

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


New or novice users my find this basic glossary useful when using their Asterisk VOIP, a few telephone industry acronyms

CDR: Call Data Records or Call Detail Records.  These are logs of calls that have passed through the phone system.

GUI: Usually pronounced “gooey”,  Acronym for Graphical User Interface, the graphical administration software used to manipulate the phone system

Inbound call: This is a call from a regular telephone number to your PBX. Also referred to as Origination

ITSP:  Acronym for Internet Telephony Service Provider. This is a company that allows calls to and from ‘normal’ telephone numbers (PSTN)

NGN: Acronym for Non Geographic Numbers, such as 0845 in the UK

Outbound call: This is a call from your VOIP PBX to a regular telephone number. Also referred to as Termination

PBX: This stands for Private Branch Exchange, it is an old fashioned term for a phone system

PSTN: Public Switched Telephone Network. This is a term used to described the ‘normal’ telephone network. Non VOIP landline and mobile/cell telephone numbers.

SIP: A communication protocol for phones, a language to make phones and phone systems, talk to each other

Trunk: A link to another phone system or call provider. For example you would have a ‘trunk’ to your call provider (ITSP). Your system would send VOIP calls down the trunk to your call provider, they would send the call to it’s destination (a landline or mobile)

Integrating FreePBX with A2Billing

Please note that if using Asterisk 1.6 or later the pipe (|) symbols below need changing to commas (,)

There are several reasons you may want to integrate FreePBX and A2Billing. Whether you’re just using FreePBX to setup trunks for your a2billing calling card system or you use FreePBX and want to route the outbound calls via a2billing to do least cost routing.

There are 2 things you need to do to integrate the two. The first is to add the following to extensions_custom.conf

Continue reading

Getting started with A2Billing – Part 1 Setting up a trunk

In this series of articles I’m going to run through how to get up your a2billing system up and running.  A2billing is an opensource billing application for Asterisk and can be used in many different ways – I’ll be documenting just some examples  🙂

Some of this setup will depend how you have your main configuration file (/etc/asterisk/a2billing.conf) configured. I will not be discussing that here. Also some of the setup may rely on FreePBX and A2billing being setup to work together.

All of this documentation was created on a sysadminman Asterisk/FreePBX/A2billing VPS. See here for details – http://sysadminman.net/uk-voip-vps.html

Setting up a trunk

We need to setup a trunk to be used for our outbound calls. Obviously you can setup more than one trunk and route calls to different destinations via different trunks.

I will be using the trunk that I configured in FreePBX here – http://sysadminman.net/blog/2009/getting-started-with-freepbx-part-1-setting-up-a-trunk-335. As the main settings for the trunk have been setup in FreePBX we can just call the trunk by it’s name in A2Billing. This trunk is with a provider called callwithus.

To setup a trunk –

Click on TRUNK on the left hand main menu

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

Sipgatge trunk with Asterisk/FreePBX

I’ve used Sipgate for the past few years with my Asterisk box and have been pretty impressed.

For anyone else looking to use Sipgate with Asterisk/FreePBX here is my trunk setup

Trunk Name: Sipgate

PEER Details:


Register String:


If you are using NAT between your Asterisk box and Sipgate you will need “canreinvite=no” and “nat=yes” or you will probably get one way audio only on your calls

Edit: context changed to “from-trunk” to make the post clearer