(redirected from Unslung.Asterisk)
The Open Source VoIP PBX System
Download the O'Reilly book "Asterisk: The Future of Telephony" http://astbook.asteriskdocs.org/(approve sites)
From the root prompt, type:
Optionally install the additional sound package:
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
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
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:
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:
You can get a CLI console to an already-running daemon by typing:
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 <command>".
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
There is a simple Asterisk GUI for Unslung (Optware): http://www.fivn.com/products/asterisk.html
How to connect a standard phone and to a PSTN phone line
An Analog Telephone Adaper (ATA) like Sipura SPA-3000 can be used to connect a standard analog phone and to connect Asterisk to a PSTN phone line.
How to use a Gizmo Project account with asterisk
How to configure music on hold
Playing MP3 on the slug will not work. You will have to convert your MP3 files to native format GSM and/or ULAW (using for example the free sound conversion software from http://www.nch.com.au/switch ) and configure asterisk to use the native format.
Your musiconhold.conf file should look like this:
To transcode to ULAW (for example) using the 'switch' sound conversion software:
How to configure the voicemail system to send messages by email
I was not able to make Asterisk to work with the email client that came with the Linksys firmware (the voicemail message showed up appended to the text, instead of being attached as .wav file). I've installed esmtp which has a sendmail compatible syntax:
> ipkg install esmtp
Then, I created /opt/etc/esmtprc where I configured esmtp to use my ISP outgoing email server:
In /opt/etc/asterisk/voicemail.conf I configured the following:
400 => 1234,John Smith,email@example.com
Useful dialplan macros
Here are some useful asterisk dialplan macros I create based on examples posted on www.voip-info.org:
Here are the recipes for some useful features:
Provisioning a Cisco 79XX series IP phone
The TFTP and HTML server capability of the NSLU2 can be used in conjunction with Asterisk to provision a Cisco 79XX series IP phone. For further information see: http://www.ambor.com/public/home_pabx/home_pabx.html
How to connect a YeaLink USB phone
This article describes how to connect and use a YeaLink USB-P1K handset with the NSLU2 as a standalone SIP VoIP phone.
How to make SIP work if NAT firewall is involved
UDP 5060 for SIP (signalling)
Make calls to/from IM clients
Call your sip address from your favorite IM client
Now thanks to gtalk2voip you can call your SIP address from your favorite IM client (yahoo messenger, windows live messenger, gtalk, or gizmoproject):
Call your favorite IM client from asterisk
Here is an example of how to setup asterisk to be able to call yahoo buddies:
[yahoo-proxy-out] type=peer host=yahoo.com outboundproxy=yahoo.gtalk2voip.com fromuser=YourYahooID fromdomain=yahoo.com nat=yes canreinvite=no disallow=all allow=ulaw allow=gsm dtmfmode=rfc2833
exten => ExtensionForYahooBuddy,1,Dial(SIP/YahooBuddyID@yahoo-proxy-out,120,T)
Here is an example of how to use asterisk 1.4 with Google Talk.
Starting with asterisk14_1.4.13-2 app_notify is available (it can send notifications over the network to announce the callers name and telephone number to a desktop PC). For how to configure, check out [http://www.mezzo.net/asterisk/app_notify.html].
For more information on using Asterisk on NSLU2 join the nslu2-asterisk group:
PlugComputers - Asterisk and FreePBX
For PlugComputers (Pogoplug V1, V2, Pro, Biz, Seagate Dockstar, Goflex) the instructions previously, actually, work pretty well.
1. You will get errors if you do not initialize pear "pear install DB". Make sure to place "/opt/share/pear" in your php.ini include_path.
Install Asterisk16 and Asterisk16-addons.
mysqladmin -p create asterisk
Follow the prompts and use the values in the previous part of this page (above), remember the file structure of this system is based on /opt.
In "/etc", you need to make links to /opt/etc/asterisk and amportal.conf.
602 root 2344 S /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
You should see if you can load the FreePBX web page.
You can run "asterisk -r" to run cli (Asterisk Command Line Interface). Finally, if you want to install only Asterisk and not FreePBX, it is a lot quicker and fits nicely into a Dockstar (Remember, above, they did it with an NSLU2 with only 32Mb instead of the Dockstar's 128Mb or Pogoplug with 256Mb. FreePBX and Asterisk with all the trimmings is about 94 Mb). If you are a good Google jockey, you can actually search for a script and howto to send mp3 recordings of messages. A final caveat is to make sure your router firewall allows port 5060 to 5080 and port forwarding.
These instructions also works with a Pogoplug Pro with Asterisk 1.8 and FreePBX 2.8. In manager.conf, make sure that enable=yes. There may be symlink errors that can be fixed manually. Use Asterisk 1.8 in place of previous versions. Add-ons are included already. Use ulaw and alaw files from previous version.
view · edit · print · history · Last edited by OddballHero.
Based on work by OddballHero, cdoban, pa, httprollyocomsearchhtmlqxboxoffercomsidweb, Loc Nguyen, osas, Dusan maletic, lImbus, Ian Watt, ambanmba, JimmyFergus, cdban, henry, gda, legioner, buggy, tman, and Dietmar Zlabinger.
Originally by cdoban.
Page last modified on April 15, 2011, at 11:54 PM