2007/04/14

Some disilusionment with ATA

Yesterday my ATA arrived (Linksys 3102) but quickly I have discovered that it is not "exactly" what I wanted. I have already put it for sale. Well, that's the way it works: it takes time and money to get knowledge and experience.

The ATA itself is pretty, does what it is meant to do and is full of features. Certainly it would be useful if I ran a business of some sort. For my personal use, it just didn't feel right:

1) I planned to configure it both with a Gizmo account for outbound dialing, as well as being able to receive calls directly in behalf of my domain. Both things worked separately, but not together; some configurations (including but not restricted to NAT configs) conflicted.

In order to do what I wanted to, I would need an Asterisk server running in the router (to get the public IP address). Working together with Asterisk, the 3102 ATA would be perfect since it also serves as PSTN gateway, even providing a separate SIP port to deal with PSTN.

2) Using 3102 as PSTN gateway led to some bad echo problems. After following several tutorials about echo problems, I reset the ATA to factory defaults and the situation improved a lot (probably I had messed with some configuration that increased echo).

The echo happens because 3102 effectively encodes FXS voice and decodes into FXO, creating a delay that makes echo noticeable. The echo is reencoded at FXO and decoded at FXS where it can be heard. Certainly the echo was being generated at FXO analog interface, so if I took the time to test all FXO impedance and gain options, probably the echo would disappear completely.

But it is something that scared me at first: never had echo in a normal telephone, and a basic problem like this appears in a very advanced ATA... This is again something that Asterisk server could be of help, because a computer can run a more powerful echo cancellation line (3102 line has only 8ms, the echo I was experiencing had 150ms or more).

3) Putting the ATA as the network router with PPPoE (i.e. getting the public IP address) improves VoIP a lot since all NAT problems disappear at once. But the 3102 router missed one crucial feature: DynDNS update, negating the advantage of having an ATA in the Internet, since I depend on DynDNS to redirect the SIP service to my ADSL.

A business would certainly get another ADSL line, a handful of publc IP addresses, and connect the ATAs to them. But it is something that I can't afford, and I don't use the phone that much, after all :)

4) The SIP phone just didn't feel right in a analog telephone. It doesn't have an alphanumeric display (even though mine has Caller ID so at least the Gizmo SIP number would appear), and you cannot type a true SIP address in the keyboard. I thought that it would feel better than a SIP softphone, but I was mistaken. The softphone is better.

Now I am convinced that a true VoIP phone must be an appliance especially designed for VoIP/SIP. This allows for the users to explore the full power of SIP telephony. ATAs work when you need to use an outbound SIP provider to make cheap international calls, but it is just one of the many, many possibilities of VoIP.

5) When you have to use SIP behind NAT, SIP is *way* too complicated, and not all SIP providers do the NAT thing correctly. SIP is clearly for the future, when IPv6 is there, or if you run an Asterisk server in the NAT router.

In short, to enjoy the SIP VoIP, you need an Asterisk server and a softphone (or a true SIP phone). The ATA helps if your wife or your children want to call grandma cheaply, and/or as PSTN gateway, but it doesn't run the show by itself.

6) The SIP providers' service is still below the Skype par.

The provider that gets the nearest is Gizmo, but the call-ou quality for Brazil numbers is not as good as Skype's. I still have some Gizmo credits so I will try to call USA or Finland someday, to see if quality improves. Gizmo is steadily improving its presence on Brazil and allows you to have call-in numbers in some major cities.

Vono SIP service (from GVT, a Brazilian telecom company) is very good, does the NAT thing right, but from the SIP point of view it is very limiting, since it does not allow you to call other SIP phones. It is just to make cheap calls and allows you to have a point of presence (i.e. a telephone number) in most big Brazilian cities. Also, it ceases to be cheap when you call numbers outside GVT area. Since I already have a telephone number, it does not interest me.

I contacted Voip55, a SIP provider that appeared in Google ads. They offer just call-out at cheap and pre-paid rates (cheaper than Vono). Seemed just like a good idea so I filled the form to receive further instructions to get a test account.

In the next day (too much time, IMHO) I received instructions to buy credits for a full account (that would cost around US$ 50, while the test would cost just US$ 5). I could see that e-mail was their workflow document. Attached to it was a query of my name to the Internal Revenue Service! Not very kind, and they wouldn't even hide the query from me. Rude and stupid.

I replied that I wanted a test account, not yet a full account, and the secretary replied with an one-liner "so fill the test account form at Web site". That was exactly what I had done. How the people expect to attract customers that way? Skype, Gizmo et al. sell credits via credit card, no questions asked.

So, now I'm back to Skype and Gizmo softphones, looking for a SIP phone in the future.

2007/04/07

VoIP sickness progressing, now I have my own registar :)

I was still at unrest because I couldn't have my own SIP registar. Yesterday I Googled a lot again, and again found the OpenSER software.

I had avoided OpenSER before since it has a reputation of being extremely difficult to configure, but this time I found a 'hot' information that OpenSER does NAT translation in belalf of users, and also found an "OpenSER" wizard to aid first configuration.

The main complaint is that parts of OpenSER configuration are scripts, not switches. Personally I found myself at ease with this.

Well, I used the wizard, configured the items that wizard cannot do for you e.g. creating the MySQL database and SIP users, and put it to run. Magic: it translates all SDP sessions transparently, you don't need to configure anything at client side (not even STUN server).

To say the truth, OpenSER does not do RTP relaying by itself, but it possesses all the needed "intelligence" for it, and can drive a relay software like RTPProxy. It is just a matter of installing rtpproxy and pointing OpenSER to rtpproxy control socket, the rest comes by itself.

Probably Asterisk can do the same as OpenSER does (and much more) but for an evening experience, it helped me to do what I wanted.

So now I have my own SIP domain and phone. I'm not sure if I will use it in place of Gizmo; my Gizmo account has dial-out and other nice capabilities. But I feel good :)

2007/04/06

The VoIP virus has bitten me :)

In the last few days I have played quite a lot with VoIP. It is funny because I was never interested on the subject while everybody else was (around 2 years ago) and now that everybody lost the interest on that, I caught the "disease".

Anyway, the VoIP technology is far from settled. As I could see, there are three main groups of competitors out there:

* Skype, that is proprietary, closed and secret but offers a complete, free, functional and easy-to-use solution;

* "Closed" SIP networks that follow a traditional telecom model: SIP-to-SIP calls are only allowed within the same provider, calls to outsiders must go through PSTN even if the other end has a SIP address. In Brazil, GVT Vono is in this group (very good service indeed), it seems that Vonage and most other businesses follow the same model;

* "Open" SIP networks, that allow free SIP-to-SIP calls and only bill calls that go thru PSTN.

I began to use Skype to talk with my manager and also to allow my wife to make cheap calls to her family that is 3000km far from here. The importance of the service made me to think about buying a cordless phone with Skype software (Netgear SPH200D) but the price tag is a bit high, and it is not easy to find this one in Brazil.

Also, as a free software developer and supporter, the Skype model annoys me a bit, in particular running a closed and secret software in my machine. I'd feel a lot better if it ran in an appliance, so if it were attacked (unlikely to happen anyway), at least would not be my PC.

In the other hand, SIP ATA hardware can be found in every corner here, due to the fact that most VoIP providers do use SIP protocol, and in particular due to Vono's success.

Unfortunately the Vono service is of no use to me, since it bills long-distance calls as if it were a normal PSTN call (my wife's parents have no computer) and does not allow SIP-to-SIP calls. It uses SIP protocol but does not buy SIP philosophy.

The SIP protocol has a very bad interaction with NAT, but everybody has NAT nowadays... In theory, anybody can put a SIP phone available in the Internet, a DNS name (even DynDNS) is all people need to find you. This is true when the VoIP software or appliance has a public IP address. If it does not, things get a lot more complicated. IAX and Skype protocols are much more well adapted to NATs.

To remedy this, enter the NAT-enhanced SIP proxy. It is a SIP that accepts user registration, makes and receives calls in behalf of them, and more important, rewrites SDP media descriptions so the RTP data flow passes through an intermediate server instead of peer-to-peer (which is utterly difficult with NATs in the way).

That is essentially the service all SIP VoIP providers do for you: a data relay to circumvent NAT. Providing a registar service without media relay would be dirt-cheap; the media relay is the "expensive" part since the network connection must have network bandwidth to retransmit all conversations (around 32kbps per client, given an average codec like G.729).

Most SIP software and ATAs have STUN support these days, there is automatic detection of the (few) lucky terminals that have public IPs, who can avoid the relay and do true P2P conversation, with the additional advantage of reducing latency.

Of course I would like to have an "open" SIP service (i.e. being able to call any other SIP number), without having to change my small network (i.e. keeping NAT). Apart from Vono, I tried two services: FreeWorldDialup and SIPPhone/Gizmo. I have accounts in the two right now.

SIPPhone is certainly the best. The configuration directions were much clearer, it was just a matter of reading the e-mail, configuring X-Lite and everything worked well. The thing is even easier if you download Gizmo, a closed-source client for SIPPhone. It is pretty much like Skype: just asks account name and password, and everything works.

Even the Gizmo call-to-PSTN rates are similar to Skype, so I would say that Gizmo is trying to be a kind of "Open Skype", that is, offering a verticalized solution with PSTN gateway but keeps open doors for non-Gizmo SIP softphones, as well as SIP hardware.

This is good news since, as I said, SIP ATAs are cheap and can be found in every store. Also, it allows SIP-to-SIP calls, so it is a true part of SIP ecosystem and gives Gizmo a escalability advantage over Skype. My doubt is whether Gizmo will make enough money to keep operations in the long term (well, Skype is well off, so it may happen for Gizmo too.

FreeWorldDialup (FWD) provided directions but they failed to work in X-Lite. Either I got an 600 error, or the calls did not receive audio, or the audio would not be sent, or an authorization failure would happen. After some digging in FWD forums, I found that FWD SIP servers have issues with X-Lite, using an alternative server made the thing work. Both STUN server and SIP proxy must be configured, the instructions did not state that clearly.

So, in conclusion, FWD works, but it is not user-friendly. A simple change in SIP proxy server (to remove the 600 error issue) and instrutions made more clear would improve a lot the friendliness of the service.

FWD has an interesting "call out" scheme, quite radical but very innovative. You must connect an Asterisk server to your PSTN line, so you become a VoIP-PSTN gateway and people can make PSTN calls through your telephone. In exchange, you get the right to do the same via the telephones of the other participants.

The rationale is to seize the free minutes every telephone has, so the increase in PSTN bill would hardly be noticed. The Asterisk server would be programmed to limit the number and distance of PSTN calls, to avoid a runaway bill. The more calls you allow, the more PSTN calls you would be allowed to do.

Honestly I don't believe that this scheme will work, but it is nevertheless inovative. IMHO the main problem is to convince people to allow others to use their telephone, and on top of that you would need to keep a 24x7 Asterisk server running. If FWD could provide a modified firmware to some popular ATA, things would be a bit easier.

So, now I have a Gizmo SIP account, and will probably buy an ATA to use it without a computer, so I no longer need SkypeOut.

I still have the wet dream of having my own SIP domain account. Since I have my domain server with public IP, I tried to find some SIP proxy software to install on it. The nearest candidate was Siproxd, but it is aimed to be installed in the NAT firewall, not in an external machine. I tried to make it work that way, but I quit in the SDP/RTP translation part; I would need to add STUN support and it is not a task for just a couple evenings. (If someone knows a SIP proxy server with SDP/RTP relay that works well as a public service, let me know!)