From the root prompt, type:
ipkg install asterisk
Optionally install the additional sound package:
ipkg -force-overwrite install asterisk-sounds
Configuration:
The original sample configuration files are in /opt/etc/asterisk/sample
Take a look at it, consult the voip-info.org Asterisk wiki and create your configuration files in /opt/etc/asterisk
Because the NSLU has only 32MB of RAM I'll recommend you to use a slim configuration (modules.conf).
I have tested it with the second Asterisk slim configuration with the iLBC codec disabled as it requires a floating point unit which isn't present on the IXP420.
You have to configure the path to the various asterisk component in asterisk.conf:
[directories]
astetcdir => /opt/etc/asterisk
astmoddir => /opt/lib/asterisk/modules
astvarlibdir => /opt/var/lib/asterisk
astagidir => /opt/var/lib/asterisk/agi-bin
astspooldir => /opt/var/spool/asterisk
astrundir => /opt/var/run
astlogdir => /opt/var/log/asterisk
Use the voip-info.org Asterisk wiki to find out how to configure:
extensions.conf
iax.conf
sip.conf
voicemail.conf
Performance expectations
The slug's IXP420 should have enough horse power for a home PBX with up to 4 lines, when less CPU intensive codecs (like GSM, G711u, G711a or G726) are used.
The CPU intensive codecs (iLBC, G729, Speex) are not working, but it should be possible to rewrite them using the DSP extended instruction set supported by the IXP4xx. The Intel(R) IXP4XX DSP Software Library contains efficient implementations of all codecs including G729 and other VoIP goodies, but it looks that it cannot be used by asterisk: http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm
Flash installation
To install on a USB flash disk, 128Mb or more is recommended to allow room for voicemail files etc.. See Ext3flash. It has been reported to run on 64Mb.
Asterisk sample configuration for Slug
If you want to try the Asterisk VoIP PBX without going trough the hassle of configuring it from the scratch, you can start with this sample configuration and you will have Asterisk running on the Slug in minutes.
Starting and stopping Asterisk
If you have just installed and configured Asterisk, you can try running it for the first time in console mode with some debugging applied with this command:
/opt/sbin/asterisk -vvvc
Use the command "stop now" to shut down Asterisk from the CLI console.
If run with no arguments, Asterisk is launched as a daemon process:
/opt/sbin/asterisk
You can get a CLI console to an already-running daemon by typing:
/opt/sbin/asterisk -r
on the same computer on which Asterisk is running. More than one console CLI can connect to Asterisk simultaneously.
You can list all the available CLI commands by entering "help", or get information on a particular command by entering "help
To start asterisk at boot time, create a script whose name starts with S[number][number] in /opt/etc/init.d/ that executes asterisk:
/opt/etc/init.d # cat S99asterisk
#!/bin/sh
if [ -f /opt/var/run/asterisk.pid ] ; then
kill `cat /opt/var/run/asterisk.pid`
else
killall asterisk
fi
rm -f /opt/var/run/asterisk.pid
umask 077
/opt/sbin/asterisk
您的部落格文章真棒!!有空我一定會常來逛!! ......................................................................
ReplyDelete