Catching DTMF with Manager API

I’m building an app to connect to the manager API. So far everything is fine, but I also have to be able to receive DTMF events through the manager API.

I have been searching, but I haven’t found a way to do this. All I found was a post of someone wanting to add this feature a couple of months ago:

Is this possible, and if so, how?

Thanks for your effort.

There is not a direct way to do this but there may be a couple of work arounds. First, you may use the ManagerAPI in conjunction with a logic set in extensions.conf to capture DTMF in a variable and then obtain that variable via the ManagerAPI using a command like this: … tml#GetVar

Or as part of your logic you may trigger a call that ends up at an AGI and collect the digits this way, using this command: … s_get_data

Thank you for the solution, I am now using the first option:

exten => s,1,Answer()
exten => s,2,ResponseTimeout(60)
exten => _X,1,NoOp(dtmf-${EXTEN})
exten => _X,2,Goto(testdtmf|s|2)
exten => _#,1,NoOp(dtmf-${EXTEN})
exten => _#,2,Goto(testdtmf|s|2)
exten => _,1,NoOp(dtmf-${EXTEN})
exten => _
exten => i,1,Goto(testdtmf|s|2)
exten => h,1,Hangup
exten => t,1,Goto(testdtmf|s|2)

PS: I don’t use _. so as to only get one DTMF at a time