dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
546
david3
join:2000-03-21

david3

Member

[General] Utility for checking area codes

I wrote a small utility to check area codes. You can try it here, if it's helpful.

»www.kilovox.com/utils/ch ··· ode.html

Enter an area code to do a lookup. Or enter a 2 character state, province, or +1 North American country code to lookup area codes. Enter ? for a list of all area codes.

This uses data from from NANPA, the NPA database, npa_report.csv.

»nationalnanpa.com/report ··· npa.html

And also US/Canada data (city names by area code) from here:

»github.com/ravisorg/Area ··· Database

The data is loaded into a database.

The latter source is a little older, so there are some newer area codes missing city lists. I'm still working on filling those in manually. If anyone knows of a good source of public domain data for area codes, please let me know.

The city lists for each area code are not exhaustive, but should give a general idea of where the area code is located. Some of the Canada area codes have really long lists of cities.
mrjoe
join:2013-12-12
Israel

1 recommendation

mrjoe

Member

"I wrote a small utility to check area codes. You can try it here, if it's helpful.

»www.kilovox.com/utils/ch ··· ode.html"

love it, thank you! It works well

kenn10
join:2003-09-10
Highlands, NC

kenn10 to david3

Member

to david3
There is another one with more information here:
»localcallingguide.com/index.php
david3
join:2000-03-21

david3

Member

There are resources with more detailed information, like that one. I also like:

»telcodata.us/

For this utility, the goal is to get a quick sense of the area covered by the area code. That's what I usually find myself looking for if I'm making or receiving a call to an area code I'm not familiar with.

I've got asterisk set to send me an email when I make or receive a call, and this is part of the data that's included.

For incoming calls, I've got a cnam-lookup script that also checks the truecnam spam score through their api and also does an LRN and cnam lookup through the callwithus api. The callwithus cnam lookup also gives spam information I'm using with truecnam to determine whether to send the call straight to voicemail.

For outgoing calls, I've got a script that looks up rates at anveodirect, using the 250mb csv file of rates they make available, loaded into a database. I hope to make that available soon, too, but I want to test it a little bit more.

For filling in the missing data, I'm using wikipedia right now. I started to look at the detailed exchange info, but it took too long to map page after page of rate center information and abbreviations to actual city names.

»en.wikipedia.org/wiki/Li ··· ea_codes

It's not in csv format, so it's a data entry job. A public data source in csv format, or similar, would make it easier.
david3

david3

Member

I've got the missing data filled in now. Many of the area codes missing data were overlays, so I was able to use data from one of the older overlayed area codes. Area code 906 was missing any city data; the whole Upper Pensinula of Michigan, and that's been in service since before I was born.