Today a friend of mine asked me if I have got any manual for an Asterisk HA setup, so I decided to write this post to share with everyone else.
In this manual, we are using DRBD with Heartbeat on Debian. Feel free to try it on any other linux distro (make sure to do the proper adjustments). Please don’t use the configuration samples here in any production environment, unless you have had it completely tested in your lab.
We have recently used Digium gateway as alternative to other existing PRI interfaces and it’s been working like a charm. However, we had a client who needed to monitor the PRI connections and send an email alert whenever the PRI go down. Back then we had no issue with PRI PCI cards as we had access to DAHDI and could simply write a daemon to monitor “pri show spans”. With this gateway however, we cannot do it as simple as that as we have no access to the PRI and there is no SNMP tool whatsoever. The way I could think of was to push the syslog to Asterisk server and parse the syslog looking for anything suspicious. Now here is how I worked that out:
I have a 3g mobile stick and in certain circumstances I would need to route internet traffic of a PC/server or a particular subnet through this interface. In a windows OS we could simply achieve this by enabling internet sharing on the interface itself. But in the case of ubuntu we can easily enhance ICS (internet connection sharing) feature to a higher level as internet gateway. This way your linux machine can be turned into a gateway which is way cool, isn’t it?
I need to run a php script as a daemon in the background. The thing is I may need to go back and check what’s going on with the script. Using screen window manager we can achieve this in a pretty nice way.
I wrote the following script to kick out logged in users to Asterisk. (FreePBX deviceanduser mode)
Here are the steps to set date and time in linux
Different IP Phones require different methods of provisioning. Below I describe how to do this on Grandstream phones (tested on GXP285) with firmware: 22.214.171.124
Here is a sample on running a service to startup in centos:
In order to add Persian language we need to do some modifications on the Asterisk source code. For that, download the same Asterisk version as your current one (in case you’re using FreePBX/Trixbox). The main thing to change is the Asterisk say digits. Here is what must be changed:
Having searched for quite a long while, here is how I figured out the way to connect to a Microsoft SQL server from Linux using PHP mssql extension module. (Thanks to Danne Lundqvist)