I am currently using the following function to capture dtmf. Currently only the timeout and max digit options are available. Is there any other function which i can use for more control ? like i want to add finishkey.
That said, not much has changed. AGI is one of the earliest interfaces to Asterisk. You could continue to use GET DATA, perhaps with an initial audio playback with one max digit and then enter a loop that reads up to one digit at a time while playing silence, breaking on your “finishkey” and combining the user entries into a cohesive result at the end.
Alternatively, more flexible DTMF capture can be found with the Read() application. To combine inside AGI, you might try EXEC of Read(); however, your script will block, so this might not be what you want.