Main

July 10, 2007

Why SIP sucks and IAX rocks - a rant on latency and the media path

As many of you know, I tend to tinker with technologies... not to build a business around them, but to add them to my bag-o-tricks, or just for the shear fun of doing something that you can't get as easily, cheaply, or, if possible, at all on the open market.

For the last several years, I've been playing around with VoIP. Hardware, software, various ins-and-outs. And, while there are dozens of blog posts I could write about what I've learned, today I'm going to cover one of the issues I've spent the most time tinkering with, because its one of the issues that every VoIP company has to deal with to satisfy their customers.

Several things go into the perceived quality of a telephone call - fidelity, echo, reliability.... and transmit delay. Transmit delay is tricky - up to a certain point, delay doesn't greatly affect the happiness of the callers, but, after a certain point (around 100ms of total delay, a rough amount of latency from many kinds of technologies that start to get annoying), the delay on a call makes conversation harder. So, as a tinkerer with less-than-top-notch equipment and connectivity, I've spent quite a bit of time over the last few years trying to remove latency from the systems I use for VoIP.

This is tricky, of course. You can look up that your provider is in New York, say, and that your colocated box where you run your VoIP is in Pennsylvania. In theory, that should be close enough that the extra latency isn't very noticable. That is, until you discover there are many different ways the Internet might route between New York and Pennsylvania.

One of my best tricks, as the title of this blog implies, is to use a better tool for the VoIP, and thus get out of the way. I use the open-source Asterisk for my VoIP software, which supports both the standards-based SIP VoIP protocol, and its own, proprietary-but-open IAX protocol. SIP has the benefit of being implemented in fairly widely available hardware... IAX is, to a few exceptions, not supported in hardware. But, IAX has a few really killer features: it has a guaranteed-success transfer handoff, and a small enough base of supported devices that interoperability is rarely a problem. If you want to remove latency from your calls with IAX, you just have to teach your system to hand off the transfer of the media path to the two endpoints - no more routing through Pennsylvania even if both the caller and the callee are on the west coast.

SIP can do this, but, it has a much more complicated media path, and a much bigger pool of implementations. With SIP, you might try to do the same trick where you hand off the media path to be direct between the source and destination, but only find out it didn't work when you get a support call complaining that there was no audio on the call. Or, you have to use elaborate discovery tools on your network to figure out which devices are behind a firewall, and which ones aren't, and then check those results before trying to hand off a call.

In my own setup, I have tags I apply to the incoming channels on my Asterisk system. If a call is IAX, I deliberately try to complete it using IAX, and get my system out of the path. Otherwise, I have SIP set up to hand off where it can, but, in practice, I have to leave the configurations a little bit conservative to avoid no-sound issues from cropping up periodically: my callers pay with extra delay.

Bigger corps have different approaches (and, with few exceptions, all have to use SIP). I've read that Vonage has regional centers, and your device is setup to detect the closest one and use that. Then, presumably, they have internal rules to minimize the total network distance your call crosses. Too hard for someone small-time like myself, but probably very effective. GizmoProject seems to push everything through their SIP proxy. Even if you call from one phone on your local network to another. I believe they can still fix the media channel some of the time, though I'm pretty sure its beyond the reach of the Asterisk SIP implementation.

It's hard to get right... especially because some of the ways you can transfer a call effectively put you outside of the call - if you need to bill on that call, this just isn't an option. Here's hoping the day comes soon when providers just charge for listing and support: when we stop paying per minute, we can stop worrying about auditing every second of every call, and instead focus on delivering the best sound experience. Skype has got this right, and cheers to them for their routinely very high call quality.... but, they're not using SIP or IAX, so there's not much that can be learned from them directly.

Unfortunately, my favorite (and, at this point, the only one I've never had a serious gripe with the service of) VoIP provider started out as an IAX-only shop (http://iax.cc/), but got bought-up to a bigger firm that has now started to treat their IAX features as deprecated (http://vitelity.com/). I hope I'm small-time enough that they let me keep the IAX side active - I sure do appreciate the better call quality that results. Further unfortunately, I'm moving across the country soon, so I'm going to have to reconsider what all of my most-prefered choices are for colocation and VoIP routing. Good for my family, though, who is centered nearer where I'll be living, and are likely to end up with better call quality all around. sigh

Ok, . If anyone reading this is interested in my tricks to detect source channel type and try to send outgoing calls to an appropriately matched destination channel type, please chime in on the comments. It's all done with Asterisk macros, and it isn't quite a drop-in fix, unfortunately.

Technorati Tags: , , , ,

June 08, 2007

More stupid VoIP tricks: Sidekick2 no-minutes outgoing voice message delivery.

Regular readers might remember my previous T-mobile Sidekick + Asterisk hacks. Not content with the performance of the Toll Averter, Wife Alerter, which uses a clunky synthesized voice to pronounce the text you ask it to send (but has no preview, so it’s not always clear whether the recipient will make sense of what was said), I set out recently to re-invent the project, this time as a direct-audio-delivery hack. Why would you want to record audio and deliver it rather than make a call directly? Easy, Sidekick’s have free e-mail sending, but voice minutes cost. Yes, I’m cheap. :)

I’ve been thinking about building a voice message with reply feature for a while. Sadly, this is about the clunkiest interface around, unlike the one Ping suggests.

Several things needed to come together to make this work. The Sidekick has no native voice recorder, but they recently added a tool called AudioLab to their catalog of tools (it costs $5). This tool lets you record audio, though it is limited to something like 10s at a time, and, unfortunately, suffers from a large-ish delay from hitting record to actually recording. But, it serves the important purpose, which is letting you record audio on the Sidekick, and ship it off somewhere via e-mail.

Now, to put it all together, I needed a way to receive mail, extract the wav file, ship the wav file to someplace that it could be reached by my Asterisk install, then initiate an outgoing call. I’ll go through each step in the extended.

Technorati Tags: ,

Continue reading "More stupid VoIP tricks: Sidekick2 no-minutes outgoing voice message delivery." »

January 29, 2007

Gizmo Call - easy, slick, a little rough at launch.

So, as reported on GigaOm, Gizmo has now launched a nifty little trick: a flash-based VoIP plugin. They appear to be offering 5min/day of free calling (10min if you sign up). For $4/year, you can add "your" callerID to outgoing calls.. otherwise, your caller ID for web-initiated calls will be a fake SIPPhone 747 area code call.

What's really neat, in my opinion, is that you can now create click-to-call links that aren't hosted by you, the blogger. I can, for instance, make a GizmoCall link to the GrandCentral number I use (as mentioned in a previous post). So, try and give me a call, if you dare:

Call Me for FREE

Unfortunately, as the next thing I always try with a public service is how to connect it to my own private ones, there's less good here. GizmoCall, as with the GizmoProject client, likes to eat non-numeric SIP urls. You should, for instance, be able to call me at my public SIP URL, using a link like this one: http://gizmocall.com/sip:bpvoip17@geekdom.net. However, at this writing, two things go wrong: first, most browsers escape the @, which the GizmoCall interface doesn't un-escape. Secondly, non-numeric SIP addresses seem to get special-but-incorrect treatment in Gizmo. Numeric SIP calls seem to go through just fine with GizmoCall (this one, for instance: Call Me for FREE).

One last nit: the auto-complete interface is a nightmare. They'd've been better to launch without a feature like this than to launch one that makes it nearly impossible to dial different numbers with similar prefixes, such as is there now.

In summary: neat new service. If this stays working, it'll be a very handy thing to have around.. it did, indeed, take me about 20s to get it working on my Mac. A less experienced user would probably succeed in a couple of minutes, though, which really does make it a low barrier to entry.

Bonus discovery as a result of testing for this post: Apparently GrandCentral has internally configured themselves to complete calls to the Gizmo “fake” 747 area code. So, if people call you on your GrandCentral number from SIPPhone-based hardware or software, you can return the call through GrandCentral's voicemail callback or web-initiated calling feature. Probably also means you can list a Gizmo number as one of the calling destinations of your GrandCentral number.

Technorati Tags: , ,

September 14, 2006

Sidekick voicemail delivery tricks

Wow. So, the Sidekick I have can receive .wav files, attached to messages. However, it has a ridiculously short incoming .WAV limit. I'm not sure if this is because I have prepaid service, or if the Sidekick just has this tiny limit on its own.

Anyway, why would I even care? Well, with my previous GSM phone (a fairly pedestrian Moto V330), I'd figured out that pushing a voicemail into an email destined for the phone would get converted to an incoming MMS, with the properly formatted sound file attached. So, I set up my VoIP system to collect my voicemails, and I set it to forward voicemail to the e-mail address of my phone. Presto, I get voicemail push-delivered, with local archiving, and no per-minute fees. As a bonus, I could forward them along to anyone who could receive an MMS or an e-mail.

With the Sidekick, however, this didn't work. The limit on incoming sounds amounted to something like 15-20s of audio. More than that, and you'd get told you had an attachment, but have no way to retrieve it from the device itself. For whatever reason, you can't even play .WAV files from the Sidekick's built-in web browser, only from e-mail.

Not content to have a fancier gadget with less capabilities than a pre-existing one, I set out to figure a workaround. In the end, I strung together a bunch of Unix shell tricks to receive, convert, chop, re-convert, and transmit as a new e-mail the received voicemail. This looked roughly like this:

VoIP voicemail -> via e-mail to local account -> procmail match -> convert script -> Sidekick.

Gross, but, do-able, right? Making the conversion worked was more tricky. Fortunately, everything I needed was already a Debian package. Below the fold is the entire script needed to pull off the trick.

Technorati Tags: ,

Continue reading "Sidekick voicemail delivery tricks" »

September 12, 2006

Sidekick Toll Averter, Wife Alerter.

A friend recently gave me his old Sidekick 2. I quickly activated it, using T-mobile's pay-as-you-go plan, which lets you have unlimited chat and data for the fairly modest $30/month (no contracts, no taxes or fees). I already had pay-as-you-go service, because, with all of the VoIP tricks I have, I was rarely using my cell phone.

It immediately occurred to me that a sidekick screen friendly click-to-call app would be really handy. Digging around the web, I found a Nerd Vittles tutorial that covered how to set things up given the Nerd Vittles setup - I had to do some adapting/extending to make it fit into my own setup.

Here is my adapted callme.php. Download it, stick it on a webserver, either one with Asterisk, or one that can reach an Asterisk server through its network. Edit it in a text editor to change the password it expects, probably also the manager interface details, as I don't know what your settings are. Though similar to the Nerd Vittles ones, I have re-factored things, and put the form inline - you only need this one script to do it all. Also, to minimize screen usage, it stashes your password in a cookie, and only shows the password prompt if you haven't set it, or the password doesn't match. Don't use this script on a machine you don't trust enough to stash your password on... password handling is naive, to say the least.

To enhance things a little, I added two more features: 1) "Connecting" notification to the first person called. 2) A Wife Alerter feature (also known as a text-to-speech mode), for sending a one-way message to someone who doesn't have a SMS/MMS capable phone.

The "connecting" notification is straightforward. I created a new macro in my dialplan that looks like this:

    [macro-notify]
    ;exten => s,1,Background(transfer)
    exten => s,1,Background(pls-wait-connect-call)
    exten => s,2,SetVar(__FestivalMessage=${ARG2})
    exten => s,n,Macro(diallocal,${ARG1})

You might need to change the last line to do an appropriate type of dial for your dialplan. I use another macro to handle dial-out logic, but, you can easily substitute a normal Asterisk Dial() command for the last line if you don't need such sophistication.

Notice that this macro also does a SetVar - this is stashing an argument passed in to it via the CallMe script, so that, if appropriate, the message is available to the dialplan on the completing extension. To make a call that delivers a message, then, just fill in the message field, set the "Call first" to whoever you want to alert, and "Connect to:" to "tts". You'll need to stash the following "tts" in an appropriate place in your outbound dial plan. Here's the line you need:

    exten => tts,1,Festival(A message for you: ${FestivalMessage})

Once you've got all that set up, give it a test - Call First: yourself, Connect to: tts, and say "Hello world" if you'd like. Depending on your Asterisk install, you might still have to set up Festival - I leave this as an exercise to the reader, but used the Voip-Info explanation with no troubles after installing the "festival" Debian package on my own machine.


In the end, I now have a Sidekick-friendly app that lets me use any nearby phone, rather than my expensive pay-as-you-go minutes, using just my Sidekick to kick it off. In addition, when I'm in traffic or in a meeting, I can send a message to a wife or friend, even if they don't have a cell phone of their own.

Enhancements that would go well with this: 1) Auto-populated drop-down lists of who you call, and where you often call from. Why re-type a number, if you've typed it recently? This could even be done with cookies, to avoid having to do anything substantial server-side. 2) Canned outgoing messages, like most SMS-capable phones have. "Honey, I'm running late, I'll be home soon" is a lot of characters to type, if you type it every time from scratch. 3) Live call status, so you can figure out errors more quickly, or cancel an accidentally dialed call.

So far, I'm really happy with this solution, though. I'll add a Sidekick screen snap as soon as I can figure out how to take one.

Update: Here's a screenshot of the UI on my Sidekick:

a screenshot of the sidekick UI

Technorati Tags: ,

August 17, 2006

Fun with torrents, and Amazon S3

I've been watching Amazon's S3 service since it was first announced (the land grab is over, BTW - S3 announced a revision which allows you to use your own domain name in the hosting). I'm generally a fan of services priced pay-as-you go, especially when they're done with good technology following best-practices. S3 does all of these things. And it's about as cheap as reliable bandwidth, storage, and scale can come these days, too.

But, since I don't have any Web 2.0 startup ideas, nor any large files to distribute, I haven't gotten to play around with S3 too heavily. That all change this morning, when a new Nerd Vittles tutorial went up (check it out here). This was perfect - there was no torrent download, and a plea for help (in the form of a "downloads only available while the $ for bandwidth remain plea). As the post covers VoIP with open source tools, Virtual Machines, and a chance to tinker with S3 - well, most who know me can guess I was salivating at the thought of putting all three together.

And, that's what I did. I downloaded the original file, uploaded it to a bucket I have on S3. Then, I copied the generated S3 .torrent to my own server, and told the Nerd Vittles folks where to find it. Meanwhile, I had copied the original file up to my hosted server, and started up a seed there, as well (this saved me having to pay for an extra download from S3).

So, now I had Amazon's super-reliable service providing a seed, a tracker, and there was now a bittorrent flashmob forming. I could augment S3's seed with one of my own servers and whatever other bandwidth I had around, but I could also sit back and know that S3 would keep things alive, no matter what else I did.

S3 actually provides a pretty reliable backing store - it appears to provide about 75-100 Kb/s to each peer that shows up. This can add up pretty quickly, at least, if there are enough people in the mob to keep things moving, and you have (relatively) free other bandwidth to contribute. So, not content just to watch people transfer the torrent and slowly tick up my S3 bill (the entire project has cost a little over $1 so far today), I had to experiment with one more variable. Objects in S3 have an ACL associated with them. According to the docs, you have to make an object "public-read" for it to become available as a torrent source. This is true, if only because you can't get the initial .torrent created otherwise.

However, it occurred to me S3's tracker might, possibly, continue running, even if you change the ACL so that the seeder would have to drop out of the swarm. So, I changed the ACL on the original S3 object to remove "public-read", and waited. To check that things were still swarming along nicely, I even started a download on another machine. Happily, the S3 tracker is still playing the tracker role, but the S3 seeder has stopped racking up bandwidth. Since I'm still running another seed on my own machines, I can be sure that the swarm will stay healthy, but I can also pay Amazon only for the super-reliable tracker infrastructure, and the (modest) cost of storing an inert copy of the file.

Now, I just gotta' point a directional antenna at the newly-launched Google WiFi, which I can't currently get indoors, and bump up the seeding a bit more. That is, assuming Google wasn't savvy enough to limit bittorrent bandwidth on its WiFi. More on that if I get a chance to test it.

Some conclusions:

  1. Host the .torrent yourself, rather than using S3's url?torrent REST trick. This means you can continue to distribute the .torrent file even if you knock the S3 seeder out of the swarm.

  2. Hosting the .torrent also means that it's difficult (impossible?) for leachers to find the original URL on S3. Otherwise, if you link directly to the torrent URL on S3, it is possible for savvy users to just use normal HTTP download, and make you foot the bill for the entire download (S3's http is very fast - this would be a tempting trick, depending on the state of the BT swarm).

  3. If you have other seeds, or trust that your swarm is well-enough established to keep running on its own, you can remove the "public-read" ACL and still have S3 host the tracker on its reliable infrastructure. There are several open requests with Amazon to provide tools for how to manage bittorrent usage. So far, this is the only tool that I know of that helps, and it's not exactly automatic.

Technorati Tags: , ,

May 25, 2006

The coming VoIP insta-pricewar

A service provider I had mostly shelved for my VoIP experiments must have noticed that it was getting shelved a lot. Figures - that's what happens when your rates are higher than your competition, and you don't offer any other features... you stop getting business.

However, these folks have innovated, and come back with an interesting solution. They've published an API (and included example scripts to drop-in to off-the-shelf open source tools, in this case, Asterisk) that let you query their prices on a per-call basis. This, plus a new set of rates that are much cheaper in at least some cases, put them back on my radar.

I had to stop and think about the implications, though - they're impressive. Of course, it's only a matter of time until other providers start offering a similar instant price lookup service. Then, we'll really have an instant pricing market for VoIP services.... not getting enough traffic on the day? Well, drop your rates another fraction of a percent - thus getting more calls from more customers, but slightly eroding your profit margin. Continue this until whoever has the volume leverage beats out the little guys. Meanwhile, collect marketing stats as to which calling destinations you should be negotiating better rates for, given the query stream.

This makes for a lovely downward spiral - perfect market efficiency, on the spot market for VoIP call termination services. At least, until someone finally innovates, creating a new type of service, and shuts off the downward spiral. Here's hoping. I've mostly stopped with my aggressive VoIP experimenting, because, as a consumer, there aren't a lot of new building blocks with which to build new things. Right now, it's all just telephony replacement, and, well, I've replaced my telephone services with cheaper VoIP ones.

In case anyone wants to play with the current leader in VoIP rate erosion - check out VoicePulse connect.

Technorati Tags:

February 16, 2006

Gizmo wants to ring you everywhere....

The GizmoProject has started offering a service that might sound very familiar. Called Area775, it lets mere mortals have one-number service. Sounds well conceived - free to try, but you pay $2.00 per answer if you don't pick it up on your softphone. Otherwise, you can pay a fairly modest monthly fee and use it as much as you want. I wonder if they change outgoing GizmoOut calls to use the CID value for your one-number?

I agree with Stuart at Skypjournal, though, $2.00 is too much to experiment with such a feature on a single-pickup, just-want-to-try-it-out basis. Maybe they should offer like 1 or 2 free pickups per month, or, better, adopt the SkypeOut/Forward model of a few cents per minute.

As far as I can tell, though, there's no magic with Bluetooth presence, nor do they solve the single-number SMS problem that I've also mentioned is a concern. But, it's a "big company" offering the service, which means folks who don't have the skills or time to run their own asterisk server can finally start having some one-number service, for a very modest $3.95/month. Hrm, I wonder if I can hook this up to my existing system, using a Sipphone registration on my asterisk box to avoid paying them for pickup? We'll see.

Technorati Tags:

December 18, 2005

How to turn an empty Altoids tin into a Christmas present:

As a Christmas gift this year, I decided to make Joy's sister a cheap VoIP adapter. She's the perfect target for one: broadband, no land-line, but too-limited of a cell plan to be able to talk. Add to that, she's got a newborn, and a big family who probably wants to chat... well, wouldn't it be nice if she could plug in a phone and pay zilch to talk to family!

So, I set out to build a semi-consumer-grade device. My last model, which I eventually ported to a 2inch square card, is still caseless and kind of ugly. This build would need to be insulated, contained in a case, and, perhaps, attractive.

Here's the result:
Scene setting perspective

And here's the gag (though working) shot:
Action Shot!

(the whole set of documentary evidence can be found here)

It's another instance of this design, actually with much lower tolerances on the components, and a few more hacks, but it seems to work. Sorry, no build photos... but construction involved purple spray paint, an Altoids tin, 2 faux "Discover" cards, and about $6 (liberally) worth of parts from Radio Shack and Fry's. Unlike the last build, this one involves all acquired components - no old junk from my closet in this Christmas gift. Well, except the "Discover" cards, at least. Construction involved a soldering iron, a pocket knife, a Dremel tool, and way too many hours of pondering how to lay things out to fit them into the tin.

Sadly, it is a Christmas present, so I won't be able to gloat too much showing it to friends, since it will be halfway around the country in a few days. Hopefully, the photo set will serve as enough of a record.

Technorati Tags:

December 02, 2005

VoIP hardware hacking: the cheap telephone to computer soundcard adapter

Since at least the year 2000, I've been looking for a solution to the "how do I plug my phone into my computer" question. Several products have seemed to be moving too slowly toward a price point I'd've bought. I think the original idea was to use a real phone to make calls through the then-free Dialpad service.

Oh, sure, I've tinkered with hardware. I've got a pair of Creative Labs (supposedly, though it appears they were just repackaged Innosphere devices) VoIP Blasters I bought for $20+s/h, after Creative decided to dump inventory, just before the slashdot article that made them scarce. Of course, that's a fairly nice piece of hardware, with cruddy software (and, though there are open-source replacements, the built-in irrevocable g.723.1 codec is, well, a pain), and, consequently, has gotten almost no use.

After the VoipBlasters, I watched several line-level to phone adapter devices go by, often costing $80 or more. Just wasn't worth it.

Last year, when I really getting into VoIP, I picked up some good standalone hardware, a Sipura (now Linksys) SPA-2000, and later a SPA-3000. Those are great boxes, but they don't let you plug a phone into your computer directly, meaning, if you want to interact with software-only tools (like reigning champ Skype) you'd have to deal with a lot of hacks, or control a lot of the pathway to the other side.

Finally, enough hobbyists were getting into this stuff that I started seeing explanations of how to build the thing yourself. In particular, a company has put together a fairly cheap solution already, and, since they didn't have the software done when the put the product on the market, it's now widely used by people who home-build the same thing, meaning that you could build such a device and have it be more than just a telephone-shaped headset, but actually interact in the call generation (the Chat-Chord software even generates dialtone, er, sometimes...). I decided to give one of them a shot, the Grynx tutorial sounded easy enough. I ordered the parts, but, when they got here, it turned out that for one critical centerpiece, a phone-specific transformer, I had ordered not quite the right thing. Whoops.

Then, eureka, another tutorial came along. This one didn't appear to use any hard-to-find components, just a pile of resisters and capacitors. I dropped by Rad Shack on the way home tonight, and picked up what I still needed (I already had the female RJ11, and the 1/8" computer wires, cut from an old broken headset), and sat down to breadboard things together.

Amazingly, I wasn't missing any parts, and things went together pretty straightforwardly.... I bought too many resisters, and I'd bought a grab bag of potentiometers and capacitors, so I had to do some tinkering and measuring. Once I found the bits, and put them all together, I plugged it into my computer, plugged in a phone, and, without further ado, I had recording. Sound levels seemed fine, too. I thought I'd broken the line return part of the circuit, but then I checked my wires, and found I'd plugged the line return into the wrong plug on my computer.

Bottom line: It works! Here's a pic:
A working uber-cheap telephone to computer line level adapter

... now, to not break it while transferring it from breadboard to a case. I'm thinking an Altoids case, since that seems to be a popular trick lately. Anyone got an extra spare one?

Technorati Tags:

November 27, 2005

The myth of the single phone number

I've finally done it. I have a single phone number that rings through to me wherever I am. Using various of my previously posted tricks, but mostly just having a central VoIP system that can complete calls however I ask it to, I now have a single number that reaches me basically anywhere.

There are some caveats, which I'll get to at the end. But the biggest thing is that I've had a hard time explaining it to people. Partly, that's because I actually didn't accomplish complete unification - there is one number you can call me on, but I haven't yet found an affordable way to receive SMS messages into such a system. In fact, it seems to cost hundreds of dollars per month for such a capability, or you need custom hardware. So, instead of just giving people one number, I end up giving them two... the first being the apparently nebulous "primary" or "main" number, the other being the cell phone number.

The problem is that, basically everyone I know primarily uses their cell phone, and, at least whenever they'd be calling me, assumes its best to call me on my cell phone. So, having given out my cell phone number, the "primary" number has become lame-duck. The only way around it is to avoid telling them anything but the single number - which I'm a little nervous about, because I really don't control that VoIP system well enough to guarantee it'll work in a pinch, so it's nice to have at least one other number people can call me on in case of emergency, as well. So, thus, the quandary.

There's also the caveat. The cost/availability of the numbers. Over time, as I've been experimenting with VoIP, I've acquired several different incoming numbers (DIDs, in telephone parlance). One is free in every way, but long distance from virtually everywhere. Then I have toll-free, and local numbers. Ideally, I'd give the "free in every way" number to whoever will always be calling me from a place where they always have long distance - my cellphone toting friends, mostly. I'd give the toll-free number to others, and the local number to people who'd be calling me from a phone in my local area. Of course, finding out enough of how a random person I'm talking to is going to use a number to reach me to given them the "correct" number is an unexpected conversational hangup, so rarely goes well. I suppose the real problem is in making all of these capabilities available - if I just picked one number, and stuck to it, this would all go away... but then I'd never get to tinker with things like toll-free systems, SIP routing from free carriers, and the like. Ah, well.

Anyone else out there doing single-number dial-all tricks with their VoIP systems?

Technorati Tags:

November 07, 2005

Teaser: more custom call routing

Prevously, I described how I set up my VoIP system to route calls using the Plazes.com api. This has been working pretty well, except it suffers from a few problems:

  • Plazes only knows where you are if you have a machine running, actively reporting your location. If your machine is off, or, as is currently my situation, broken, then this won't work so well. It also doesn't work very well if you use several different machines, some of which you share with others.
  • The plazes API lookup takes some time to execute, on the order of 2-5seconds. That's essentially a whole ring that's lost to routing if you're doing this as part of a direct-dial setup.
  • I don't control the plazes infrastructure, so if it goes away, I don't get any cool custom call routing at all.

When I set out to do the Plazes hack, it was because I didn't have a Bluetooth phone, and I hadn't seen that anyone had done it. However, I've since switched to a Bluetooth-enabled phone, so I finally implemented the last, most commonly-done bit of custom call routing. I had all of the bits to make it happen before: home Linux server in close proximity to where I usually am, Bluetooth phone, bluetooth devices, etc. Unfortunately, I was having troubles getting my old Broadcom 203x or whatever USB Bluetooth device to work with my kernel 2.6-based Linux.

In the end, I took bits of the recently published Nerd Vittles tutorial, combined with a few improvements, and even rearranged my Plazes code. I now have a system that quickly checks Bluetooth status, and only branches to Plazes if I'm not home. I've rearranged the code so that all of the branching happens in the Asterisk dialplan, meaning that, with a little more tweaking, the plazes and bluetooth scripts can be generalized.

Unfortunately, my primary work environment is off getting AppleCare love right now, so I'm going to have to delay the full writeup with code for later.

October 13, 2005

Profit assurance, modern day

I recently decided that, given my various VoIP experiments, and the resulting affect on number of cell minutes I was using, that it was high time I ditched the expensive, though gadget-friendly cell-phone service plan I'd been living with.

My solution was to find a decent replacement. At the rate I was paying, I'll come out multiple hundreds of dollars ahead on the year using a phone like this for my mobile cavorting. And, with fun automated dialing hacks, who needs to give anyone their cellphone number anymore anyway?

Unfortunately, pay-as-you-go phones come at a price... they are sold without credit checks, so there tends to be a lot more, er, scrutiny, in transactions associated with them. When I went to T-Mo's website tonight to put my first recharge on the phone's minutes, I wasn't expecting nearly the process that follows.

  1. Fill out form on website. Technically, anyone who wants to can buy me cell minutes, if they know my cell number. Of course, you'd have to go through the rest of this process, too.
  2. As a matter of course when filling out the online requests, you, as payer (not as recipient of minutes) are asked for a number you'll be reachable at during the next hour, for “fullfillment” purposes. I assumed this meant a number they could use if the destination phone number for credit was wrong. Not so...
  3. After waiting almost 2 hours, and wondering where my $100 had just gone, I called the number provided in the “confirmation” page from the website:
    1. Identify self.
    2. Explain what has happened (or rather, hasn't).
    3. Get put on hold while the friendly representative checks to see if he can find the “representative” who was handling my order.
    4. “That representative is busy, I'm going to help you”
    5. Round one of personal credit questions. Check address. Check partial SSN (mind you, I've never given T-Mo, or the web order form, any of this information - so it seems a little odd that they even can corroborate such information). At this point, I ask who I'm talking to, since I don't normally start handing out SSN info without knowing why. The guy sounds totally understanding, and explains he works for a company that does these kinds of checks for several other companies in the business... I think he said “Besta”, but I'm having a hard time pulling up a Google reference. In the very least, they handle Cingular and T-Mobile, though I think he mentioned others, as well.
    6. After providing the basics, I'm put on hold again. In another minute or two, the guy comes back. This time, he's asking questions that could only have been pulled from my credit record.... only, in a very interesting format. One of the questions identified where I had had a previous address. The question was “Answer yes or no to the following question” followed by the names of several counties (all in the general vicinity of previous addresses of mine, though scattered around two of the previous states I've lived in). After passing that question, I was asked an age-range question regarding someone who I'm closely related to... same format, “24-31”, “31-45”, etc. Pick the right answer. Not hard, amusing for the way they build in the ability for people to answer correctly, without having to remember/know the exact details anymore. Contrast this to Safeway who's always asking me my telephone number. Like I remember exactly which telephone number I've ever given to Safeway?
    7. After all of that, my payment was processed immediately, and I was assured that future transactions using the same card would go through without delay.

Now, I understand this process. Companies are always trying to avoid getting hit for a pile of services on a stolen credit card, since they generally eat much of the cost of services rendered in such situations. And, I did purchase the biggest and baddest unit of currency - also, of course, the one with the most appropriate rate: also the easiest unit of retail for a would-be-theif to negotiate without having to constantly go re-up the plan.

Was it necessary? Perhaps, in the long run, this is the right thing to do. But, I gave them the same personal information, and credit card, when I bought the phone at the local (company) retail store. It all got put into the computer (anyone thinking prepaid phones are anonymous is likely to be sorely mistaken). I was buying currency for my own phone. Seems like they could short-circuit this process. The ~13 minutes of operator time involved costs them money, too.

Amusing aside: On prepaid plans, you can rarely get into Voicemail and other services without using up (relatively expensive) minutes. VoIP to the rescue - dialing the Voicemail number directly won't allow access, even for leaving a message. But, calling the voicemail number with caller ID set to the number of the cell phone - well, that works much better. And it only costs me 1.1cent/minute, vs. 10 cents or more. Woohoo for phone hacking.

October 11, 2005

Followups on parade: Gizmo Project

Well, may as well continue my posting for continuity. A while ago, I commented on the early version of Gizmo Project.

More good:

  • Fixed the SIP buddies thing. You can also makes a quick-dial of a SIP destination. Since I have a magic IVR system on my VoIP system, this makes for easy access.
  • Conferencing. Gizmo added a function with freeconferencecall.com. Now I can make conference calls where the VoIP-supported legs into the conference are free, but still have quality service for the rest of the folks calling in on normal phones. Before this, such conference calls involved the VoIP legs terminating to POTS first, introducing more lag, if nothing else. Would, of course, still be nice if Gizmo had built-in quick conferencing, like Skype has had since the beginning. I'm sure they're working on this.
  • Fixed the Mac sleep/resume issue.
  • IM Support, though a little poorly integrated at this point.
  • SIP URL can be used from any SIP device to call a Gizmo phone.

Bad:

  • No keyboard access to DTMF.
  • DTMF still appears to be sent inbound.
  • DTMF doesn't work unless you're on a really fast connection, and Gizmo detects as such. If Gizmo detects a lesser quality connection, it'll choose a lesser codec (usually iLBC or GSM in my experience draining calls into Asterisk), which, of course, can't transmit DTMF inband. Geeze, guys, support one (both! All!) of the out-of-band DTMF techniques already.
  • The Windows version is seemingly broken. I guess they list it as a bug, but on both my work machine and my home machine, I get the dreaded “timeout” condition on login. My home machine has only the default Windows firewall, and is otherwise on an open network. This should be easy/simple guys. The Mac version continues to work, reliably, everywhere, both behind a finicky UDP-denying corporate firewall and at home, always with a software firewall enabled.

Bottom line, as I said last time (and they picked up for their testimonials): Gizmo could be a Skype killer.... eventually. Right now, they've got some issues to work out. I'd like to see them fix all of the problems, above, in some way. Until then, Skype is slicker, more well-integrated, more reliable. But Gizmo opens the door to the walled garden, which makes it far more attractive in the long run. The only way into Skype's walled garden costs money each time, and that makes the cost of an integrated solution too high. The point of VoIP-enabling/replacing technologies is to drastically reduce the cost of the communications.

Tags: ,

September 11, 2005

VoIP hack: Custom call routing based on your current Plaze

I've been trying to think of something else cool to do with my VoIP system. I've lately added crude least-cost call routing, several more incoming numbers (I found a company at least currently providing Bay-Area local numbers for apparently no subscription cost! Hello, business model?).

Anyway, I've also been playing lately with a kind of nifty location service called plazes. In a nutshell, plazes provides a system whereby your computer registers itself. Plazes uses information about the network you're currently on (information about the gateway, actually) to uniquely identify a network. If your network has already been identified and information about it entered into Plazes in the past, Plazes will know where you are. (There are some limits, and the tool that registers your location only currently runs from full-fledged machines. No laptop? Plazes probably won't work for you - I was hoping to code support for Plazes for the PSP, but that seems doubtful, at least, without an expensive PSP development license, given what Plazes needs to know about your local network to identify it).

Like any good Web 2.0 company, you can get at this information programmatically. You can query where you are directly, and opt-in to letting others see where you are and where you've been, if you so desire.

I've been wanting such information for a while to teach my home asterisk system how to route calls for me.... see, when I'm at home, my cell phone is really unreliable. Sure, you can simultaneously dial a bunch of numbers (this is a trivial thing in Asterisk, why is it so hard for normal phone systems?), and just let the first one to pick up win. But, what if your home cell coverage is so bad that your cell phone sometimes goes straight to voicemail - thus, cutting off the simultaneous ringing of your other services?

Besides, there are other times when location can be a better hint to how to route calls. I'd rather my work phone not ring all weekend, when I'm working from home, etc. There's no reason for it to, and it means someone at work could possibly answer my phone when I'm not around.

My solution was to use the plazes information to decide what numbers to simultaneously dial. Right now, when I'm home, I just ring my home phone, and, optionally, a software phone on my laptop. When I'm at work, I don't ring the home phone, but I ring both my cell and my office number. When I'm not logged in to plazes, or I'm at a plaze I haven't written a rule for, I try my home, my cell, and my softphone.

Well, there's the background. Want to do the same thing? (prereqs: have an Asterisk install, a plazes account, and at least one DID service for your Asterisk) Head over to my tiddly wiki where I lay out the code and the instructions.

Questions/Comments? Please post them in the comments.

Tags: , ,

July 07, 2005

The new kid on the block: Gizmo Project

I'll say it, Gizmo could be a Skype killer. It's fairly slick, and works fairly well. I've played it for a few hours, and here are a quick summary of my reactions:

Good:

  • Easy config/easy out of box experience (Install it, run it, sign in, and it should just work)
  • SIP support (though kludgy, at least there's interop of some sort)
  • Mac support (day 1)
  • Fairly slick UI (emphasis on the right stuff)
  • Improve the VoIP world: call subjects (no one else besides Skype has really been pushing for new features, just doing replacement)
  • Easy call recording
  • Seems to even handle the antagonistic corporate firewall scenario. It is the first app besides to pull that off for my situation.

Bad:

  • Can't make SIP-address buddies (yet, supposedly this is just a bug)
  • Even if you dial SIP, it doesn't record it in the history correctly (all addresses get normalized into the "gizmo" space, most of them incorrectly)
  • Not smart enough to just go ahead and reconnect after a Mac sleep event.
  • Hokey "call destinations" map... often wrong, especially for SIP calls.
  • Crashed several times during testing, sometimes appearing to make calls that it was unable to. It's still beta, but it didn't have any error reporting/detection in these cases, which is worrisome.
  • DTMF support questionable - tried setting asterisk' SIP dtmf support to both "info" and "rfc2833" in calls to my own asterisk server, neither worked. At this point, my IVR menus on my own asterisk aren't going to cut it.

All in all, it's looking like a decent tool. Since it supports SIP in a fairly useful way, I can, for instance, add it to my simultaneous-ring setup for all of my home VoIP stuff.... now, my home phone really can ring anywhere, cell, wifi, or otherwise. That's cool.

Hopefully, they'll publish their new workarounds to NAT/firewall traversal, so that it'll be possible to expand this support directly into more SIP hardware. STUN clearly isn't enough as it stands.

Tags: ,

April 28, 2005

Other sip urls spotted in the wild....

It appears I was wrong when I said that no one published sip urls for themselves. At least one company in the business actually does. Good job, Junction Networks! Hopefully, they won't be the only ones to do so. I'll update this post with others as I find them.

Also, I've had a single response in the form of someone taking advantage of the sip url I posted before. I'll write up the experience at a later time.

Tags:

March 25, 2005

sip url for me

I may regret this, but it seems like no one out there ever advertises SIP urls. Part of the point of the VoIP revolution is to bring web addressability/portability/flexibility into the world of person-to-person communications, right? The whole SIP spec makes addressing very easy, but no one ever advertises their SIP address, for some reason. If I were a VoIP company, shouldn't there be a SIP url that reaches the company (ok, reaches an Interactive Voice Response menu, rather than a person, just because of the spam potential) advertised right along with their normal contact phone numbers?

Well, whatever. I'm going to advertise one. You can dial me at sip:[myfirstname]@geekdom.net, or, for purposes of making it easier to copy-and-paste, here's a throwaway that I'll leave active until VoIP spam starts arriving: sip:bpvoip17@geekdom.net

Now, I'm not putting this out here for SkypeMe-like use. Don't call me unless you know me/want to talk to me for some particular reason. Just wanted to start a trend.

Update: The URL has now been used. To the nice inquisitor who tried to call at 5am local time, however, all I can say is "I don't get up that early". Try me after 10am PST, and before 10pm PST. Or, strike up the conversation in the comments below, or use the SIP url's component as an e-mail address (also temporarily enabled) to reach me directly via e-mail.

February 14, 2005

WhyPayForCalls? Why wait for hype?

Just a quick followup to my previous rant, the company providing the recommended VoIP service appears to be 3WTel. I think whypay4calls might not be the same company, but might not be much better, either.

Costs $5/mo, has all of the hype you'd expect from the “shocking expose”, including a cute movie. The only feature it appears to offer that Free World Dialup doesn't, besides hype and monthly fees, is their supposed “secured network”.

A waste of time, and overhyped, but that is all.

February 04, 2005

VoIP: Lies, and misdirection...

It shouldn't be a big surprise, but there are crooked crooks on the Internet, trying to pray off of your naivete to make a buck.

But, since not everyone can swim through it all, I'm going to have to go after a bad one that I just encountered. Hopefully, this will show up in web searches about these people (http://www.whypayforcalls.com), and save some people from a gruesome fate at the hands at some charlatans.

However, I'm going to dismember portions of their 17-page Lie Fest, usually only available if you sell your soul, I mean, give them far more personal information than is warranted for such a thing.

Continue reading "VoIP: Lies, and misdirection..." »

January 22, 2005

More on my home VoIP setup

To follow up on my last post about my VoIP experiences, I wanted to lay out the system I've built so far, and what it gets me.

I put together several of the tools I mentioned in the last post to make a system to allow family members to reach each other more easily. This is essentially already a fall-back system for everyone, since everyone in my family has a cell phone, and, consequently, calling on the evenings and weekends is already “free”.

I built a system where I tell everyone the toll free number of the system, and I give each of them an “extension” based on their names. It's pretty easy to guess how to reach everyone, so the only number that has to get written down is the toll free number, itself.

Once into the system, if you enter someone's name (as numbers - ie, 27926 is Bryan), you get prompted for what means they can be reached by. Normally, 1 for home, 2 for cell, 3 for work. You choose one, and the system puts you through. The called party sees your original caller ID, and you talk just like normal.

Why is this so great? Well, it works not only from home phones, but anywhere. And it's darn cheap. The cost of calling anyone in the Bay Area (me, my girlfriend, my sister, or her fiance) is only the cost of the toll-free leg of the call: $0.02/minute. If you want to reach anyone else, it's still only another $0.013/minute, for a grand total of $0.033/minute. That's with no monthly minimums or maximums, and through a toll-free number.

At those rates, I can give my family calling to each other “as a present”, and pay for it virtually entirely out of the income from the ads for other VoIP services that Google sticks on most of my posts about this.

Speaking of which - if you're not interested in how I do this, why not click on one of the ads and find out about some other service? I should warn you, at this point, most of the other services which show up as ads here charge monthly fees, assuming that something like $20/month unlimited will lure people in. And, it does, because normal phone lines cost just under $20/month without long distance and extra features. Rediculous - anyone I know who wants to can spend $70, buy a Sipura SPA-1001, and I will hook them into this system. The marginal cost per user is nothing. You can buy your own long distance minutes, have your own free incoming number, and dump your home phone line. At $16/month after taxes and fees, it doesn't take that many months to break even. At $0.013/minute for outgoing, free in-system (and various other destinations that are VoIP-enabled) calling, it's hard to imagine why this wouldn't be worth it.

Update: But why get help from me, when you could go it alone with one of the many services finally coming out to assist you in swapping your phone line for others. In particular, I just noticed the Bellster announcement, and there's been a technology called DUNDi for a while.

December 08, 2004

Telephony getting cheap... (and a brief overview of VoIP and my dalliances therein)

I haven't blogged much (at all?) about my VoIP exploits, so here's a top-level discovery, and maybe a little fill-in discussion.

I found a service, here, that has no-monthly-fee tollfree numbers. If you connect the toll-free number to a VoIP system, it only costs $0.02/minute. Wow. For emergency family access, this is cheap. I'm working on setting up the toll-free number they gave me so that anyone in my family can, knowing just enough of the “magic”, call this number and connect to anyone else in my family. Neat, eh.

So, on to a more general overview on my VoIP tinkerings. If you look around, there are tons of cheap services about (most of these services do require you or someone to run an open-source software tool to do call-control/routing for you):

Voipjet currently has outgoing US calls at 1.3c/minute. And they bill by like 6 second increments... they're call detail display has to use a lot of decimals to represent how much your call actually costs. This place seems to be a small, maybe single-man shop, but I have no complaints. Call quality is good, the control interface is geek-friendly enough, and it's cheap.

Sipura makes good ATA devices - the box that you use in the VoIP world to connect a phone to the network. Don't let the pics on their site deceive you - these boxes are teency little things. Linksys recently licensed their code (odd, since Sipura was created by employees leaving Cisco's IP phone group, and Cisco now owns Linksys), and is making some cheap Sipura-alike devices now, as well. I got a SPA-2000, which is a two-port box that currently sells for near $100. As a two-line device, though, it means two entirely separate “line presences” - two real extensions, not just two phone plugs like you'd find in a normal house.

I also have a knock-off X100P, essentially a software modem board that's used to connect a computer to a phone line (this is called an FXO, the ATA box above is said to have two FXS ports. FXS means “plug a phone in here”, FXO means “plug a phone line in here”). This means that my home telephone line, which otherwise was doing nothing (both my roommate and I use our cellphones as our primary lines, having a home phone line just because SBC doesn't yet offer Naked DSL around here yet), can be used to complete calls.

Alright, so, what's it mean? I'm still working to figure out what the killer apps are. At $100, or even $50 for the cheaper Linksys boxes, it's hard to justify buying one of these boxes for everyone in my family. Unless, perhaps, it would mean canceling a persistent telephone line, or doing toll-avoidance for everyone. Once you've got a VoIP bit of some sort, and a high-speed Internet connection, you shouldn't really have to pay to call anyone else with the same. You can now get cheap DIDs (Direct-Inward-Dial, the lingo for someone else selling you a real-phone-to-VoIP enabled telephone service) for as low as $1.49 (also at iaxcc). Heck, free, if you don't mind a number in upstate Washington Minutes are cheap. How many minutes can you possibly spend on the phone in a month?

In Cincinnati, I used to pay $30/mo for a telephone line. $30 buys you 2300 minutes (over 38 hours) of telephone time at 1.3/c/min. Why pay for the phone line anymore?

Of course, there are a myriad of ways to avoid paying at all, if you have the right equipment and only want to talk to others with the right equipment.

More VoIP tirades later. This one seems to have gotten long and rambling. (But, if you want to play with any of these services, I have a well-connected asterisk server up, and could make some arrangements for you)