|
|
The IP04 is a 4 port IP-PBX that runs Asterisk and uClinux on a
powerful embedded Blackfin processor. To build an Asterisk IP-PBX you
normally need a x86 PC plus a PCI card for the analog ports. With the
IP04 you get all of that functionality in a tiny, low cost, low power,
silent box. Assembled and tested IP04s are available for around $450
from the Free Telephony Project Store.
Unlike many other embedded processors, the Blackfin has enough DSP
horsepower to handle multiple channels of echo cancellation and speech
compression. This means that the IP04 is a complete IP-PBX with 4
analog ports. No PC required!
The 4 analog ports can be configured any way you like, using single
port FXS/FXO modules. The IP04 auto-detects the module type when it
powers up and helpful LEDs indicate what flavour (FXS or FXO) each
port is.
Using the IP04 is similar to any other Asterisk box. You can telnet
in, modify config files, or even use the new Asterisk GUI. Setting up
the IP04 is easier than a x86 PC based Asterisk system: you don't need
to install Asterisk, or even Linux. The IP04 comes pre-loaded with
Asterisk and uClinux. Plug it in and in a few seconds you can make
calls. With the IP04 you get dial tone out of the box!
The IP04 is derived from the 4fx and
BlackfinOne V2. You can
read all about the development of the IP04 on my Building an Embedded
Asterisk PBX series of blog posts. Part 3 and
Part 4 deal with the IP04. Part 1
and Part 2 discuss the development of FXS/FXO
hardware.
IP04 Versions
There are (AFAIK) three versions of the IP04:
-
The Prototype IP04 (picture at top of page), which was the original
IP04 design. The design files for this version are available from the
SVN repository below. This is an IP04 that you can assemble yourself,
some parts are available from the Store.
-
The Atcom Production IP04, which has a different PCB layout (but
similar schematic) to the prototype IP04. This is the IP04 that Atcom
and I are selling in fully assembled and tested form. You can buy an
Atcom IP04 from the Free Telephony Project Store.
-
The uC-pbx, which
is fairly close to the Prototype IP04 design. Please contact
Li Yuqian for more information.
Distribution
The production IP04s are being manufactured by the good people at
Atcom. If you would like to distribute the
IP04, please contact Edwin Chen, Technical
Sales Manager at Atcom.
For Australian distribution and sales please contact
David Rowe.
Prototype IP04 Specifications
(Please note, specs for the production IP04 may vary)
-
2 layer PCB measuring 200mm by 100mm
-
BF532 400MHz
-
64M SD-RAM running at 133MHz
-
256M NAND Flash for Asterisk Application, prompt and voicemail
storage
-
0-4 FXS/FXO modules (fxsmod and fxomod designs)
-
Optional stackable with 4fx cards to get 8 or even 12 analog ports
-
Optional MMC card for removable flash storage
-
High Performance echo cancellation using Oslec
(Open source line echo canceller)
-
Astfin Blackfin uClinux-Asterisk 1.4 software build
-
Current consumption (2 FXS 2 FXO configuration) around 300mA @
15VDC (4.5W).
Status
-
Several hundred IP04s have been built and are in use all around the
world. The hardware is very stable.
-
The software is stable but not feature complete, for example certain
functions like the GUI need some more work.
-
MMC card support is still experimental and not enabled on the IP04s
shipped from the Free Telephony Project Store. However with 256 MByte
of internal flash this is not a practical problem for most applications.
See the getting started notes for more information.
-
The IP04 has been carefully tested. A series of automated stability
and load tests have been performed, for example (i) 4 analog and 2 IAX
calls for 4 days, about 32,000 calls and (ii) maximum anticipated load
of 4 analog ports, 8 simultaneous calls (4 SIP-analog plus four
SIP-IAX2 VOIP, running 8 GSM codecs). For more information please see
the IP04 Test
Plan.
-
The IP08 is currently being
prototyped. The IP08 has 8 analog ports, dual Ethernet and USB, in
the same form factor as the IP04. Estimated production release in Q2
2008.
Capabilities
Many people have asked "how many calls can the IP04 handle and what
codecs does it support?". The answer is "it depends" - for example
the type of call (VOIP/analog), codec etc. Analog calls use the most
MIPs due to the CPU load of echo canceller. IAX calls tend to use
more CPU than SIP as there is more packing and unpacking of data.
A-law and mulaw calls use less MIPs that GSM/g729.
Calls that use the IP04 to terminate or transcode RTP media (like
playing an IVR or IAX2) use more MIPs than calls that just use the
IP04 to handling call switching (e.g. a SIP extension to SIP extension
call where RTP passes directly between the phones).
-
The IP04 comes with ulaw/alaw/gsm/Speex codecs. All the usual
Asterisk codecs are supported with the exception of iLibc which
requires floating point (the Blackfin has no FPU). An optimised g729
library is available free from Analog Devices SVN, however there is at
present no licensing scheme.
-
The standard IP04 load test is 4 analog calls and 8 SIP calls
(running GSM codecs). This simulates full load of the IP04 in a
typical office environment of 4 outside FXO lines and 8 SIP phones.
-
Kelvin Chua has tested up to 72 ulaw calls with an IP04 using SIPp.
The IP04 was terminating RTP with an IVR prompt.
-
With Asterisk running SIP calls (and no analog hardware), 34 ulaw,
16 g729, and 8 Speex (16 kbit/s mode) calls were possible at a 2.0
loadav. Care was taken to ensure that all calls were full duplex
(when terminating a call with an IVR prompt the RTP traffic is usually
one way).
Resources
-
If you have any questions, bug reports, or suggested improvements,
please post to the
Blackfin Asterisk forum.
-
There is a list of bugs and suggested improvements on the
Blackfin
Asterisk Tracker.
-
The
IP04
Wiki for tips on configuration and set up.
-
IP04 SVN for
schematics, PCB design, BOM spreadsheet, test plan, errata and more.
-
Astfin.
Astfin makes building the IP04 software very simple, just
5
steps to get a bootable uImage containing uClinux and Asterisk for
the Blackfin.
-
BAPS is an experimental build system for the
IP04/IP08 based on the package paradigm (like apt-get or rpms). BAPS
is being used for the IP08 prototypes and allows users to easily
upgrade software from the command line, avoiding the need to compile
an entire uImage.
-
NAND Flash and u-boot
-
NAND
Flash and uClinux
-
There are now quite a few Asterisk "Appliance" type products that
have been announced. Here is a
survey of Asterisk Appliance
products.
Credits
I stand on the shoulders of giants. Thanks to all the people who have
contributed and whose work I have built on. In no particular order:
the Astfin & BlackfinOne teams, uClinux,
Analog Devices Blackfin team, the
Asterisk community, and the guys at Atcom. Sorry if I forgot anybody.
Getting Started with your IP04
These notes apply to the Production (Atcom) IP04s from the Free
Telephony Project Store. If your IP04 came directly from
Atcom or another manufacturer the configuration may be slightly
different.
Astfin and BAPs
Until April 2008, most IP04s ran Astfin firmware. From April 2008
IP04s shipped from the Free Telephony Project Store and Atcom will run
BAPS. This means some slight differences in
configuration, which are explained below.
Getting Started Notes
-
uClinux and Asterisk are pre-installed. Just apply power and in
about 90 seconds the IP04 should be ready for use. If you have FXS
modules installed, try connecting an analog phone to the ports until
you hear dial tone. Try dialling 2008 to hear a prompt or 2020 to
record and playback your own voice.
-
The Tel1-Tel4 LEDs on the front panel indicate what sort of modules
(FXS or FXO) you have installed. Red = FXO, Green = FXS. For example
the IP04 below has Tel1 & Tel2 set up as FXS and Tel3 and Tel4 as FXO.
-
The Tel1-Tel4 ports are configured as extensions 6001, 6002, 6003, 6004.
For example if you have Tel3 & Tel4 configured as FXS, dialling
6004 on Tel-3 will make Tel-4 ring.
-
When you boot the IP04, the default IP will be 192.168.1.30. You
can telnet to the IP04:
[david@bunny ~]$ telnet 192.168.1.30
Trying 192.168.1.30...
Connected to 192.168.1.30.
Escape character is '^]'.
BusyBox v1.4.1 (2007-06-01 01:29:28 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:~> asterisk -r
Asterisk 1.4.2, Copyright (C) 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.2 currently running on af1 (pid = 71)
No entry for terminal type "dumb";
using dumb terminal settings.
af1*CLI>
|
In the default configuration no username or password is required
for telnet. |
-
(Astfin) To change the default network parameters (plus a bunch of other
config options), edit the file /etc/asterisk/rc.conf then reboot. If
the network is not coming up you may need to use the RS232 console
(see below).
-
(Astfin) To switch on DHCP enable the DHCP variable in /etc/asterisk/rc.conf.
For reliable DHCP client operation I suggest the following code in /etc/rc:
<snip>
# Check DHCPD is enabled
if [ "$DHCPD" = "yes" ]
then
rm -f /var/run/dhcpcd*
dhcpcd &
sleep 5
else
<snip>
-
(Astfin) To set a static ip, use vi to change these two lines in /etc/asterisk/rc.conf:
DHCPD=no
IPADDRESS="192.168.1.31"
and this line in in /etc/rc:
# Check DHCPD is enabled
if [ "$DHCPD" = "yes" ]
-
(BAPS) To change the static IP settings edit /etc/init.d/network-static
-
(BAPS) To enable dhcp:
root~> /etc/init.d/network-static disable
root~> /etc/init.d/network enable
root~> reboot
-
rcp is the easiest way to transfer files to and from the IP04:
[david@bunny ~]$ rcp root@192.168.1.30:/etc/asterisk/extensions.conf .
-
The IP04 also has a built in ftp server, the username/password is
root/uClinux.
-
wget also works well (run from the IP04 command line).
-
All the usual Asterisk config files are present in /etc/asterisk,
edit using vi.
-
There is plenty of NAND flash (256 MBytes) to store any custom
prompts, programs or voicemail. Any changes to files are persistent,
it appears that using the yaffs file system you don't even need to
"shutdown" or "halt" when powering down - the changes are written to
flash straight away.
-
There is a small reset button next to the power connector. This
is a hardware reset, it does not reset software defaults (see below
for software defaults).
-
To use the RS232 console remove the top cover from the IP04 and
install the small RS232 daughter board on J8 as below. Remove the
small shorting link first. Use 115,000 baud, 8 data bits, no parity.
Use a direct RS232 cable, as the IP04 swaps the RS232 tx/rx lines. A
null-modem cable is not required. For RS232 work I use minicom on a
Linux host machine, here is my minicom
configuration file. When you are finished with the console be sure
to replace the shorting link, otherwise the IP04 will not boot.
-
(Astfin) Asterisk has a web-based GUI, just point your browser at the IP04.
I haven't used this much as I prefer conf files, but would appreciate
any feedback (posted to the forum, please). The username/password is
admin/mysecret.
-
(BAPS) The GUI is not installed by default. To install:
root:~> ipkg update
root:~> ipkg install asterisk-gui
-
If your GUI doesn't work you may have hit a bug involving some
missing files in the latest firmware. Telnet into your IP04 and check
if the directory /var/lib/asterisk/static-http/config exists:
root:~> cd /var/lib/asterisk/static-http
root:/var/lib/asterisk/static-http> ls
index.html config
If the config directory doesn't exists, use this procedure to install it:
root:~> root:/var/lib/asterisk/static-http> wget
http://www.rowetel.com/ucasterisk/downloads/ip04/config.tgz
root:/var/lib/asterisk/static-http> gunzip config.tgz
root:/var/lib/asterisk/static-http> tar xf config.tar
root:/var/lib/asterisk/static-http> rm config.tar
root:/var/lib/asterisk/static-http> ls
index.html config
-
The IP04's currently shipping from the Free Telephony Project Store
don't support the MMC card. MMC card support requires a firmware
(CPLD and uImage) upgrade which is still experimental. Alex Tao has
written
instructions
for IP04 MMC support.
-
To change the root password, on a x86 Linux box:
perl -e 'print "crypt("yourpassword", "yoursalt")","\n"'
to generate the password and copy/paste in /etc/passwd on your IP04.
Thanks to Li for suggesting this in the Blackfin Asterisk Forum.
-
(Astfin) To restore the default Asterisk configuration files on your IP04
root:~> rm -f /etc/asterisk/.unpacked
then reboot your IP04. Thanks Mark T for this one.
-
(BAPS) To restore the default Asterisk configuration files on your IP04
root:~> ipkg update
root:~> ipkg remove asterisk
root:~> ipkg install asterisk
root:~> reboot
If you have any questions, bug reports, or suggested improvements,
please post to the
Blackfin
Asterisk forum, so the IP04 community can share the answers.
|