Libphonenumber
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.
Contents |
libphonenumber
A Java library for validating and formatting telephone numbers worldwide.
There are official ports to C++ and Javascript and unofficial ports to PHP, C#, Python and others.
The libphonenumber code now also includes area code naming and/or geolocation data for some countries.
- code.google.com/p/libphonenumber/ - Java, C++, Javascript
- gist.github.com/3639800 - Java implementation example
- github.com/lox/libphonenumber-rest - a REST wrapper for libphonenumber
- github.com/ksuther/objc-libphonenumber - a simple Objective-C/JavaScriptCore wrapper around 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
Number::Phone
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
Ofcomverter
A Python package for debian to download the Ofcom codelist.zip file containing the National Numbering Scheme in a set of CSV files and turn it into a PostgreSQL or MySQL database, by GaryH and bootc.
- 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.
Ofcom-CSVerter
A PHP library for processing Ofcom's sabc.txt file and automatically correcting long-standing typos and errors in the file.
The resultant CSV file can then be imported into a spreadsheet or database.
See also
- National Telephone Numbering Plan
- Number format
- Charge group
- Area code
- Trunk code
- 01 numbers
- 02 numbers
- ELNS areas
- Mixed areas
- Sabc.txt
- E.123
- NDO
- NDC
- NSN
- (0)
- Regular Expressions for Validating and Formatting GB Telephone Numbers
- Local dialling rules for GB telephone numbers
- Errors in Cisco UK Numbering Plan Documents
