Goertzel for reliable DTMF Decoding

Any suggestions on how to modify it to work? This is obviously not my code and the math is beyond me. So, if you have any suggestions or alternatives, let me know.

Thank you