Monthly Archives: November 2007

recovery procedure for VoIP PBX

Posted by Julian Dunn on November 12, 2007
Technology / 1 Comment

My VoIP PBX (built on an embedded Linksys NSLU2) blew up tonight with a bad hard disk. Here’s the cheat sheet on how to recover it should it do the same next time.

  • Replace the hard disk and reboot the NSLU2. Since the network settings are stored in flash, it will come up on the old IP even if the hard disk has failed.
  • Format the new hard disk and partition it using fdisk. Swap space is recommended. Format it using mkfs.ext3.
  • Run turnup disk -i /dev/sda1 -t ext3 to move the rootfs to the disk.
  • Reboot NSLU2 and install Optware as follows:

    cd /tmp
    wget http://ipkg.nslu2-linux.org/feeds/optware/slugosbe/cross/unstable/ipkg-opt_0.99.163-9_armeb.ipk
    tar -zxvf /tmp/ipkg-opt_0.99.163-9_armeb.ipk
    rm /tmp/debian-binary
    rm /tmp/control.tar.gz
    tar -ztvf /tmp/data.tar.gz
    cd /
    tar -zxvf /tmp/data.tar.gz
    rm /tmp/data.tar.gz
    cd /opt/etc
    sed -i “s//stable//unstable/” ipkg.conf
    /opt/bin/ipkg update

  • Restore old packages – namely, xinetd, net-snmp, asterisk14, tftp-hpa, esmtp, and all the things that asterisk recommends you install
  • Reconfigure /opt/etc/xinetd.conf to allow connections from the local LAN.
  • Restore data from backup – namely, the contents of /opt/tftpboot and /opt/etc/asterisk
  • Create a startup script for Asterisk because it’s missing in the default package:

    #!/bin/sh

    if [ -z "$1" ] ; then
    case `echo “$0″ | /bin/sed ‘s:^.*/(.*):1:g’` in
    S??*) rc=”start” ;;
    K??*) rc=”stop” ;;
    *) rc=”usage” ;;
    esac
    else
    rc=”$1″
    fi

    ASTERISK_DAEMON=/opt/sbin/asterisk

    case “$rc” in
    start)

    echo -n “Starting asterisk: ”
    $ASTERISK_DAEMON 2>/dev/null &
    echo ok
    ;;
    stop)
    if [ -n "`pidof asterisk`" ] ; then
    echo -n “Stopping asterisk: ”
    $ASTERISK_DAEMON -qrx ‘stop now’
    sleep 1
    echo ok
    fi
    ;;
    restart)
    “$0″ stop
    sleep 1
    “$0″ start
    ;;
    *)
    echo “Usage: $0 (start|stop|restart|usage)”
    ;;
    esac

Nokia N800 Internet Tablet and WPA2-PSK

Posted by Julian Dunn on November 10, 2007
Technology, Telephony / No Comments

A few weeks ago, my friend Brian lent me his Nokia N800 Internet Tablet, because he has gone and purchased an Apple iPhone and no longer needs it. I was hoping to try and use it as a SIP client on my VoIP network, so that I could wander about the house and still make calls. (Unfortunately, the N800 isn’t actually a phone, which makes it somewhat limited in functionality.) For the life of me, though, I can’t get the damn thing to talk WPA2! Continue reading…