The North American Numbering Plan is a system for three-digit area codes that direct telephone calls to particular regions on a public switched network (PSTN), where they are further routed by the local network. It is applied to the United States and its territories; Canada; Bermuda; and many Caribbean nations. Despite the "North American" name, Mexico and the Central American countries are not part of the system.
In order to facilitate direct dialing calls, the NANP was created and instituted by AT&T, then the U.S. telephone monopoly, in 1947. Originally there were 86 codes, with the biggest population areas getting the numbers that took the shortest time to dial on rotary phones. That is why New York City was given 212 (a total of 5 clicks, 2+1+2) and Los Angeles given 213, while Vermont received 802 (a total of 20 clicks, 8+10+2).
At first, area codes were in the form N-Y-X, where N is any number 2~9, Y is 0 or 1, and X is any number 1~9. The restriction on N saves 0 for calling the operator, and 1 for signaling a long-distance call. The restriction on the second digit, limiting it to 0 or 1, was designed to help telephone equipment recognize the difference between a three-digit area code and a three-digit prefix to the telephone number. For example, when a caller dialed "1-202-555-1212", the switching equipment would recognize that "202" was an area code because of the middle 0, and route the call appropriately. If a caller were to dial 1-345-6789, the 4 would be recognized as a long-distance call within the area code and routed as such, without waiting to see or guessing at how many digits the caller meant to enter.
In the late 1980s and early 1990s, NANPA (then still part of Bellcore) began to urge and later require all long-distance calls within each area to include the code, so that badly-needed prefixes with 0 or 1 in the middle could be assigned to local telephone exchanges. As of 1995, the continuing increase in the need for more area codes (both splits and overlays) forced NANPA to allow the digits 2~8 to be used in new area code assignments, with 9 being reserved as a "last resort" for potential future expansion. Area codes, or "number planning areas" ending in double digits, such as toll-free 800, 888, 877, and 866, personal 700 numbers, and high-toll 900 numbers, are reserved as "easily recognizable codes" (ERCs) and are not issued to actual areas. (Nevada was declined lucky 777 for this reason, however the Florida Space Coast area did get the 321 "countdown" area code.)
The overlap between area codes and exchanges prefixes has occasionally produced some confusion, because the three digits can be the same for both. Nashua, New Hampshire, for example, has a local exchange that begins 888, which is also an area code for toll-free calls. If somebody in Nashua means to call 1-888-555-1212 but forgets the initial "1" they will actually dial the local number 888-5551. This however is generally not a problem in major metropolitan areas with overlapping area codes, which were mandated to dial all ten digits for all locals calls by the FCC so as not to give new numbers a "disadvantage".
In TV shows and movies originating in the USA, 555 is used as the first three digits of fictional telephone numbers so that if anyone is tempted to telephone a number seen on screen, it does not cause a nuisance to any actual person. However, not all numbers that begin with "555" are fictional--for example, 555-1212 is the number for directory assistance in many places. In fact, only 555-0100 through 555-0199 are now specifically reserved for fictional use, with the other numbers having been released for actual assignment. Some movies have gone to creating fictional telephone numbers starting with "1", giving someone a "telephone number" of 167-1402 in the film, for example.
The North American Numbering Plan Administration (NANPA) is now overseen by the private company NeuStar Inc, who will face the task of adding at least one or two digits to the system within the next 25 years, likely before 2030. During that time, all public and private phone systems on the continent will have to be upgraded and reprogrammed (or even replaced) to recognize the new dialing rules. The plans being considered now add a 1 or 0 to the end of the area code or the beginning of the local 7-digit number (or both), which will require mandatory 10-digit dialing (even for local calls) be in place everywhere, well before the transition period. Other vertical service codes, such as *69 (callback) and *70 (suspend call-waiting), are also getting an extra digit, as have long-distance service provider codes such as 10-321 (now 10-10-321), all requiring the coordination of NANPA.