Free home phone

I think I’ve bitched enough on this blog about just about everything people don’t want to hear about… so how about something useful? Free home phone system anyone?

A few weeks ago, a new hire at Cisco asked me if I thought it was possible to use a GVoice account as a home phone. Immediately I thought that would be easy… just register your home phone as a number of GVoice and forward to it. The question, as it turned out, was a little more complicated: he wanted to know if it was possible for GVoice to act as an endpoint for a VoIP service for the specific purpose of installing a VoIP PBX server at home and having a free home phone… well… that’s not exactly the same question… is it…

On the surface, the answer is no. People should not think of GVoice as a VoIP service. In reality, GVoice is a call mediator with some nifty bells and whistles. When you call your GVoice number, it simply rings the other devices associated with it and forwards the call when one of them answers. Calling out from GVoice is significantly more difficult. Since GVoice is only a mediator, you have no endpoint to start from so you have to tell the service somehow to start the call. You can do this one of two ways (and one other hidden way that we’ll talk about later): 1.) Goto the website and tell google to connect a call between some destination and one of your registered phones and 2.) Call your GVoice number from one of your registered phones and get into the call manager, the tell google to connect you to some other destination. [Fun fact: For those of you that have the ability to set a phone number off your cell network that you can make unlimited calls to (i.e. Friends&Family or MyCircle), you can add you GVoice number to the list and use method 2 to make unlimited continental US calls for free; its also possible to set up a speed dial on your cell phone using the pause feature to automatically perform this method for you.] As you might have noticed, none of the above lends itself to GVoice actually acting like an endpoint as you need a real device with a real number at both ends (that is until GVoice allows SIP forwarding, which is see coming in the relatively near future)… which made me think.

There are some VoIP services out there that will actually give you a free phone number in addition to a SIP address and free inbound calls. Gizmo and Sipgate are a couple that you could explore. Now… I think we can make this work. Just register your SIP phone number with GVoice, have google forward calls to the VoIP service, register some PBX with the VoIP server to send and receive calls, and voila! Not quite… unless you only want to receive calls. Remember… GVoice is only a mediator (I shouldn’t be such a downer about GVoice only meidiating calls. Because that is all it does, its really easy to avoid fees for outbound calls).

So… how do we get dial out to work? Well, there are some applets out there that will contact google (via a hidden SIP server) and tell it to call someone and connect the call to you (via a super special SIP URI)… but that solution sucks as a home phone. To make a call you’d have to bring up your computer and load an app and that’s just asinine. Really… what we need is a way to initiate a call from a SIP endpoint, have the PBX put the call you made on hold and somehow contact google and use the information in the dialed number to tell google to mediate a call between that destination and your PBX, then have the PBX connect the incoming call from GVoice to the call you made. The idea is really simple… but how the hell do you do it?! I like programming as next as the next guy, but I have no intentions on finding an open source PBX and writing a new module for it that could do this. Fortunately… it seems Gizmo and google have partnered to some degree and solved that little problem for me, all you have to do is tell Gizmo about your google account (unfortunately, this partnership isn’t perfect and it limits you to 3 minute outbound calls before you have to pay for them).

So… my first run at this setup: I registered a Gizmo account with GVoice and vice-versa then found a free Windows VoIP PBX called 3CX and a free softphone (I wasn’t going to buy a real VoIP phone just to answer someone’s question). It took a little time to figure out the SIP trunk information (as I’ve never used the SIP protocol before), but after a few hours of experimentation I had dial out working… SWEET! At this point I tried to have Tim call my GVoice number to show off my new system… yeah… I received the call… but got no sound… SOB! After a few more hours of debugging and experimenting with SIP, I figured out that the RTP/RTCP data wasn’t even getting to the PBX behind my NAT. I dumped my firewall logs and it seems Gizmo ignored the ports that the PBX registered with the VoIP server so the firewall was just dropping the data… I couldn’t figure out how to fix that. Something in the negotiations wasn’t right or Gizmo broke something to specifically block 3CX. So now, I had to try to find a way to implement the call parking on my own… or not.

Round 2: Why do yourself what someone else has already done? Someone came up with a python script that would do the call parking and connection for a call plan in asterisk, I figured it was worth a shot (what else am I going to do by myself in North Carolina on a weekday?). I installed Fedora in a VM and downloaded asterisk* and FreePBX (an open source PHP GUI for asterisk: asterisk has like 60 config files that didn’t want to have to learn). I decided to go with my Sipgate account since Gizmo was giving inbound problems so I had to play with GVoice for a minute. asterisk and FreePBX are kind of a bitch to get installed and working properly, particularly if you didn’t install all of the dev tools for your linux distro or if your PBX is going to sit behind a NAT device (both of which I fell victim to) [Just a note: make sure you install all of the extras listed to the right on the asterisk page; I also tried to use this install guide, but its not the most complete]. It also happens that asterisk doesn’t really try to hide any of the eccentricities of SIP so even getting the softphone to register with the PBX was a small challenge. The guide at nerdvittles was also slightly incomplete in a place or two. The call parking module referenced isn’t installed by default in FreePBX and I had to run out and find it (although it turned out there was a nice little update page that would go out and grab it for me).

In the end, I was in fact successful. I don’t know that I’ll ever use it (at least not until I buy something like the Linksys IP Phone), but I now have a completely free home phone setup (minus any useful 911 service).

Archangel / September 12, 2009 / Technology

Comments

  1. Theresa - September 13, 2009 @ 7:50 am

    I can’t say I completely understood this, but I am impressed nonetheless.

    I love you. You’re my favorite nerd.

    Reply

Leave a Reply

Your email address will not be published / Required fields are marked *