Use gint16 and G_PI.
https://bugzilla.gnome.org/show_bug.cgi?id=602465
It looks at raw audio data and emits messages when DTMF is detected. The dtmf detector is the same Goertzel implementation used in FreeSwitch and Asterisk. It is in the public domain.