Installing Asterisk on a Linksys WRTG

A while back I wrote a small piece about installing OpenWRT on a Linksys WRTG. This part will be focussed on installing Asterisk on your WRTG.


Base Install
First we’ll be installing “OpenWRT” as our base “OS”. We’ll take the latest WhiteRussian for this. The flashing is done, when the progress indicator seems to hang.


root@OpenWrt:/# cd /tmp/
root@OpenWrt:~# wget
Connecting to[]:80
openwrt-brcm-2.4-squ 100% |***************************************************************************| 1512 KB 00:00 ETA
root@OpenWrt:~# mtd -r write /tmp/openwrt-brcm-2.4-squashfs.trx linux
Unlocking linux …
Writing from /tmp/openwrt-brcm-2.4-squashfs.trx to linux … [w]

Now we’ll connect to our newly installed device, in orde to:

  • Setup a password
  • Update/Upgrade the packages
  • Install Asterisk


kvaes@ubuntu:~$ telnet
Connected to
Escape character is ‘^]’.
=== IMPORTANT ============================
Use ‘passwd’ to set your login password
this will disable telnet and enable SSH

BusyBox v1.00 (2007.01.30-11:42+0000) Built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

_______ ________ __
| |.—–.—–.—–.| | | |.—-.| |_
| – || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
WHITE RUSSIAN (0.9) ——————————-
* 2 oz Vodka Mix the Vodka and Kahlua together
* 1 oz Kahlua over ice, then float the cream or
* 1/2oz cream milk on the top.
root@OpenWrt:/# passwd
Changing password for root
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
Enter new password:
Re-enter new password:
Password changed.
root@OpenWrt:/# ipkg update
Updated list of available packages in /usr/lib/ipkg/lists/whiterussian
Updated list of available packages in /usr/lib/ipkg/lists/non-free
Successfully terminated.
root@OpenWrt:/# ipkg upgrade
Nothing to be done
Successfully terminated.
root@OpenWrt:/# ipkg install asterisk
Installing asterisk (1.0.10-1) to root…
Installing libncurses (5.2-7) to root…
Installing libpthread (0.9.27-1) to root…
Configuring asterisk
Configuring libncurses
Configuring libpthread
Successfully terminated.


  • Configure Asterisk to boot at startup, setup the variable “ENABLE_ASTERISK” to “yes” in “/etc/default/asterisk”.
  • Start up Asterisk (the first time) by issuing the following command:

    asterisk -vvvc

  • Stop by pressing CTRL-C
  • Start up in the background

    root@OpenWrt:/# /etc/init.d/asterisk start

  • Use ‘asterisk -r’ to reconnect

    root@OpenWrt:/# asterisk -r
    Asterisk 1.0.10, Copyright (C) 1999-2004 Digium.
    Written by Mark Spencer
    Connected to Asterisk 1.0.10 currently running on OpenWrt (pid = 642)
    OpenWrt*CLI> quit


  • Removing Asterisk (note: always best to reflash, as some packages aren’t cleaned up properly)

    ipkg remove asterisk

  • The WRT54GL has 4 MB of flash memory, which acts as an hard drive, and 16 MB of RAM
  • By installing Asterisk it will remain less than 1 MB free on the flash.
  • Obtain the list of the installed packages with the command.

    ipkg status | grep -i package

  • It’s advisable to disable the logging of Asterisk, by changing with your favourite text editor the file /etc/asterisk/logger.conf


One thought on “Installing Asterisk on a Linksys WRTG

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.