When you start looking at control panels for Asterisk it can be difficult to decide what you should be using – FreePBX or A2Billing.
While they are both web GUIs for setting up Asterisk, they are used for different things and which one to choose depends on your needs.
Here is a brief description of both to help you decide –
Used for setting up extensions and trunks for inbound and outbound calls
Includes lots of features of a traditional PBX – voicemail, IVRs, ring groups, queues etc.
Includes Call Detail Records (CDR) that logs all calls, their destination and duration
Used for billing for calls
Can be used to charge for calling card, sip user or regular outbound calls
The heart of A2Billing are the rate cards that include the per minute cost for all destinations allowed to be called
Least cost routing with multiple rate cards with the cheapest route being chosen
Admin and customer interfaces
So FreePBX is used to setup Asterisk with the features of a ‘traditional’ PBX and A2Billing focuses on billing for different types of calls.
It is also possible to combine the two and use A2Billing to account for outbound calls for extensions setup within FreePBX.
A2Billing is more complicated to setup than FreePBX. While it’s possible to setup an extension and trunk in FreePBX and start making calls very quickly there is quite a learning curve with A2Billing. Managing rate cards which hold all destinations and their cost can be quite complex.
Warning – if you follow these instructions fail2ban will, by default, be protecting you against other scans such as ssh attempts. This means though that if you get your IP blocked you will not be able to connect to your server from that IP. Ensure that you whitelist your IP by following the instructions at the end of the post.
Over the past few weeks we have seen a big jump in the scanning of VOIP servers. All of these scans are brute force scanning attempts that first scan for valid extension numbers and then to brute force guess the extension password by repeatedly trying different passwords.
Unfortunately Asterisk doesn’t have anything built-in to prevent these types of scans but it is very good at logging these attempts in the Asterisk logs. This means we can use a free utility called fail2ban and the linux iptables firewall to block IP addresses that make repeated failed login attempts.
Fail2ban is already included in PBX-in-a-Flash but we can also use it with other Asterisk distributions.
Elastix includes an Instant Messenger server called OpenFire. While not enabled by default it is very easy to enable.
What’s not so obvious is how to disable OpenFire if you decide, once you’ve had a look at it, you don’t want/need to run it. You might want to do this as OpenFire runs on Java which can be quite memory hungry, also it opens another point of attack to your server.
The easiest way to disable it is via the command prompt by running –
service openfire stop
chkconfig openfire off
This will also stop it starting automatically when the server is rebooted.
If you are using Trixbox (or probably any Asterisk distribution) with SIP trunks and the Dahdi dummy driver and experiencing poor audio or music on hold then it may be worth changing the ‘internal_timing’ setting.
This can be set be editing the file – /etc/asterisk/asterisk.conf file and making sure that the following 2 lines are not commented out (they should not have a ; in front of them) –
internal_timing = yes
In some cases this can improve the audio quality dramatically.
If you’re using FreePBX or one of the distributions that use it such as Trixbox, Elastix, PBX-in-a-Flash and are having a problem with IVRs being slow to respond it it is worth checking that you do not have “Enable Direct Dial” enabled for the IVR.
This option allows a customer to dial an extension number rather than an IVR menu option but this means that FreePBX has to wait to see if an extension number is being dialled, which can introduce a delay.
If you don’t need callers to be able to dial extensions from an IVR then you can turn this option off.
Just set the codec you’re going to be using (check with your VOIP provider – g.711/ulaw is usual and the highest quality), the connection type (usually SIP or IAX2 with Asterisk) and the number of concurrent calls. It will then display the bandwidth required for that many calls.
One thing to watch out for if you’re planning on mixing codecs (say g.711 on one leg of the call and g.729 on the other) is that your server will have to transcode/convert the audio which is processing intensive. This may limit the number of concurrent calls your server can handle.
Also don’t forget that if you’re planning on running Asterisk at home your upload speed will normally be a lot slower than the download speed.