From aa-asterisk.org.uk wiki
There are a number of software libraries and packages for dealing with telephone numbers.
These are written in a variety of different languages.
A Java library for validating and formatting telephone numbers worldwide.
- gist.github.com/3639800 - Java implementation example
- github.com/lox/libphonenumber-rest - a REST wrapper for libphonenumber
- github.com/davideme/libphonenumber-for-PHP - PHP port
- github.com/bramp/libphonenumber-php - PHP bindings for libphonenumber (incomplete)
- github.com/damncabbage/libphonenumber-php - PHP port (abandoned)
- bitbucket.org/pmezard/libphonenumber-csharp - C# port
- bitbucket.org/kogir/libphonenumber-csharp - C# port for NuGet
- nuget.org/packages/libphonenumber-csharp - NuGet package for C#
- github.com/daviddrysdale/python-phonenumbers - Python port
- pypi.python.org/pypi/phonenumbers - Python port
- github.com/stefanfoulis/django-phonenumber-field - phonenumber field for Django
- github.com/Socialcam/node-libphonenumber - NodeJS app for Heroku
- github.com/mattbornski/libphonenumber - NodeJS port, packaged for npm
- rubygems.org/gems/libphonenumber-execjs - ExecJS wrapper for Ruby
- github.com/joenoon/libphonenumber-execjs - ExecJs wrapper
- github.com/habermann24/libphonenumber-ruby - Ruby port (incomplete)
- stackoverflow.com/questions/11528017 - libphonenumber standalone without masses of google dependencies
- www.codeproject.com/Tips/452170 - how to use libphonenumber for iPhone apps
- blog.appharbor.com/2012/02/03/net-phone-number-validation - net phone number validation with google libphonenumber
A mature Perl library for validating and formatting telephone numbers, by David Cantrell.
Originally only data for the UK and various NANP countries was included. In late 2011 the package was modified to allow the import of number plan metadata from libphonenumber.
There's also more detailed data for the UK available as an optional add-on:
- metacpan.org/release/Number-Phone-UK-DetailedLocations - Perl
- github.com/DrHyde/perl-modules-Number-Phone-UK-DetailedLocations - Perl
- More information can be found on the Ofcomverter page.
Format UK Phone Numbers
A basic PHP routine for formatting UK telephone numbers, by James Cridland.
It's one of those rare bits of code that actually gets it right for all UK formats and number ranges.
The resultant CSV file can then be imported into a spreadsheet or database.
- National Telephone Numbering Plan
- Number format
- Charge group
- Area code
- Trunk code
- 01 numbers
- 02 numbers
- ELNS areas
- Mixed areas
- Regular Expressions for Validating and Formatting GB Telephone Numbers
- Local dialling rules for GB telephone numbers
- Errors in Cisco UK Numbering Plan Documents