December 12, 2003

Voice over IP. Or not.

Sounds like VoIP has hit the mainstream--there were stories both on All Things Considered and Marketplace last night and, while NPR isn't quite Fox News (Something I'm very happy about) it's a lot more mainstream than slashdot. VoIP is the next big thing in phone service, or so you'd think.

And, to an extent, it is. I know how the phone system is set up now (My dad worked for AT&T for decades) and it's a marvel in some ways. Phone systems, as they stand now, are circuit-switched networks, that is when you make a call to someone else there's a circuit set up and, for all intents and purposes, you've a single pair of wires running from your phone to the person you're talking to. (Well, sorta. The phone company's been doing call multiplexing on trunk lines between central offices for decades, and on some local lines for quite a while as well. Close enough, though) You make a call and the line between you and your local office's phone switch is energized, and when you dial the switch then connects to an outbound trunk line, which connects to another switch, which connects to another, and another, until you're finally connected to the local office switch of the person you're calling, which then sends its ring signal to the callee's line. When they pick up the circuit's complete and you talk. If, anywhere along the line, there is no free wire between switches you get the fast busy signal.

As you might expect, this is kind of wasteful, and awfully expensive. If there are only, say, 100 circuits on the trunk between your local office and the next office down the line then only 100 people who are connected to that switch can make or receive a non-local call at any one time. If they're all engaged and person 101 tries to make a call... no joy. That leaves the phone company with an interesting dilemma--to avoid those nasty "all circuits are busy" tones you want a lot of lines between offices, but trunk lines are expensive, and come in fixed quantities. (sets of 25 IIRC, but I may not) If all the trunks are full, if you need to run another line, and that's expensive since these things go long distances (tens or hundreds of miles, on poles and under roads).

Even for 'short' hauls it's pricey--you can just imagine how much it costs to dig up a few miles of street in Boston, London, or Paris to run an extra trunk between local offices. Not to mention the costs of the phone switches, which can cost megabucks (literally) when they're full. It's a tradeoff between service and cost. Phone companies, when they're not being run by hyperactive crack monkeys with 10 second attention spams, tend towards massive overkill when they do lay extra cable--while 20 miles of trunk line is expensive, the cable itself is by far the least expensive part of the job, and it's a lot cheaper to lay an extra trunk line when you've got the street ripped up than ripping the street up next year when you need another. (You end up with lots of cable pairs unconnected on either end, but that's fine too, you connect 'em when you need 'em)

So the phone system is, or at least used to be, a really big end-to-end circuit switched network. Run completely non-computerized, back in the day, BTW, which is damned impressive. (Remember the rotary dial days, where the switch on the other end had to count the clicks to figure out what numbers you were dialing) The phone number system, at least under the North American Dialing Plan, facilitated this. (1-A[01]A-EEE-NNNN where A is the area code, E is the exchange, and N is the number within the exchange) If the first number was a 1, it knew you were making a long-distance call and you were switched to the long-distance trunk. If the second digit after that was a 0 or a 1 you were dialing an area code, and you got switched to the real long distance lines. Then came the exchange (the local switch) and then finally the number within the exchange. All electromechanical at one point, with great masses of relays, transistors, and hum. Lots of hum. Damned impressive when you're 6, that's for sure.

Anyway, those days are long-gone--it's all electronic and optical, and AT&T (pre-breakup) was running fiber optic cable between offices and multiplexing calls across them decades ago. Fiber takes up less space under the street (and in the building) and you can run more calls across it than copper, and over the decades they've been stuffing more and more data across each fiber strand. The equipment's also a lot smaller--what used to take a full building full of wire and relays can now fit in a closet somewhere. The phone companies have also been recently moving towards IP as a transport for voice calls over the long-haul links as well, since it means only one set of equipment rather than two sets, and they can better manage their fiber assets. (You don't have to divide the fiber between phone and data)

VoIP to the end user, though... that's new. Other folks have gushed about it, and it is neat from an "oooh, shiny!" geek-magpie standpoint. Heck, we run it at the office, where the phone system's all VoIP. It's not bad, though I could grumble. All I could think about as I was listening to the analysts going on about how keen this stuff was were the ways it could go wrong.

VoIP, for one thing, is a lot less reliable in emergencies than POTS. The phone system as it stands now is self-powered--each office has a (potentially massive) battery room and generator setup with fuel to power the phones for a week or more if the power goes out. (Which has happened around here in New England, when hurricanes and ice storms have swept through, though the power grid's pretty reliable) If the line between you and the office is intact, you can pick up the phone and you will get a dial tone, and be able to call out. (The 99.999% uptime mandated by regulation may have something to do about that) VoIP, well... do you have a UPS that'll keep you going for a week? Day? Heck, an hour? If not, how do you plan on calling 911? (Cell? Hah! Cell service doesn't have the same reliability guarantees and many cell towers are not provisioned with emergency power. Besides, try making a cell call in Manhattan--I have a less than 50% success rate on a normal day. Now imagine none of the land lines work because everyone's VoIP system's without power...)

Besides the whole "power in an emergency" thing, if someone's phone has an IP address, well... Look, Ma, a DDoS Attack target! Which will happen, guaranteed. With some frequency.

Then, of course, there's the issue of quality. Really want your phone call quality to go to hell because your roommate is surfing the latest pr0n sites, or has BitTorrent going snagging eleven zillion megabytes of warez?

Finally... sobig. Remember that one? The virus that installed back door compromise software on millions of IP connectedPCs around the world that now distribute offers for penis enlargement and launch DDoS attacks on folks who complain? Well, three words, baby: Distributed VoIP Spam. SpamAssassin watches my inbox, but there's not much it can do about my phone.

Ah, it's a brave new world, so I ought not complain. Want a cracker? (Mmmm, soma and soylent green, two great tastes...)

Posted by Dan at December 12, 2003 02:18 PM | TrackBack (0)
Comments

Yes, before any thought went into VoIP on my behalf the "ooh, shiny" thoughts were there. VoIP sounded so cool, mainly due to the idea of routing calls over the internet. Things like SkyPe really do push up that cool factor.

But the realisation that you are talking about hit me over the summer. The company where I was working had their backup router our of play for a day for maintainance, it was getting a firmware upgrade. On that day the Slammer virus hit. Almost certainly due to the high load the core router developed a memory fault, and started dropping packets, and eventually failed, requiring a reboot.

If VoIP had been running then there would have been no way for the IT team at HQ to coordinate the phased reconnection of all the sites (by now they had firewalled off the virus from the core network). If VoIP had been running then the cell phones would have been in almost constant use.

Posted by: Mark at December 13, 2003 11:19 AM

Keep in mind that the "I" in VoIP means "internet", not "Internet". I know the founder of a VoIP company, and their target customers are cable companies, who already have dedicated wires running in, and would like to provide service. At a minimum, the VoIP company knows they must provide the POTS basics -- self-powered lines, dedicated hardware, 911 service, etc. But the digital approach offers lots of advantages (easily-specified pricing models, non-voice content [think picture phones]), etc. Of course, other companies are indeed touting the "Internet" version, but that has all the scary drawbacks you mentioned...

Posted by: Steven at December 19, 2003 09:04 PM

Oh, I realize that VoIP can work over a dedicated network, and in that environment it actually works really well. (Heck, we run something very close to that where I work) VoIP systems are bizarre and touchy in a few ways that are different from traditional POTS systems (which themselves are bizarre and touchy) but once you get some experience and get some things under control it's cool. Plus with Asterisk running your PBX you can do some really cool things. (Like custom per-person caller-id based voicemail messages and black hole scripts, which can be an awful lot of fun...:)

I'd not ever want to run it over a network that wasn't completely dedicated to VoIP traffic, though, with routers that locked down everything but the VoIP ports, since one bridge to an external network opens you up to all that nasty evil stuff. For isolated (albeit potentially very very large) networks, though, it's darned nifty.

Posted by: Dan at December 24, 2003 11:00 AM

I am doing a senior project "voice over IP". We are using the Rabbit 2100 core module with the Rabbit 2000 processor. We choose the motorola MC145481 chip as our codec. I would like to know how the ring generator works. What do I use to generate a ring? Any helpful hints or comments will be apprciated. Thank you for your time.

Posted by: Anup at March 12, 2004 09:27 PM