Tuesday, 23 September 2008

Asterisk for OpenWRT

Asterisk for OpenWRT

last updated: september 19, 2007

This page contains binaries and sources for running the Asterisk PBX software on OpenWRT devices.

This page has become obsolete since the majority of these patches were merged and improved in the official OpenWRT repositories since version 1.4.11. All requests and bug reports should now be propagated through tickets in the OpenWRT development process. People are strongly advised to use the official repositories for further Asterisk development an installations since there will be no new releases or developement through this site.

The original repositories for version 1.4.9 are still maintained because of some extra features that have not been merged yet, but will be in the near future.
(obsolete) Asterisk 1.4.9
Asterisk 1.4 packages can be obtained through a package repository by adding a new line to your /etc/ipkg.conf:

For OpenWRT WhiteRussian 0.9 on mipsel/brcm (Broadcom and compatibles):
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/whiterussian/packages/asterisk-1.4

For OpenWRT Kamikaze 7.06 on mipsel/brcm (Broadcom and compatibles):
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4

For OpenWRT Kamikaze 7.06 on mips/atheros (Fonera and compatibles):
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4/atheros

For OpenWRT Kamikaze 7.06 on x86:
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4/x86

NB1: The 1.4.x packages are named "asterisk14-*" to allow them to co-exist with the 1.2.x packages, *BUT* the 1.4 packages _do_ use the same installation directories so installing them next to 1.2 must be done with a different "-d" flag to "ipkg install".
NB2: For the Kamikaze releases based on kernel 2.6 the zaptel/ztdummy kernel module is not yet available thus app_meetme and IAX2 trunking are not yet usable on that platform.

Update: Asterisk core updated to version 1.4.9; added asterisk-addons 1.4.2 zaptel-libtonezone updated to version 1.4.4.
asterisk14-addons includes backported-from-trunk chan_mobile (svn 384)
asterisk14-app-fax package is included, including app_rxfax and app_txfax.
asterisk14-chan-gtalk is included, with stability fixes, providing GTalk support for Asterisk.
(obsolete) Building from source
You can build Asterisk 1.4.9 and addons for OpenWRT yourself, together with all supported modules, using the buildroot environment provided by the OpenWRT team, called the SDK. The script for doing so (download) :





do_patch() {
wget ${URL}/${PATCH}
patch -p0 < ${PATCH}

mkdir ${DIR} && cd ${DIR}
wget http://downloads.openwrt.org/whiterussian/newest/${SDK}.tar.bz2
tar jxvf ${SDK}.tar.bz2
svn co https://svn.openwrt.org/openwrt/packages
do_patch zaptel ${ZAPTEL}
do_patch iksemel ${IKSEMEL}
do_patch asterisk ${ASTERISK}
do_patch asterisk-addons ${ADDONS}
cd ${SDK}/package && ln -s ../../packages/*/* . && cd ..
make package/asterisk14-compile V=99
make package/asterisk14-addons-compile V=99

After finishing successfully, packages can be found in:
(obsolete) Asterisk 1.2.16
NB: these packages are obsoleted by the 1.4.x ones; people are encouraged to switch to 1.4.x as OpenWRT support for 1.2.x will probably end in the near future. These packages can be obtained through a package repository by adding a new line to your /etc/ipkg.conf:

src asterisk http://members.home.nl/hans.zandbelt/openwrt/whiterussian/packages
Installing dummy Zaptel timer support (ztdummy)
This enables MeetMe audio tele-conferencing bridge support and IAX2 trunking.
It is only useful on routers with UHCI USB features such as the Asus WL-500GdL.

1. Install kmod-zaptel
2. Install kmod-usb-uhci-iv
3. Install asterisk-app-meetme
4. Remove the alternate USB kernel module (if loaded): rmmod uhci
5. Insert the required USB module required for Zaptel timer support: insmod ./usb-uhci.o
6. Insert the Zaptel module: insmod ./zaptel.o
7. Insert the dummy USB Zaptel timer module: insmod ./ztdumy.o
8. Install the Asterisk core package (or *-mini ipk for iax2-only support) from the list above.
9. For tele-conferencing: configure meetme.conf and extensions.conf and make sure the app_meetme.so is loaded.
10. For trunking: configure iax.conf.

Have fun with tele-conferencing and/or IAX2 trunking...
Here's a package with Dutch (male) voices for Asterisk 1.x, created by Jeroen Naeff from the samples provided by Born Digital.
# asterisk-dutchmale-sounds_0.1_mipsel.ipk
Preferably send your comments to the OpenWRT forum in one of the topics on Asterisk in the section for Community Releases.

No comments: