, Blue Ink wrote

@W3bbo: you may want to try libphonenumber. The online JS demo handled perfectly all the numbers I threw at it, from several countries.

As an added bonus, it distinguishes between mobile and landline where the numbering plan permits it.

Very cool find!