Number::Phone, now with added craziness!

drhyde on 2005-10-17T09:41:25

The database of the UK Specified Numbering Scheme, which I previously stored in some very large hashes, now lurks in a DBM::Deep database. Because neither ExtUtils::MakeMaker nor Module::Build really make it obvious to a simpleton like me how to bundle data files with modules, I decided to be Evil and bung the database in the __DATA__ segment of a module. Bwahahaha. This required a minor change to DBM::Deep, which Joseph Huckaby, the author, did very quickly. What a nice man! It also requires some minor gymnastics with IO::Scalar, but even with me slurping the entire database into a scalar in memory, the memory footprint is still much less than it was before.

Number::Phone 1.5 also has a new method, location(), which is intended to give the approximate latitude and longitude of a fixed line. I should probably go and register softwareforstalkers.com. So I can get it working for UK numbers, I need data on the locations of all BT's exchanges and which number ranges are served by each exchange. I know this data exists, cos ISPs use it to determine whether you can get DSL. But can I find it anywhere on BT's web shite? Can I hell. Free beer for anyone who can help with that.


might be getting harder

jmm on 2005-10-17T14:03:17

I don't know about U.K., but in North America there is a growing trend toward phone number mobility, where you can take an existing phone number and move it physically to a different home, or move it logically to a different service provider. That means that the exchange number will become increasingly inaccurate for determining physical location, and will require a dynamic database search rather than a static table lookup to resolve correctly. (This is especially and obviously true when you try to give longtitude/latitude coordinates for a cell phone.)

Re:might be getting harder

drhyde on 2005-10-17T14:29:23

There is only very limited number portability right now, so it doesn't matter much. As for mobiles - obviously it is completely impossible to know where they are without having access to the nyetwork operators' voodoo systems, so I'm not even going to bother.