http://svn.scottstuff.net/project/asterisk-lca-map/
From the website:
asterisk-lca-map extracts information about the telephone “Local Calling Area” for a given phone number and then produces a block for Asterisk’s extensions.conf file that will route all calls for the LCA via a specific macro. One use for this is to allow 10-digit dialing for the entire US, where free local calls are routed via a POTS line and long-distance calls are routed via a VoIP provider.