Hacker News new | past | comments | ask | show | jobs | submit login

I had to deal with International phone numbers before. Obviously, I had to deal with other issues, too, but the phone number was the important piece. Early on, before PayPal or other services caught on, we created a system to verify credit card users with their telephone. They would enter their telephone number and we'd call them. It was simple.

The problem was with international users. The system was simple: it would call the exact phone number the user entered. This meant we really wanted to get it right the first time. The other problem was that we had a single call center setup out in New York. This meant international callers needed to be called with special country codes and what not.

Now, I feel it's safe to say if you ask someone in Europe to give their phone number, they are going to give their phone number like they would to any of their friends. They aren't going to enter in the country code, and they aren't going to know to prefix it with a special code so that an automated system from the US can call them.

The thing is, it's not fair for me to simply provide them with the requirement "Give us your phone number so we can call you from New York, USA." It really isn't professional.

So, I spent some time (lots of time) reading up and learning about international phone numbers, and coding together a system that went a long way toward fixing this problem. A user could enter in their phone number, and if they didn't enter in a country code, we'd be intelligent about it and add it for them. How did we know where they lived? Two sources: CC Info and the IP address. We could be intelligent and assume the two should mostly match up. Obviously, if the CC address was the US, and the IP was somewhere off in Asia, red flags beyond just the errors for phone numbers would popup (but, even then, you had to be careful!).

I spent a lot of time fine tuning the system, working hard to make sure that a phone number would get through however the user entered it, and we could call. We had a really good success rate with numbers outside the North American norm. Enough that the cases that did fail I couldn't even figure out manually.

I was a bit saddened that it was all for nothing when we eventually removed the 'feature.' and the requirement for a phone number. I understand the reasons, but from a problem solving point of view, it was a lot of fun.




I don't think your assumption is right — if you tell a European to give you his phone number 'just as for SMS messaging', you'll always get the right thing, with the country code, beginning with a '+'.

To send a text message you have to use a full international phone number, so everyone uses them. You can't deliver an SMS message without a full number.


Couple things to consider. First, this was written up in 2003, and expanded on in 2004. I don't know if text messaging is as big then as it is now. Secondly, we weren't sending them a text message. While asking them might not hurt, we didn't want a cell phone. Asking for a phone number "just as for SMS messaging" might be more confusing. I'd rather just ask for the phone number, and fix it myself.

At least, that were my thoughts at the time.


That sounds like a really awesome bit of code to look at. Can you share it?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: