g1smd - 7:26 am on Sep 12, 2012 (gmt 0)
to be a valid number it's got to have 10 digits or a 1 followed by 10 digits.
Outside of the US and Canada and a small number of other countries that solution fails.
Check out [aa-asterisk.org.uk...] for UK phone number format details for example.
The solution to the original problem can probably be found in libphonenumber at: [code.google.com...]