The thing I find interesting with dialing codes is a town the size of Knutsford get's it own dialing code (01565) and doesn't share it with other towns only neighbouring villages. Yet it seems every village, town and city in Greater Manchester has the 0161 dialing code. (I realise you have to dial 7 digits after 0161 opposed to 6 digits.)
Manchester is one of the original director areas (London (01), Birmingham (021), Edinburgh (031), Glasgow (041), Liverpool (051) and Manchester (061)).
In these areas, the three digits after the STD code refer to an exchange name - historically they were all married up to letters on the dial. This allowed the exchange equipment (mechanical Strowger exchanges) to route the call based on these, and for direct lines to commonly used exchanges to be used rather than tying up equipment to/from a larger centre.
For instance, ARChway exchange in London was 272. The concept of dialling exchange names, rather than numbers, disappeared in the mid 60s to allow for expansion, after which some codes were adjusted for technical reasons and others added (so Upper Holloway ATE, historically having numbers starting 272, now has numbers starting 281 and 263, which do not have names). At the same time, phones stopped being issued with lettered dials (until they started being used for e.g. texts on push button phones!).
STD codes in general marry up to their place names. The first digit is an 0, which is not really part of the code but an instruction to the system that you wish to call another exchange. The second digit, 1, is a 'filler' from the changes to phone numbers. The next two are alphabetical. For example, DOncaster, DOver, DOrchester, FOlkestone etc all have the first two letters corresponding to "30". The final number was allocated according to the number (or expected number) of subs in that area - the busier places allocations starting from 2, up to 0 for quiet ones (remember that a dial telephone takes significantly longer to dial a 0 than a 2, so it was thought that the busier calls should be made quicker to dial). Hence Doncaster becomes 0302, Dover 0304 etc.
It remains common for people, especially within local areas, to give phone numbers as "Blackpool 123456" or the like. It was relatively common until the 80s/90s to have four- or five-digit numbers within an area - these are now quite rare although I know that subscribers in Buxton still have five digit numbers, I'm sure others exist. Until recently I believe that dialling the STD code if you were in that area resulted in either number unobtainable, to avoid trunk lines being used up unnecessarily.
Oh and whilst on the subject - a pet peeve, there is no such STD code as "0207" or "0208". The STD code is 020, and the 7 or 8 from 071 or 081 numbers was transferred to the subscriber's number - so if you live in the former 071 area and want to dial TfL you would dial 7222 1234 not 222 1234.
OK - I'm sure some of that will come in handy for a pub quiz somewhere!
--- old post above --- --- new post below ---
Letters on phone dials went completely out of use for some years, then of course came back with mobiles and Text Messaging. Of course, what has completely gone is dials themselves, it's been years since I last handled one (ironically in Poland), and the younger readers here have probably never done so.
It is relatively straightforward, with a little electronics knowledge and a copy of a wiring diagram, to wire up a phone to work with a modern line. There are various ones lurking in my workplace still in use, usually in obscure cupboards or plant-rooms which get forgotten about!