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:
Category Archives: Programming
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.
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:
Connect to MS-SQL server from PHP-Linux
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)
Continue reading
Playing Farsi digits in Asterisk
Here is the Asterisk AGI to play Farsi numbers. The script is meant to play numbers as big as 1000, so for bigger numbers you need to do some simple modifications.
Continue reading
find/Replace in linux
regexxer is a nifty GUI search/replace tool featuring Perl-style regular expressions. If you need project-wide substitution and you’re tired of hacking sed command lines together, then you should definitely give it a try.
Continue reading
Linux bash scripting – Basic
In this post we have some basic scripting samples collected from here and there. It must be straightforward and to the point, way better than going through pages of manuals looking for a clue. Check the resources at the end
Continue reading
CLID popup using Asterisk AGI and jquery
Change mysql root password using MySQL sql command
You can directly update password using the following method to update or change password for user vivek:
1) Login to mysql server, type the following command at shell prompt:
$ mysql -u root -p
Call Queue interface Design for auto Dialer using JQuery
I was just working on developing a simple Asterisk based auto-dialer. I came up with a design for the interface using JQuery Drag ‘n Drop feature.

see Demo
Continue reading