However, I recommend that you tell us what you are actually trying to achieve
(without presuming that AGI is the best way to do it), so that we can perhaps
suggest better alternatives.
AGI generally means interaction (input / output) between the dialplan and a
script; asynchronous means that is no longer possible, so what do you really
want to happen?
Antony.
–
“The future is already here. It’s just not evenly distributed yet.”
You can spawn off another process, but you can’t have an AGI running on a channel asynchronously at the same time as something else. That’s essentially asking for two things to control a channel at once.
I want to capture the DTMF on the call without redirecting it to an AGI script to handle the DTMF.
May be we can create a callback whenever a digit is pressed, I am not sure as I am new to asterisk and still exploring the possibilities.
If you want to asynchronously/passively just see when DTMF digits occur while the channel is doing other things, AGI would not be that. AMI has an event[1] for it.
“AsyncAGI” is just Asterisk’s term for AGI-within-AMI. Your external script opens an AMI connection to listen for events as usual, and when a channel executes the application
AGI(agi:async)
then it enters the AsyncAGI state, and your program can use the AGI command to execute AGI commands via AMI.