Asterisk AMI PlayDTMF to instantiate disconnect key combinat

I’m currently having a play about with AMI in Asterisk 11. I seem to of hit a snag where utilising the ‘PlayDTMF’ action will go out on the channel rather than be seen as incoming DTMF.

This is a bit of an issue, I’ve provided my features.conf file config below:

[code]Builtin Feature Default Current


Pickup *8 *8
Blind Transfer # #
Attended Transfer *2
One Touch Monitor
Disconnect Call * *99
Park Call #72
One Touch MixMonitor[/code]

I’m wanting to execute the *99 key combination over AMI to allow the call to disconnect. My AMI Action looks like this (developed in nodejs):

ami.action({ 'action': 'playdtmf', 'channel': e.channel, //this is the callers channel 'digit': '*99' }, function (err, res) { console.log(err); console.log(res); });

I receive a JSON response which tells me everything has been queued successfully. I can also hear the DTMF tones come through the SIP Phone

{ response: 'Success', actionid: 'xxx', message: 'PlayDTMF successfully queued' }

I have read references to interposing a Local channel on the first leg. How would I go about interposing a local channel while I have an ongoing call?

Thanks very much in advance!

You do it before you start the outging leg. Incoming dials Local/ Local/ dials outgoing.