Inband DTMF detection through external library

I am looking for some external library/tool which I can use to accurately detect DTMFs in a wav file. Currently the issue I face is that in few of our calls from our SIP Trunk, SDP contains media attribute “telephone-event” but still the DTMF is coming in the Audio as inband instead of being transmitted as RTP Event.
When I turn the dtmf_mode to auto, it only detects inband dtmf if there is no telephone-event attribute in the SDP from far end.
So I want to record the user’s voice and then process it externally to detect inband DTMF. Please let me know if someone knows some good tool or library to detect DTMF from wav file.
also alternatively
Is there a way to force asterisk into listening to Inband DTMF even in case the “telephone-event” is there. So in case “telephone-event” is there in the SDP we can not be sure if the DTMF will reach to us as RFC or Inband, in this case I want to listen to both and detect whatever is available?

A post was merged into an existing topic: Listen to Inband DTMF even if telephone-event media attribute was present in SDP