Although modem hardware is capable of detecting almost any kind of analogue signal, manufacturers of modem chips do not put all of this functionality into the modem chip firmware. Modems are not designed to detect DTMF signals, they have no need to detect DTMF signals. However they will produce DTMF signals generally for signalling purposes such as dialling. Your request is not an appropriate use of a modem. If your need to detect DTMF signals is for a hobby project then its easy to make a small circuit on veroboard using a DTMF detection chip. Otherwise contact the modem chip manufacturer for the source code to the firmware and make the changes yourself.