One of the problems you'll run into is that in larger countries like the US, and/or countries with greater amounts of telecom interconnection, competition and deregulation, this information cannot be reduced simply to a convenient algorithm.
The North American Numbering Plan (www.nanpa.com) does provide some basic standards for valid numbers, but aside from that, there exists no special numerological distinction between incumbent and competitive, fixed-line and mobile, or VoIP, and extensive number portability throws even more complexity into the mix. I'm not saying it can't be done - just be aware that the undertaking you're proposing is very complicated, and the information would come from innumerable data sources (a great deal of them commercial and expensive) and a bewilderingly overlapping array of standards bodies. For instance, something like this: > NZ Cellular: > area code 21 and 29 followed by 6, 7 or 8 digits - Vodafone GSM > area code 27 followed by 6 or 7 digits - NZ Telecom CDMA > note that there is number portability so the above is a guide. ... sounds like a laughably, impossibly simplistic formula to a North American reader. And I can't imagine the situation in many other countries is much simpler. -- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users