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:
simple posting web page
We had a coursework recently which required us to come up with a twitter-like web application in which people can register and write post, read other users’ posts as well as leaving replies to those posts. I have uploaded this application here.
Most of the job is done by combination of Javascript (ExtJS) and backend PHP. Please do register there and write posts if you want
Note: It works best under Firefox or Chrome. IE doesn’t support most of the features included.
Configure your ubuntu desktop as an internet gateway
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?
Cisco conference phone 7937 with Asterisk
Recently we had a customer with this cisco conference phone (7937) which doesn’t support SIP protocol. To get it to work with Asterisk we need to either use chan_skinny or chan_sccp. As the latter is a lot more solid is brief you how it work here:
running linux daemon in the background using screen
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.
Insert BLOB into MSSQL using PHP
Recently I had a customer who wanted to push all VoiceMail voice files into a table in MSSQL database. After going through a lot of searching and trying I managed to get it running like this:
kickout script for Asterisk Hot desking
I wrote the following script to kick out logged in users to Asterisk. (FreePBX deviceanduser mode)
Grandstream IP Phone auto-provisioning Template
Here is a php file that will read the list of IP phones from a CSV file including MAC address, host IP address, Extension and Secret. Then it will generate a binary for each cfgMAC.temp file.
Download the file here
Set Date/Time in Linux
Here are the steps to set date and time in linux
IP Phone provisioning option 66 and 43
Different IP Phones require different methods of provisioning. Below I describe how to do this on Grandstream phones (tested on GXP285) with firmware: 1.2.5.3
