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.

Revenge of the Smelly Ducting

For about a month now, we’ve had this odd odor in our house. It started out in our laundry room, on the east end of our main floor. Then we noticed it in our bedroom, on the west end of our 2nd floor. Since then, we’ve noticed it in almost every room in the house on different days, but never all over at once. It’s always one or two rooms, but they could be on opposite ends of the house.

I few weeks ago, I realized that the smell was coming from the furnace vents. After some experimentation, I noticed that running the furnace made the smell go away. It got worse when the temperatures were warmer, and the furnace wasn’t running.

So we called out our local heating/plumber guy. After they were out here three times, they did find a couple of problems with our furnace, but no gas leaks or anything that could explain the smell — which, by the way, three different employees couldn’t identify. They even left an air charting unit with us, which ruled out things like carbon dioxide, carbon monoxide, and particulates. It did helpfully notice that there were odors, but didn’t tell us what they were.

So here we are, still smelling this…. smell. It defies categorization. It mystefies experts. Something like a cross between dirty laundry, mold, and a skunk. And yet…. none of those, either. It’s weird.

I’ve taken to closing the vents in our bedroom before turning in for the night if the smell is bad in the evening.

So, I’m appealing to all the bloggers out there for suggestions, short of selling the place and moving to town :-)

Oh, and this is not the first time we’ve had odor problems here. However, the cause the first time was immediately apparent and thus could be eventually dealt with :-)

Memories of Alvin Goerzen

I read this at the memorial service for Alvin Goerzen on March 23, 2005.

For us grandchildren, our earliest memories of Grandpa are of visiting
him at his farm. It was always fun to be there. Family gatherings
were usually there, and he always made delicious food. Peter, James,
and I remember the Zwiebach, borscht, and monster cookies the most.
If any of these things were ever missing from a meal, I’d be
disappointed, even though the food was still great.

The family usually was at Grandpa’s place for Christmas. Grandpa’s
tree had the wheat-weaving ornaments that Grandma Goerzen made. I
don’t remember her, but I always admired those ornaments.

After dinner, we’d have our gift exchange. We’d all get our Christmas
presents, and then after it was all over, Grandpa would get a sly
smile and a little twinkle in his eye. He had “extra” presents for
each of us grandkids every year. No matter how nice the other
presents were, Grandpa’s always seemed extra special.

There were lots of things to do at Grandpa’s place. He kept toy
tractors and vehicles in a closet off his living room. They were
probably 30 years old, but they still worked fine. He also had a
large supply of board games. But the most unique thing was his air
hockey table. It was always great fun to play a game of air hockey
with Grandpa.

We have lots of memories of Grandpa’s yard and farm, too. The yard
was always good for exploring — an old implement here or there, or an
old vehicle. Or maybe some wasps if you look in the wrong place. I
never got stung, but I still remember what places to avoid because of
wasps or bees.

I remember the day I was exploring behind some buildings and found an
old John Deere tractor. I had heard people talk about this tractor,
but I couldn’t remember ever seeing it before. It seemed almost like
a legend to me, and I was quite excited to actually find it.

Grandpa’s creek at the edge of his pasture was good for fishing and
camping. The cows didn’t seem to mind the visitors, and sometimes
came surprisingly close.

Grandpa liked to be a bit of a tease. He’d greet us with “Hi, Skeezix”
when we’d arrive at his place, and he often called me Hanschen.

Grandpa was always interested in our lives. He was at all our school
concerts, recitals, and plays. Last fall, Terah had been sick, and
just as she was getting better, Grandpa was taken to intensive care.
We visited him there, and it was the first time he had seen Terah
since she was sick.

Grandpa looked asleep when we got there. Terah said “hi” and started
to ask him how he was doing. He immediately interrupted her. In the
strongest voice I heard from him in quite awhile, he said, “Terah, how
are you?” Grandpa refused discuss how he was doing until he was
completely sure that Terah was OK. It’s a special feeling to know how
deeply he cared about us.

Grandpa always wanted visitors, even when his illnesses made it
difficult. Terah and I often visited him after church on Sundays. He
wanted to know how we were doing, what happened in church, and might
tell us how he was doing if we asked. He sure wouldn’t say anything
if he thought it might interfere with hearing about us, though.

Sometimes, it was difficult for him to talk, but every time, he made
sure to say thank you for visiting. That made us feel special, too.

Terah remembers another hospital visit. Even though Grandpa looked
asleep, she held his hand and talked to him for awhile. When she said
goodbye, Grandpa managed to open his eyes for a moment and thank her
for visiting.

Last Thursday, Terah visited Grandpa at Bethesda. She called me at
work to tell me that Grandpa didn’t say “thank you”. She didn’t have
to tell me what that meant.

We hurried back to Bethesda that evening. Grandpa was still not doing
well. He said a few words when we got there, but by the end of our
visit, he was too tired to thank us for visiting.

That time, I was the one that said “thank you”. I thanked him for
letting us visit him so many times. He brightened all our lives.

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.

Laid off? Here’s the job for you.

The headline of this BBC story is: Experts to repair ‘faeces fossil’ and it just gets better from there.

Apparently it is a 1000-year-old bit of fossilized Viking excrement. And a University of Bradford student gets to restore it “to its former glory”. She says that she has “never done anything quite like this before”, but added that “it doesn’t smell and it’ certainly not squishy.”

Apparently it’s somewhat of a highlight for schoolchildren. “We’ve even had thank you letters saying ‘thank you for showing us the poo’.”

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.