Record and process wav file

I would like to create a dial string that when my users call in it prompts them to make a recording, then to press 1 when they are done. When they hit 1, I would like to then pass control to an AGI script that I would then use process the wav file. If the user just hangs up and does not press 1 I don’t want anything to happen, then call should just terminate, then wav file should be deleted, and the AGI script to process it should not be called.

I am not sure the best way to go about this. My initial thought was to create a dummy extension and use it’s voice mailbox to make the recordings. However, I am not sure if I will be able to achieve the functionality I want that way, specifically, to only process the wav file if the user presses 1 at the end.

Does anyone have any suggestions on how to achieve this type of call flow?

Sounds a lot like the Dictation module. Have a look at that.