Combine uClinux and Asterisk on a Card
Expect and Embedded Systems
Expect is an extension to Tcl that lets you automate console sessions. I have found it to be very valuable for automating common steps in embedded systems work.
There are a couple of annoying problems with embedded system development:
On a regular desktop system, you compile code and then run it on the same machine. With an embedded system, you compile it on a host PC and then download to the host system—for example, using FTP or TFTP. This extra step becomes tedious and can lead to silly mistakes, like forgetting to download the latest version.
A lot of embedded development work involves device driver work, which can mean frequent crashes. During the development phase, embedded systems commonly use RAM-based filesystems, so a system crash or reset means you lose everything and must download all your software and config files all over again.
Expect lets you automate all this. For example, here is some Expect code to transfer a file via FTP to the target system:
#!/usr/local/bin/expect -f set tarball [lindex $argv 0] set target [lindex $argv 1] send "ftp $target\r" expect "): " send "root\r" expect "Password:" send "uClinux\r" expect "ftp> " send "cd /var/tmp\r" expect "ftp> " send "put $tarball\r" expect "ftp> " send "quit\r"
It's as easy to write as it looks. In only a few minutes, you can automate common tasks. To run the script, simply type:
$ ./download tarball.tar.gz target
where target is the hostname of the target system.
You even can use it to set up configuration files for you (Asterisk has a million of these):
spawn telnet $target send "cd /var/tmp/ipkg/asterisk\r" expect "> " send "cp -a etc/* /etc\r" expect "> " send "exit\r"
This example starts a Telnet session on the target and copies a bunch of files to /etc.
Expect can save you a lot of time in embedded systems work, closing the distance between embedded and regular desktop development.
The configuration files for Asterisk are the same as for x86 Asterisk. Some useful files are:
/etc/zaptel.conf: Zaptel driver configuration
/etc/asterisk/zapata.conf: more Zaptel configuration.
/etc/asterisk/extensions.conf: sets up dial plan for PBX.
/etc/asterisk/sip.conf: SIP phone configuration.
These files can be edited with vi on the Blackfin, but remember that any configurations will be lost when the board is powered down or reset. Permanent changes can be stored on the SD card.
So, there you have the basic steps for building your own embedded Asterisk PBX. Kits containing the daughterboards and modules are available from the author. We are working on further development—for example, custom Blackfin hardware designed specifically for telephony work and other line interface cards, such as BRI-ISDN. It's an exciting project, with the novel feature of open hardware development.
Resources
Free Telephony Project: www.rowetel.com/ucasterisk/index.html
Blackfin uClinux Site: blackfin.uclinux.org
Building an Embedded Asterisk PBX, Part 1: www.rowetel.com/blog/?p=15
Building an Embedded Asterisk PBX, Part 2: www.rowetel.com/blog/?p=16
Optimizing code for the Blackfin: www.rowetel.com/blog/?p=5
gEDA Open EDA Tools: www.geda.seul.org
David Rowe has 20 years of experience in the development of DSP-based telephony and sat-com hardware/software. David has a wide mix of skills including software, hardware and project management, and a PhD in DSP theory. He has held executive-level positions in the sat-com industry ( www.dspace.com.au) and has built and successfully exited a small business ( www.voicetronix.com). However, he has decided he is better at debugging machines than people, so he currently chooses to hack telephony hardware and software full time.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- Bought photoshop CS5 for developing a website :(
1 hour 34 min ago - What the author describes
3 hours 50 sec ago - Reply to comment | Linux Journal
7 hours 11 min ago - Reply to comment | Linux Journal
7 hours 56 min ago - Didn't read
8 hours 6 min ago - Reply to comment | Linux Journal
8 hours 11 min ago - Poul-Henning Kamp: welcome to
10 hours 21 min ago - This has already been done
10 hours 22 min ago - Reply to comment | Linux Journal
11 hours 8 min ago - Welcome to 1998
11 hours 56 min ago




Comments
blackfin dsp and asterisk?
I didn't think asterisk supported the dsp functions/instructions of blackfin. Which means using blackfin dsp does not help may infact be less efficent as most of the asterisk codec code is geared towards x86 systems.
Embedded open-source telephony
Hugely helpful!
I have been looking everywhere for information on putting together an embedded telephony card to use to build an adjunct telephone box. Although the Asterisk section is overkill for me, I need the FXS/FXO piece, and to be able to do pass-through.
I'll check into the resources you posted as well. Thanks for being so complete -
Dana Good