Hi:
"Transcoding" is not the issue. Transcoding is when an already-digitized signal, which was digitized using one standard format, is decoded and re-encoded into another digitized signal. For example, CD-Audio transcoded into MP3 files.
Short history lesson: The telephone network, from the time of Alexander Graham Bell, was purely analog, consisting of a limited range of audio frequencies being carried over copper wire "loops". For a local call, the loop was between your premises and the central office. Between central offices were "long lines" (simply more pairs of wires). At first, telephone operators (picture
Lily Tomlin) plugged cords into jacks to connect the calls. Later, electromechanical stepping relays switched the calls for direct-dialed calls. Thus, the name Public Switched Telephone Network, PSTN. Each call was "circuit-switched": an end-to-end connection patched together.
Over time, this meant more and more bundles of wires, until the system couldn't handle it. Bell Labs eventually developed digital telephony. Each conversation was run through an analog-to-digital converter, changing it into a pulse-code-modulated stream of bits (similar to the bitstream on those Compact Discs). Those bits were multiplexed (combined) with other conversations' bits and carried over the wires, and later, microwave towers, satellites and fiber optic cables. To conserve expensive and limited bandwidth, and, importantly, to deal with the physics of signal loss and distortion, using the technology available at that time, scientists looked at the average frequency range of human speech, and decided how much of the bottom and top-end they could throw away, leaving an intelligible mid-range. This became the standard used to this day over the PSTN, the
PCM G.711 CODEC, which is a 64Kbps digitized bitstream, encoding frequencies at 8,000 samples per second, between 300Hz and 3400Hz
All the equipment in the PSTN is designed only to handle 64Kbps narrowband -- every electronic component, and other piece of hardware and software is only engineered to carry that level of frequency range. It simply isn't compatible with wideband audio. Think of it as the least-common-denominator, similar to AM radio -- AM radio has a very narrow bandwidth, by design, and FM radio has a wider, but still-not HD bandwidth, until digital HD radio came along.
VoIP doesn't have that restriction, since it uses packet-switched (not circuit-switched) RTP protocol over UDP (one of the simpler protocols in TCP/IP), which doesn't care what bits are being sent (it's just buckets 'o' bits, as far as UDP is concerned). So, any CODEC supported by the equipment at both ends can be used to transfer packetized data. It doesn't care if it's Morse Code, or a HD YouTube video, or a HD Voice phone call, as long as you have adequate bandwidth on your internet connections so the connection doesn't become saturated (like you see when trying to watch HD Netflix video when everyone else is doing the same thing at once).
Thus: IP phones, or any other VoIP hardware or software, can communicate using whichever CODEC they both support, as long as the call stays purely as TCP/IP data packets. This means, using SIP, for example, one endpoint sends a "HELLO" to the other's URI, and then the endpoints negotiate and set up the call. Once this is done, the bitstream just flies over the network.
Commercial SIP VoIP service providers (Such as Callcentric) support calls either being sent purely as SIP, URI to URI, or via the PSTN. Only the former method supports HD CODECs. In the latter case, calls are limited by the bandwidth specification of the PSTN. Services like OOMA, Skype and Google Hangouts similarly can either use direct TCP/IP or can step down to the PSTN as needed.
As a final note: the large telcos that have to support the FCC-regulated PSTN aren't really making much if any money on it anymore. Verizon and AT&T have dumped a lot of their landline business, and most of the legacy "Baby Bell" companies have merged to survive. CenturyLink and Frontier are two good examples of companies that are scraping along, with piles of landlines, much of which they inherited from bankruptcies and dumping by other telcos. The industry would like to get rid of the PSTN entirely, because it is so much more expensive to maintain than VoIP, but due to the hundreds of millions of people who depend on it, especially in rural areas, it's not going away anytime soon.