Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

Good morning all,

I want to start recording with “press or say 1 to 5”. If no DMTF is pressed, I want to send the recording to Google Speech to get the number back (got that part working already).

If any dtmf key is pressed while Application_Record is running with option y, then the recording terminates and sends
RECORD_STATUS of “DTMF” (A terminating DTMF was received).

But I need to know what number that DTMF was, and I can’t see a way of grabbing it after the fact.

I can see in the code where the right variables are…


dtmf_response

  • \param dtmf_integer the integer value of the DTMF key received

So,3 questions I guess:

1: Am I going about this the right way? (unimrcp is not an option here)
2: If so, is anyone willing to make the simple code change to the file to improve it to send back the DTMF to the dialplan? For free to improve core code? If not, how much?
3: OR, explain in layman’s terms how a simpleton like me could copy, hack about with and make a new module, like, for example, app_record_alt.c, that would stick around each time I updated Asterisk from source?

So, ultimately, I’m hoping for something like:

Currently:
option “y” returns a RECORD_STATUS of “DTMF” if a key was press

Hopefully:
option “z” returns a RECORD_STATUS of showing which key was pressed.
Or possibly even DTMF_VALUE if an app can return two variables to the dialplan?

I’m sure this would benefit a lot of people.

Many thanks!