Just a quick reference to a series of outstanding Asterisk backgrounders at VoIPPlanet. Once you read this one, go to the bottom to the backrounder index, and you’ll see a slew of articles discussing various permutations of Asterisk and Trixbox. Recommended.
Category Archives: Tech_Friday
Tricks with Trixbox
Trixbox is a pre-configured Asterisk PBX which allows you to create a comprehensive home or business phone system which multiple extensions, and multiple lines. The single TrixBox installation CD creates a Linux server with a web server, database backend, the Asterisk PBX, the Sugar CRM server application, and a set of web-based management tools to manage everything. While all the bits and pieces are available separately, Trixbox automates much of the setup.
Currently, my setup includes two IP phones that look like conventional desk phones. These plug into my local area network. Each has an IP assigned to it. Each is a small web server in itself, as they can be configured using a web browser. I’ve assigned extension 200 to my phone, and 201 to the second desk in the office (John).
When the two IP phones connect to the network and register with the Trixbox, they behave much like regular phone extensions in a corporate office. I can call from one to the other by dialing the three-digit extension. I can put a caller on hold, or I can “park” a call. I can set up a conference call.
Both extensions have voice mail. If an extension receives voice mail, then it flashes its lights to show that there is a message waiting. You can also have the Trixbox automatically forward voice mail to eMail, with the voice message as an attachment. After leaving myself a message from the 201 extension, I received the following message in my Outlook Inbox:
Dear Larry:
Just wanted to let you know you were just left a 0:09 long message (number 1) in mailbox 200 from John, on Wednesday, November 29, 2006 at 06:12:07 PM so you might want to check it when you get a chance. Thanks!
--Asterisk
The voice message was attached as a .WAV file. The names of Larry and John are automatically taken from the assigned names within the Asterisk configuration. I’m assuming you can customize this further…by digging into the configuration.
My outbound telephone connection provider Voicepulse provides a service which completes calls from my PBX to virtually any phone number in the world. Voicepulse accepts calls via the internet and then transfers them to the regular phone system. (see diagram). Voicepulse provides capacity for up to four simultaneous calls. Additional capacity can be added by buying additional “trunks”, which then would allow you to make higher numbers of simultaneous calls. What’s interesting about this is how scalable it is…you don’t need to run wires, or wait for the phone company to come to install additional lines.
Of course, I’m running this with very low volume; since I have a two phones, I can have a maximum of two simultaneous calls. Eventually there will be issues as far as internet bandwidth, and processor capacity. Right now I’m running my Trixbox on an old Dell Optiplex, with a 450Mhz processor.
Unsticking a print job in Windows XP
I never understood why it takes so long to delete a print job that is stuck in a Windows XP print queue. Anyway over at Gizmo Grabowski’s web log, there is a multi-step process to recovering from a stuck print job.
1. On the taskbar, click Start, and then click Run.
2. Enter the following:
net stop spooler (and hit enter)
3. Delete all files in the following folder:
C:\Windows\System32\Spool\Printers
4. Once the spool files are deleted, start the spooler again:
net start spooler
Trixbox/Asterisk PBX
After hours and hours and hours of troubleshooting. I have finally managed to get my Trixbox software PBX to use the Voicepulse service for outbound calling. Kudos to the Voicepulse tech support folks who patiently called back each day for five days. A test call to my mother-in-law sounded fine…better than calls made through the hardware interface to my second land-line.
The problem appears to be the router, a DLink DI-604 router which is admittedly a low cost router, and frankly, one that has worked well for videoconferencing, which is, arguably even more complex than routing voice over IP. But, when I finally eliminated it from the chain of boxes on the way to my cable modem, indeed I was able to connect. So, now, I’m running on an older Linksys BEFSX41. I have the Trixbox in the DMZ of the Linksys router.
So, reviewing: My problem had nothing to do with Comcast. It had nothing to do with the change from Adelphia to Comcast last week. It had nothing to do with Trixbox. It was the router.
Now, there are a couple other outstanding issues. Currently, the hardware connection to the landline doesn’t work any more since my latest reinstall. I think this is a configuration problem. I’m also trying to get inbound service from Voicepulse, but they don’t provide phone numbers in my local calling area.
As part of my troubleshooting, I installed a scratch Asterisk install on a Ubuntu Linux box. Ubuntu is the up and coming distribution these days, and I like it a lot. It is available in various flavors, including a server, LAMP server, Desktop, Educational Desktop version, Education Server version as a terminal server, and several others. Configuring Ubuntu is a snap when the GUI front end is installed, less so when you are mucking about on the command line.
Trixbox uses Cent-Os which is a derivative of Red Hat.
With both distrubutions it helps to be able to use a remote login via SSH. With Ubuntu, I had to install a server to allow this…Cent-Os includes it as part of the base installation. I also installed Webmin, which is a web-based management package, again which allows you to perform the most common system server maintenance from a web browser.
The PBX is nowhere near production yet. I’ve got bits and pieces that work sometimes, but not others, and getting everything to work together seems to be a ways off. I need to set this aside for a few days, and go back to my “day job”.
Tech Friday: Asterisk/Trixbox Update
Tech Friday is our occasional Friday afternoon dweeb-fest, where if we are going to publish actual programming code (rarely), or get technical, it tends to happen on Friday.
Since installing Trixbox, the pre-configured version of Asterisk I’ve been playing with all the features. I’ve got it connected to a single phone line, with a simple automated attendant, “press 1 for Larry, press 2 for Bob” kind of thing and that part seems to work fine. I’ve got two Grandstream Budgettone 101 phones working fine. They have message ready lights, tell the date and time and will show the caller-id on their LCD read-out.
I read the O’Reilly book about Asterisk, which serves as the Asterisk user manual, and it was very helpful in figuring out the intricacies of trunks, routes, and extensions, and how these all fit into a dial plan. But now I’ve hit the wall, and am trying to figure out two show-stoppers:
Hanging up the line
Sometimes the hardware phone line doesn’t “hang up” after a call. Example: Somebody calls through the landline, leaves a voice mail and then hangs up. There are times when the hardware card doesn’t hangup. Searching through through the archives, I found several mentions of this, so far with no good solutions. It applies to both the X100T Digium cards, and apparently the T4xxxx cards as well. Supposedly the Sagamore cards are more reliable. But, I’m hesitant to shell out another couple hundred bucks for more cards.
Configuring software “trunks”
As an alternative to hardware trunks, (destinations for calls placed outside your own organization), you can configure either free or (usually) paid-for internet destinations where your call is sent and then connected to other subscribers or to landliness. Ultimately, of course, this is indeed what you want to do…any phone system is useless if you can’t connect to other phones. I first tried Free World Dial-Up a free service that was one of the first available termination services. My box seemed to register with this without problems, but any calls sent out to the destination were unanswered.
So then, I subscribed to VoicePulse using their plan for Asterisk. VP will provision your Asterisk service with four trunks, two for the IAX2 protocol, native to Asterisk, and two SIP trunks. The SIP trunks appear to register, but the IAX2 trunks do not. According to the VoicePulse tech support, I may have problems with closed ports at my router.
You need to have port 5060 open for SIP and/or 4569 UDP open to use IAX2. Using my D-Link DI-604 router I tried several different configurations; I put the Asterisk machine in the DMZ, which means that is should be exposed to anything coming to the router, and I forwarded specific ports to the Asterisk box. No cigar.
I then checked the availability of the ports using Steve Gibson’s Shields-Up. These show both ports as “closed”. Uh oh. It may be related to the router or possibly something else. However, if they have been closed by Comcast (our new owner who has taken over from Adelphia Cable) then I may be SOL.
Tech Friday: Working with Bar Codes
I’m working with an ID Automation SC5USB bar-code scanner which a client has asked to use for an inventory program. I found ID Automation on the web, and ordered their plain vanilla bar code scanner for about $150.00. They sell everything necessary for bar coding, including the printers, the software and the scanners.
To a computer, the bar-code scanner “looks” like a keyboard. I plugged it into my laptop, and it was instantly recognized, with no software required.
I opened up Notepad on the computer, and scanned the bar code on a CD jewel case that I had lying around, and shazzam! the equivalent set of numbers for the bar code were “typed” into NotePad. A highly gratifying out-of-the-box experience.
The scanner can be further “programmed” by scanning a series of bar codes contained in the instruction manual. I think my next step is going to be to create some bar code labels from my database program, and see if those can be accurately scanned.
It doesn’t matter which direction you allow the reader to read the bar code, it can read up or down.
There is a nice introduction to bar codes on wikepedia.
Here is another barcode faq.
Tech Friday – Installing the Asterisk PBX system
New phone system day.
I spent Friday and much of Saturday installing the latest and greatest Asterisk PBX system using TrixBox, a pre-configured version of Asterisk which comes with the underlying Linux operating system already in place. On a single downloadable CD, you get:
- Cent-OS – The open source version of A Major commercial Linux Distribution
- Apache web server
- Asterisk – the open source PBX
- freePBX – a web browser based interface for Asterisk configuration and management
- mySQL – which is the back-end database used by freePBX
- The SugarCRM – an open source Customer Relationship Manager which integrates with Asterisk
Rather than setting all this stuff up yourself, the TrixBox setup scripts do it automatically, which, in my case, would save hours if not days of futzing around. In addition, if you have existing Digium hardware (i.e. Zaptel) for connecting analog phones or connecting to a regular phone line the setup scripts will configure those cards as well.
So, you could consider the TrixBox implementation a superset of Asterisk.
But wait there’s more!
There is even a super-set of Trixbox, which installs Trixbox on a virtual machine within Windows. This is available from Nerd Vittles. There are also instructions on setting up a slew of extra applications at the Nerd Vittles site, like an extension number to read back the latest weather forecast.
Personally, I prefer setting up the Linux version. Right now my system is working happily on an older 450Mhz 256Kb RAM Dell Optiplex.
There are several set-up tutorials available. One good one is from Sureteq. Looking at these, it is clear that just by setting up a TrixBox, you aren’t out of the woods by any means. What these superb pre-configured systems do, however, is bypass hours of setting up the base system, and get you to the point where you can start working on your dial plan.

