libphonenumber
Library for parsing and validating international phone numbers
Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers. The Java version is optimized for running on smartphones, and is used by the Android framework since 4.0 (Ice Cream Sandwich). libphonenumber gets the type of the number based on the number itself; able to distinguish Fixed-line, Mobile, Toll-free, Premium Rate, Shared Cost, VoIP, Personal Numbers, UAN, Pager, and Voicemail (whenever feasible). Provides valid example numbers for all countries/regions, with the option of specifying which type of example phone number is needed. Quickly guesses whether a number is a possible phone number by using only the length information, much faster than a full validation. To include the Java code in your application, either integrate with Maven (see wiki) or download the latest jars from the Maven repository.