Libphonenumber

From aa-asterisk.org.uk wiki

Jump to: navigation, search

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.


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:


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

Personal tools