OpenWRT and Asterisk - my new PABX
I’ve been running Asterisk on my desktop for about a year now. A few months ago I acquired two Accton MR3201A’s configured for OpenMesh using OpenWRT. I finally got around to installing Asterisk on one of them a couple of weeks ago, and this is a record of how I did it.
To give you an idea of the size of the MR3201, her is a picture of one
Yes, that little box really is running a full-blown PABX
Anyway, enough of that, how to set it up
Using Linux on a PC with a free ethernet port run the following:
wget http://www.open-mesh.com/flashing/easyflash
chmod +x easyflash
wget
http://downloads.openwrt.org/kamikaze/7.07/atheros-2.6/
openwrt-atheros-2.6-vmlinux.lzma
wget
http://downloads.openwrt.org/kamikaze/7.07/atheros-2.6/
openwrt-atheros-2.6-root.squashfs
Directly connect to the MR3201a using a standard cat5 patch lead - don’t power the MR3201a yet
Execute the following:
sudo ./easyflash eth0 openwrt-atheros-2.6-root.squashfs openwrt-atheros-2.6-vmlinux.lzma
Now connect power to the MR3201a.
Wait for a while, this will replace whatever firmware is on it with OpenWRT 7.07
The clean firmware install uses an IP of 192.168.1.1 the following should get the local ethernet to work
sudo /sbin/ifconfig eth0 192.168.1.2/24
By default OpenWRT runs a telnet server until a password has been set at which point it switches to an ssh server.
telnet 192.168.1.1
login as root
passwd
The network configuration is stored in /etc/config/network mine looks like this…
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.0.30
option netmask 255.255.255.0
option gateway 192.168.0.1
option dns 192.168.0.1
A restart will set the device to it’s new IP
reboot
now to update the ipkg repositories and get some packages installed
The file /etc/ipkg.conf has a list of repositories in it. I use :
src release http://downloads.openwrt.org/kamikaze/7.07/atheros-2.6/packages
src packages http://downloads.openwrt.org/kamikaze/packages/mips
src extras http://downloads.openwrt.org/kamikaze/7.07/packages/mips
dest root /
dest ram /tmp
To get asterisk installed, use the following ipkg commands
ipkg update
ipkg upgrade
ipkg install asterisk
ipkg install asterisk-sounds
/etc/init.d/asterisk enable
/etc/init.d/asterisk start
All that remains is to configure trunks and extensions. Which will be in a later post. Configuration files for asterisk are located in /etc/asterisk
EDIT: Asterisk will fail to start when trying to load the zaptel channel driver. we don’t need this, so add the following to /etc/asterisk/modules.conf
noload => chan_zap.so ; Don't load zaptel
Possibly Related Posts:
- Configuring Asterisk - Part 3
- Configuring Asterisk - Part 2
- Configuring Asterisk - Part 1
- Machines (Virtual)
- It begins…
Sphere: Related Content
