In most "analog" cases, there isn't a telephone handset that is performing any DTMF decoding operations. On POTS, there's typically a separate device such as an AUDIX PBX, a DMS-100 switch or an answering machine with an IC (Integrated Circuit) chip that performs the signal processing--such a chip is known as a DTMF receiver. Regardless of what ultimately processes the frequencies, sometimes systems will implement security features to prevent precisely what you're describing; for example, muting the caller and/or callee microphone/keypad/etc. These are ways to ensure that decoded DTMF tones originate from the intended source.
In order to prevent red-boxing, some payphone would mute the handset until a coin was deposited. Although it applies to ACTS tones as opposed to DTMF, the countermeasure is conceptually the same. This safeguard could still be abused by simply depositing a single nickel and then using a tone dialer to simulate depositing the remaining coins. (Note that the initial coin deposit unmutes the mic such that the authentic ACTS tone it causes can be handled properly). Alternatively, an "op-redirect" such as dialing a Carrier Access Code (CAC) could be utilized to force operator-assisted dialing which would also unmute the mic, so the operator's trunk is able to receive any ACTS tones (whether they be authentic or not.)
It's possible that call boxes on apartment buildings are susceptible to such vulnerabilities. I know that one location I was a resident of recently was mandating that their tenants subscribed to Google Voice. I didn't live at the site long enough to witness this approach in action, but I suspect it may have been related to the fact that SIP emulates DTMF with INFO requests as defined by RFC4733.