Category Archives: Uncategorized

Asterisk is Great

I recently wrote about Asterisk, the Free Software PBX. Well, I’ve completed the first stage of installation in our home and must say this is the most fun piece of technology I’ve played with since MythTV :-)

Here’s what we now have in our home:

  • Local calls can be dialed like usual. By default, they will use a landline (aka PSTN line). If the line is in use, they’ll be routed over the Internet at a cost of 1.2 cents per minute.
  • Long-distance calls can be dialed like usual. By default, they’ll use an Internet VOIP provider at a cost of 1.2 cents per minute. If the Internet or the provider is down, they’ll fall back to our landline, at the usual cost of 7 cents per minute.
  • Toll-free calls can be dialed like usual, too. By default, they’ll route over the Internet for free using FWD, but if that’s down, they’ll fall back to the landline.
  • Almost every phone in the house will have its own unique extension number. These all start with “11” so they don’t conflict with any public telephone number. So, no more running up or down two flights of stairs to ask a question.
  • The IP phones in the house can also act as intercoms; when a special extension is dialed, they will ring once, then automatically go into speakerphone mode.
  • We have call forwarding, 3-way calling, etc. without having to pay the usual high telco rates for these services.
  • Call transfer is nice if one of us answers the phone, but the person wants to talk to the other person, who is in a different room. (And callers get to hear some nice music on hold while they’re being transferred.)
  • To a regular caller, it sounds like we have an answering machine if we don’t answer. In reality, they are leaving a message on Asterisk’s voicemail system. The system e-mails us the audio message as an attachment as soon as the person is done recording the message. Also, an indicator lights up on every digital phone in the house. We can check the voicemail from any phone, in our house or not, using a passcode — or by listening to the attachment.
  • By physically taking our IP phone to any broadband Ethernet port, we can make and receive calls on it almost like usual. Yes, if we take the phone to Indiana, and someone calls our Kanas number, phones in both Kansas and Indiana would ring.
  • Emergency calls are routed over the landline like usual. In the future, I will set it up so that dialing 911 automatically disconnects anybody that’s using the landline, so the emergency services can be contacted immediately.
  • All analog phones are automatically connected to the normal landline in the event of a power or network failure.
  • “Ring all phones” feature that essentially simulates an incoming call
  • Caller ID everywhere, both for internal extensions and for calls coming in from outside
  • All sorts of other fun stuff I haven’t even tried yet…

Read on for a description of how it all works, and some hardware and vendor reviews…

At the center of it all is Asterisk. Asterisk is responsible for receiving and routing all calls, the fallback plans, etc. It’s a very powerful and amazing piece of software.

Our digital phones are Sipura SPA-841 models. These are amazing phones, usually selling at $85. The Voxilla Store has the best deal with free shipping, plus excellent service. The SPA-841 comes with one Ethernet port and a modern-looking digital interface. It supports all the bells & whistles, such as 2 lines, call forwarding, call history, personal directories, speakerphones, distinctive ring tones, etc. It’s also web-configurable, or can be configured via TFTP and XML files (very very nice if you have more than one!) The breadth of the configuration of these phon is just amazing.

Our analog telephone adapter (ATA) is a Sipura SPA-3000 (also with a good deal at Voxilla). This nifty little gadget sells for about $100 and has one ethernet port and two analog telephone ports. One of the analog phone ports is to be connected to the landline (PSTN) connection from your phone company. The other port provides line voltage, dialtone, ring voltage, etc. to phones in your house — that is, it simulates the phone company to them. So, your analog phones can dial VOIP numbers — and get the benefit of call routing over the Internet and the like — all without having to invest in more-expensive digital phones. We are keeping our cordless analog phone (cordless IP phones are not very good yet), and a couple in infrequently-used by nice-to-have locations.

The PSTN connection lets you use VOIP to dial out. In our case, Asterisk is the one doing the dialing out, so the PSTN connection is controlled completely by Asterisk.

One super-nice feature of the SPA-3000 is that it has an option to bridge the two ports together in the event of power loss or if it loses contact with the Asterisk server. This is great so your analog phones keep working even in an emergency situation. Some people might disable this, though, because of the shock of having long distance suddenly cost 6 times more than usual :-)

The next stage in the project is to run some network cabling in the house so we can deploy an additional digital phone and relocate the server and ATA equipment to a more convenient location. Cat5ECableGuy has some great deals on jacks and cable. Service seems to be good, too; will let you know when my order arrives.

I also have a Sipura SPA-1001 (single-line ATA for use with analog phones) that I’ll be deploying once the cabling has arrived. That will give the kitchen phone its own extension separate from all the others.

I have had a few hitches along the way. I first tried a cheapo Wildcat X100p clone from ebay. I found it to be unstable and cause asterisk crashes on my Alpha. The SPA-3000 is working much better.

The other hitch relates to disconnect supervision, which my telco doesn’t provide. That means there’s no good way for a machine to determine that the remote party has hung up the line. The SPA-3000 for some reason can’t detect the off-hook warning tone either, but I have some workarounds going.

I also found that multiple simultaneous uploads on my DSL link would flood the transmit queue and cause latency to be unacceptably high for VOIP to work. After some tweaking with the Linux traffic shaper and ToS bits in Asterisk, I think I’ve got that nicely worked out.

I purchased some of my early equipment from Telephonyware. Decent prices, but they appear to have lied about the shipping date, and didn’t return my e-mail asking about it. VOIPSupply had much faster shipping, but also really charges a lot for shipping & handling. Voxilla has good rates and fast service, so I’m using them now.

That’s a lot for one post… more to come next week.

Today’s Reading

Two articles from Slashdot on patent reform. Microsoft seems to be one of the guud guys here, ironically enough. First, there’s an article about their general counsel lecturing about patent reform, suggesting steps to make it easier to comment on patent submissions and more difficult to obtain win about a patent infringement in court. An InfoWorld story goes on about similar things.

Next, a story about women leaving IT. Apparently, women have been leaving the sector quite rapidly. The story points to quite a few potential reasons. Though they all would have seemed to be equally valid 5 years ago, and don’t really explain why things are worse now.

Here’s a Guardian article looking back on the tech bubble burst. 5 years ago today marked the highpoint on the Nasdaq.

GHC 6.4 (Haskell compiler) was released yesterday. WOOHOO! More details in my post on The Haskell Sequence.

Finally, two Asterisk-related articles from O’Reilly: part 1 and part 2.

More on Asterisk

Since I wrote about Asterisk, the Free Software PBX, a few days ago, I’ve decided to start tinkering with it. In a word, Asterisk is awesome. It has lots of features, and is free, too.

Asterisk lets you manage your phones. You can set up extensions, letting phones call each other. You can also set up routes out — connections to other offices, to the public telephone network (PSTN), or to other VOIP users. You can hook to the PSTN with either a $10 hardware device, or by using one of the many cheap VOIP providers, or whatever. And you can set up automatic call routing rules — for instance, you might route local calls over your local PSTN link, but fall back to a VOIP provider if your local link is in use.

Here are some links for Asterisk information:

  • The Asterisk wiki, an excellent resource
  • VOIP phones, hardware phones that take an Ethernet cable, or software phonse that run on a PC
  • VOIP service providers, listing some free IP-to-IP VOIP providers, as well as VOIP-to-PSTN and PSTN-to-VOIP companies.
    • FreeWorld Dialup is an excellent free VOIP-to-VOIP provider. They also have peering with many other VOIP networks; you can, for instance, call Vonage customers for free via FWD. FWD also has a free link to the PSTN for calling toll-free numbers in several countries.
    • VoipJet lets you call anywhere in the USA for 1.3 cents per minute, and LiveVOIP does the same for 1.2 cents per minute. With LiveVOIP, you can also purchase a phone number for incoming calls for $4 to $8 per month.
    • IPkall gives you a free local number in Washington state that forwards calls to your FWD account. There are some other companies that do similar things, too. Many also have very low rates on incoming toll-free calls.
  • Asterisk tips and tricks is a great page
  • Asterisk Handbook Project
  • Asterisk Documentation Project

Today’s Reading

Two neat stories from Slashdot today:

First, an essay about fragmenting standards in the Linux world. I’m not certain yet if I think he’s on the right track, but an interesting read nonetheless.

Then, and this is really cool, an article about building your own PBX using old hardware for under $20. Basically, this can give you things like voicemail, multiple phone lines in your house, etc. Fascinating read, and I’m probably going to have to try it out :-) They are using the Asterisk project.

Next, I decided I would periodically report on the, ahem, exacting quality standards of what we see in some of the mainstream news outlets.

Today, CNN leads with Martha Stewart saying “it’s really wonderful to be back”, a story about how Jackson needed a bathroom break at his trial, the White House denying it targeted the Italian hostage, and how Clinton gave up his bed on a plane to George H. W. Bush. Real news factor: low.

MSNBC fares little better with some Pope watching, “Jackson’s private eye goes public” (whatever that means), the Jackson thing again (though sadly lacking in bathroom watching), and somebody surviving a drop from an overpass.

FOX leads off with “Boeing’s new boss talks scandal!”, a story on the “Jacko” defense, and after reading those two, I was too fed up to read any farther.

NPR leads off with “Syria vows pullback, large Hezbollah protests predicted”, a story about the new U.N. envoy, the Italian reaction to the hostage shooting, and Sony’s new CEO. Quite a bit farther down, I see a link to “‘Bring Out Your Dead’: Monty Python hits Broadway.” Hmm.

Running a Homeless Non-Profit

Software in the Public Interest, Inc. (SPI) is a fairly unique organization. It was originally created to be the legal entity that holds Debian‘s assets and can receive donations for it, though today it also has several other member projects. SPI is New York corporation, and a 501(c)3 not-for-profit.

I call it “homeless” because, like Debian, SPI has no physical home. There is no SPI office. Discussions about SPI are held online. Even the SPI board meetings and annual meetings are held online. This is a confusing concept to many people, but it makes perfect sense to us geeks. We have board members from the USA, Canada, UK, and Germany, at least. SPI maintains PO boxes for receiving mail, and that’s about as close as it gets to a real physical presence.

I’ve been on SPI’s board of directors for the last two years, and have been the SPI president since July. Sometimes this is a surreal experience.

Over its 8-year lifetime, SPI has had quite a few problems. A few years ago, SPI’s board had trouble meeting because so many members didn’t bother showing up that quorum wasn’t met. At one point, SPI was without both a president and a treasurer because both of them seemed to suddenly lose all interest in SPI, or returning e-mails. As you might imagine, most of my time on the board has been occupied, in one way or another, with trying to clean up things from the past while still keeping the present held together.

One main cause of this, and a problem still today, is lack of interest. Most of Debian’s developers are content to just ignore SPI, prefering to code instead of worry about getting stuff from the PO box to the bank, preparing tax returns, and all the other annoying things that go along with running a non-profit. So we don’t have many volunteers to do these things. That means the people that do volunteer burn out. And, to date, there hasn’t been enough support to obtain paid help.

I’m sure this isn’t a problem unique to SPI. I suspect that many non-profit organizations have had trouble finding people to handle all the details of running the organization. Our church, for instance, sometimes has trouble finding enough people to work on maintaining the building.

I wonder if being “homeless” hurts us, because it’s easier to give up on a task when there’s nobody looking at you in the face wondering why it’s not done.

So, I’d like to end with two questions:

How do you think SPI could get more people interested in helping out? Or do you think that we have a different problem entirely?

Today’s Reading

Federal scientists told to alter findings (LA Times, via Slashdot)

SCO slammed for lack of evidence… Judge calls SCO’s arguments “puzzling”. Juicy quote: “There’s very little that can be more disastrous to your case than an angry federal judge.”

The Grand Experiment — a blog based solely on a high-paying Google keyword: asbestos. Apparently people are paying as high as $100 for hits on “asbestos”. I wonder if mentioning “asbestos” many times in this story will get me any hot asbestos clicks. Probably not. The adwords on here have been more amusing than anything.