• 6 users online
The latest Asterisk Management script version is 1.5 that was released on 31st July, 2007.

Downloaded
4536

Asterisk is great open source PBX VoIP system. This Asterisk Management script was written for ease of Asterisk maintenance. Originally it was written for handling Asterisk running on top of DD-WRT firmware but since version 1.4 it can be run on any Linux and Unix operation systems. Asterisk Management script can handle Asterisk configuration files, view peers, channels, calls, log files and system status.

Note: Since version 1.4, operation_system_variant parameter needs to be set to get it work.

Here are screen shots if you would like to see: Calls, Commands and File Editor.

1. Install Asterisk Management Script for OpenWrt

cd /www
mkdir cgi-bin
cd cgi-bin
wget http://www.fivn.com/asterisk_sh.php
chmod 755 asterisk.sh
Set operation_system_variant="openwrt" in the script
Server URL: http://asterisk.server.com/cgi-bin/asterisk.sh

2. Install Asterisk Management Script for Unslung

Gawk needs to be installed to get script works. Here are installation instructions:

Install gawk

ipkg update
ipkg install gawk
rm /usr/bin/awk
cd /usr/bin
ln -s ../../opt/bin/gawk awk

Install Asterisk Management script for Apache

cd /opt/share/apache2/cgi-bin
wget http://www.fivn.com/asterisk_sh.php
chmod 755 asterisk.sh
Set operation_system_variant="unslung" in the script
Server URL: http://asterisk.server.com/cgi-bin/asterisk.sh

If your system has problems to execute Asterisk commands, then web server is needed to be checked if it has access rights to execute such commands.

3. Install Asterisk for DD-WRT

Here are instructions how to install Asterisk running on top of DD-WRT using Optware package system. It is required that a router has been modified and it has been added SD card which has been enabled. The firmwares I have tested are: DD-WRT V23 SP2 and V23 SP3.

Here are list of commands how to install Asterisk. More information of Optware installation can be found at DD-WRT Wiki page.

Optware package system needs to be set up first.

Install Optaware package system

mkdir /mmc/opt
mkdir /mmc/tmp
mkdir /mmc/tmp/ipkg
mount -o bind /mmc/opt /opt
mkdir /opt/etc
mkdir /opt/usr/lib

echo "src unslung http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable" > /opt/etc/ipkg.conf
echo "dest root /mmc" >> /opt/etc/ipkg.conf

export IPKG_CONF_DIR=/opt/etc

ipkg update
ipkg install uclibc-opt
ipkg install asterisk (or ipkg install libcurl, ipkg install ncurses, ipkg install openssl, ipkg install asterisk)
ipkg install esmtp (optional, only need to send voice messages to users' mail boxes)

Install sample configuration

wget asterisk_1_2_sample_slug_config.tar.gz
tar -xzvf asterisk_1_2_sample_slug_config.tar.gz
mv sample_slug/*.* /opt/etc/asterisk
rm -rf sample_slug

Install Optware startup script

mkdir -p /mmc/etc/config
cd /mmc/etc/config
wget http://www.fivn.com/scripts/optware.startup
chmod 755 optware.startup

Install startup scripts

mkdir -p /opt/etc/init.d
cd /opt/etc/init.d
wget http://www.fivn.com/scripts/S50asterisk
wget http://www.fivn.com/scripts/S51astadmin
chmod 755 S50asterisk S51astadmin

Install Asterisk Management script

mkdir /opt/web
cd /opt/web
wget http://www.fivn.com/asterisk_sh.php
chmod 755 asterisk.sh
Set operation_system_variant="dd-wrt" in the script

After installation, the router is needed to reboot, then go to this URL http://router_address/user/cgi-bin/asterisk.sh to check if Asterisk works.

DD-WRT web server has some limitations. I found these issues during developing Asterisk Management script.
  • Web server does not support GET method to submit form data.
  • Web server can only be able to handle 8 KB buffer data. Files which are bigger than 8 KB cannot be saved.
  • Web server does not support other file formats than html, style files and pictures.

4. Changes:

31/7/2007, version 1.5
  • improve HTML and CSS
  • change from HTML to XHTML 1.1

8/7/2007, version 1.4
  • combine DD-WRT and Unslung scripts into 1
  • modify the script that works on any Linux and Unix operation systems
  • support OpenWrt

25/1/2007, version 1.3
  • show calls in reverse order

20/1/2007, version 1.2
  • parse Master.csv file for view calls

1/1/2007, version 1.1
  • add Asterisk version 1.4 support