Telecom local routing primer
The following is a nice summary of local telephone routing written by Mary Lou Carey at BackUP Telecom Consulting.
Routing is determined by the NPA type of that area AND by the local calling guide established by the LEC (Local Exchange Carrier). Everyone can set their own local calling areas as far as rates are concerned, but you will be charged CABS (Carrier Access Billing) according to the way the LEC established their local calling area for each rate center. (Rate centers are established by the NANP (North American Number Plan)and can be a city, a portion of a city or a group of cities. They are listed in the LERG, and on several other websites such as localcallingguide.com, nationalpooling.com and nanpa.com.
Seven-digit dialing is only used in areas where there is one NPA for the local area. Ten-digit dialing is used in areas where there is an overlay (more than one NPA per local area) and 11-digit (1 plus) is used in areas where there was an area code split. The difference between a split and an overlay is that a split required everyone (existing and new end users) to change their NPA to the new area code. Overlays allow you to assign numbers from the new NPA to new end users but allows the existing end users to keep their old NPA.
LECs typically break up their local and EAS (Extended Area Service) calling areas by rate center and while local calling areas are limited by rate center boundaries, local calling areas can vary by rate center. For example, someone in Nashville TN can make a local call to both Murfreesboro and Franklin, but a person in Murfreesboro cannot make a local call to someone in Franklin.
Every NPA-NXX is assigned to a specific rate center and a specific switch. A switch can cover multiple rate centers and local calling areas, so the LECs set up call scenarios that detail the dialing requirements and how the call will be routed. They begin by adding every NPA-NXX-X associated for that particular switch and map out which NPA-NXX combinations require 7-digit dialing. Then they set up a scenario for each call type determined by route.
So if your end user calls another one of your end users in the same rate center, it's going to use scenario A in which the switch will route the call directly itself and only require 7-digit dialing. If your end user calls someone on the B list (let's say that list contains all the NXXs within the same NPA), then require 7-digit dialing and route the call to the local tandem trunks.
I could go on, but basically the concept is that after you determine the dialing requirements for each rate center your switch covers in a particular LATA (Local Access and Transport Area) and the available routes the call has to take, you set up call scenarios in your switch to cover each dialing requirement / route combination your switch will encounter.