Showing posts with label voip. Show all posts
Showing posts with label voip. Show all posts

Saturday, June 18, 2011

Asterisk and Android Gingerbread

OK, busy setting up an Asterisk server at home for a few experiments in VoIP.

What I want now?
  • Each DECT phone I have, connected via the A580-IP I mentioned on Twitter (it's a SIP-enabled DECT base station with some PBX-like functionality) to have an extension
  • Each SIP-capable mobile phone I have (ie my CyanogenMod Gingerbread phone with the built-in SIP client, and my wife's regular Android phone running something like Linphone) to also have extensions.
  • All phones to be capable of dialing one another
What do I ultimately want?
  • All extensions to be able to make internal and external calls
  • All extensions to "ring" when a SIP call comes in from my VoIP provider
  • My office extension to "ring" when a Google Talk call comes in (if such a thing is possible) for my business GMail account (which is linked to a Google Voice account.)
What do I have? Well, ultimately I figured out most of the first. Here are the gotchas I found.


1. Lots of redundant configuration

Asterisk requires extensions to be configured in two places: sip.conf, and extensions.conf. There's supposed to be a sip.conf option that automatically registers extensions (called regexten), but it doesn't actually seem to be useful - it registers the extension exists, but doesn't put in the rules necessary to call it. Strange. Asterisk seems to be so configurable that it wouldn't surprise me if there are things that can be configured to make it work, but for now, no dice. So, if you're playing with the system, remember to configure twice.


2. Make sure you get the realm right if you want Gingerbread clients to work

Android 2.3 Gingerbread turns out to have a fairly smart implementation of SIP, even though it's deceptively simple. I'd been experimenting with a different domain from the one actually used by the server (eg my address would be something like (but isn't) sip:squiggleslash@sip.squiggleslash.org, whereas the server itself is on sip.squiggleslash.internal port 5550.)

How's that supposed to work you might ask? Well, I figured it wasn't a problem because (a) I'd set up DNS properly (there's a _sip._udp.sip.squiggleslash.org SRV entry that points at the correct server and port) and (b) all SIP clients I'd come across let you specify the domain and server name seperately.

...except Gingerbread. Gingerbread doesn't ask you separately for the domain, merely asking you for the server, and that initially confused me, but it turns out the "server" Gingerbread is asking for is actually the domain. In other words, I entered

Username: squiggleslash
Password: 1234
Server: sip.squiggleslash.org

And, FWIW, I entered the sip.peh.link/5550 thing for the "outbound proxy" stuff, but I'm not sure that was necessary. The above was enough to get incoming calls (ie calls from any extension to the cellphone's SIP account) to work.

...but not outgoing calls. For outgoing calls, Gingerbread needs you to correctly configure the "realm" in your sip.conf, namely make it the same as the domain (ie in the above sip.squiggleslash.org) Otherwise you just get weird 404 errors in the Asterisk console.

Some of the above advice might be out of date. I'm using a three year old version of Asterisk that came with Ubuntu Hardy, which is the operating system I'm running on my VPS. But, whatever, the above is enough to mostly get everything working.

I'll let you know how I get on with the other tasks in the list...

Saturday, May 28, 2011

The VoIP thing

So, I think after some consideration I can start posting details of the VoIP thing I mentioned a few journal entries ago...

The company's name is "voipo". Supposedly they're linked to a hosting company called Hostgator. I have no comment on the latter, the Wikipedia article is fairly neutral and Hostgator is one of those companies that publishes a bunch of its own "reviews" sites that mysteriously end up being the first group of Google search results. Never did like that practice.

Still, going to places like BroadbandReports I can't find anyone with anything bad to say about Viopo, lots of people with good stuff to say, and looking at Voipo's forums it looks like the people running the organization take a keen interest in customer support. They seem to be an honest bunch.

Here's my initial experience:

  1. Didn't take long to be set up, but I note they start your period of service from when you order it, not from when you get your device and start being able to use the service.
  2. The device they sent is a Grandstream HT-502. I tried it the way they propose, which involves putting it between your router and teh Interwebs. It didn't work, it sat there for 20 minutes with the various lights pretty much permanently on save for the occasional flicker, wouldn't make calls, and to add insult to injury it looked like it has its own built in NAT router which screwed up my network configuration. I then did it the other way, put the device behind my router, and everything came up.
  3. As long as my Internet connection is up, the device appears to work fine. When my Internet went down a few days ago, thanks to Comcast changing my IP address and my router not realizing it, the service rerouted itself properly, and came back up without me having to do anything when Internet access was restored.
  4. I have no idea what happens if you try to use other SIP services at the same time.
  5. There is a BYOD feature, where as long as you have the Voipo-supplied device online, you can redirect everything to a device of your own. The reasoning is that the Voipo device "proves" you have a working connection, and all diagnostics can be done on that. The Grandstream doesn't appear to have a SIP gateway built in or anything like that, which is a shame.
  6. Quality is OK. Not great. Not bad. Volume is very loud, which is fine by me. Latency is long enough to be noticeable. Sound quality was, I guess, similar to a 1990s pre-EFR GSM phone - which I always thought was fairly reasonable but obviously many disagreed otherwise we wouldn't have EFR or AMR.
In terms of features, as someone who's only ever subscribed to "basic phone" (OK, I usually got the call forwarding feature), I was a little surprised by the number of things that suddenly started working. My TV, for example, now shows the CLI associated with the number dialing in when the phone rings. My Siemens DECT system now displays the right time, and even stuff about missed calls, which it never used to.

One thing I haven't tried yet, and probably need to upgrade my DECT base station to support, is the two line feature. If you get an incoming call while you're on a call, it's automatically diverted to the second port on the Voipo device, and you can make calls from that while being on a call too.

There's a web interface which makes it easy to, for example, set up call forwarding when you're away. Also lets you send faxes.

Right now, I haven't used the service for long enough to recommend it, but so far, so good.

Saturday, May 21, 2011

Switching to VoIP

Now that we're using cable Internet I decided now would be a good time to switch phone carrier to a VoIP service. Which one? Well, not going to say, except:
  • It's not Vonage. Woo-hoo. Woo-woo-hoo. Yeah, I can't go with someone who advertises like that.
  • It's not MagicJack. I have no great desire to have a computer running Windows permanently hooked up to the 'net somewhere in my house.
  • It's not, from what I can figure out, one of the zillion cookie-cutter VoIP companies that all appear to be fronts for the same organization.
  • I'd never heard of them until I started researching.
  • They made a big deal about having their customer support centers being in the US, which is a good thing (jobs, jobs, jobs), assuming they're not working under Indian Call Center conditions anyway.
  • They are backed by a company that I can't find anything overly negative about, and they have been around for a few years.
As it was, I ended up using the reviews on Broadband Reports to find and pick the company in question.

I will let you know my experience in a few weeks. Thus far, I'm waiting for the ATA (the thingie that hooks up to your router) and they're in the middle of porting my number too. While they allow BYOD, I can't do that until I hook up the official ATA, apparently. I may experiment with Asterisk at some point in the future, but for now, one step at a time.