The currently implementation might not be very performant or accurate. We should adapt code from spandsp/src/dtmf.c