Combine uClinux and Asterisk on a Card
This article describes how to build an embedded Asterisk IP-PBX with four analog (FXO or FXS) ports. Total parts cost is about $500 US, which is competitive with PC/PCI-card based Asterisk solutions. Embedded solutions have the advantage of small size, low power and no moving parts. Figure 1 is a photo of the PBX hardware in action.
The PBX is built around a Blackfin STAMP development card, available off the shelf from Digi-Key for around $225 US. The Blackfin is a powerful DSP chip that runs uClinux. Sitting on top of the Blackfin STAMP card is a daughterboard, which contains interface hardware and the SD card socket. Into the daughterboard plugs FXO or FXS modules, one for each port. In this example, there are two FXS modules on the left and two FXO modules on the right. The color of each LED indicates the type of module inserted.
Here's a brief review of telephony jargon:
FXO ports connect to telephone lines and the exchange.
FXS ports connect to analog telephone handsets.
Figure 2 is a block diagram of the PBX hardware and software components. SIP phones or analog phones can be used for handsets (extensions), which are connected via a LAN to the IP PBX. External calls can be routed over the Internet or through the analog FXO ports. Internal calls between IP phones are routed over the LAN.
The PBX supports most of the features of Asterisk running on an x86 PC. As there is no hard disk, an SD card is used for voice-mail storage.
I have a history of developing computer telephony hardware and have always wanted to build a small embedded box that combines a host processor, DSP, line interface hardware and software. It's an itch I've needed to scratch!
There are some very cool things about the Blackfin processor chip:
The problem with most embedded processors is that they are not very powerful. The Blackfin is a powerful host processor and a DSP—that is, it can run uClinux, Asterisk and codecs like G729 on the same processor at the same time. A standard 500MHz Blackfin runs at around 1,000 DSP-MIPs, which is plenty for codecs, echo cancellation and so forth.
A lot of effort and hardware cost is usually required to interface telephony hardware to the host processor (typically a PC), such as PCI bridge chips. The Blackfin makes it easy, as it has a lot of nice interfaces built in, such as serial ports, SPI and DMA controllers, which are all tightly integrated with the core processor.
The Blackfin chips are good value for the money, ranging from $4.95 US each (BF531 in 10k volume), which makes low-cost embedded telephony hardware a real possibility. This makes it possible to build an IP PBX including analog or E1/T1 line interfaces for far less than comparable PC-PCI card solutions.
Best of all there is an Open Source community that has developed GPL hardware (the family of STAMP boards).
The hardware designs for this project are open—the schematics and PCB layouts are freely available for anyone to download, copy and modify.
The hardware designs have been released under the GPL. Although there is some debate over how defensible the GPL is when applied to hardware, the key ideas are similar to open-source software—the hardware designs are free as in speech, and a community exists that is working together on extending and enhancing the designs. Intellectual Property (IP) is shared for the mutual benefit of all.
The community is loosely organised under the Free Telephony Project, and it consists of private hackers, researchers and several companies who are donating time and other resources to the project. A series of hardware designs are being developed, for example, analog and ISDN interface hardware, and DSP motherboard designs. Significant software development work is also occurring, for example, open echo cancellation software and drivers for the hardware.
The outputs of the project are high-quality, professionally designed telephony hardware, freely available for all. Hardware development is a little different from software—hardware design/test cycles are much longer (for example, a bug might mean a new board needs to be manufactured), and of course, it costs money to make a “copy” of a hardware design. However, the benefits of open hardware are similar to open software:
Peer review is a wonderful way to trap bugs early, leading to big savings in development time.
Re-use of open designs enables innovative products to be developed quickly and with a very small number of bugs.
Discussion and contributions from people all over the world lead to a much higher-quality product than a product developed by one company in its own lab.
Using open hardware, an individual or small company can build sophisticated telephony products without needing large company resources.
The part I like best—you get to work with a community of talented hardware and software people! Some of the best and brightest minds out there seem to migrate naturally to open projects.
Business models are being developed that function within the open-hardware environment. For example, one company sponsoring our efforts has a service model based around low-cost telephony hardware—maintaining ownership of the hardware IP is not a critical part of its business plan.
Open hardware is also great for small, localised businesses and allows developing countries to build their own products locally—overcoming tariff barriers and building a local high-technology industry.
|Where's That Pesky Hidden Word?||Aug 28, 2015|
|A Project to Guarantee Better Security for Open-Source Projects||Aug 27, 2015|
|Concerning Containers' Connections: on Docker Networking||Aug 26, 2015|
|My Network Go-Bag||Aug 24, 2015|
|Doing Astronomy with Python||Aug 19, 2015|
|Build a “Virtual SuperComputer” with Process Virtualization||Aug 18, 2015|
- Concerning Containers' Connections: on Docker Networking
- Problems with Ubuntu's Software Center and How Canonical Plans to Fix Them
- A Project to Guarantee Better Security for Open-Source Projects
- Where's That Pesky Hidden Word?
- Firefox Security Exploit Targets Linux Users and Web Developers
- My Network Go-Bag
- Doing Astronomy with Python
- Three More Lessons
- Build a “Virtual SuperComputer” with Process Virtualization
- diff -u: What's New in Kernel Development