Occasional DTMF recognition errors in AGI script


I wrote an AGI IVR script for handling calls to a small company. Calls come from two analog PSTN lines to a TDM400P card and Asterisk version is
Whenever an input from the caller is needed (their PIN code etc), there is a serious DTMF recognition error risk. From a high quality analog phone, I get errors only when digits are entered too fast. But from a medium quality analog phone, even gentle inputs lead to errors (And my callers might call from any kind of phones).
No matter I use GET DATA command or loop WAIT FOR DIGITS, the error (Result=-1) shows itself occasionally. The worst part is that the communication between AGI script and asterisk is lost after the error (My callers say that my IVR script hangs sometimes!!).

I heared that unlike some other telephony cards, TDM400P does not have a hardware DTMF detection and it is done in software by Asterisk. is this a reason for weak DTMF detection?
Is there any workaround for my problem?

I hope this is not simply an Asterisk weakness because then it would be one that makes Asterisk useless.

Best regards