Emulate pressing a key

Is there a way in extensions.conf to emulate pressing a key? I am playing a background video, but want to force a call into queue before the video has completed…without pressing a key.

I am using Asterisk 15.3 and pjsip.

Thank you,

AMI Action

PlayDTMF

Synopsis

Play DTMF signal on a specific channel.

It’s not clear to me which direction you are trying to send the digit. Asterisk will normally send the digit to the outside world, not to internal processing, although local channels can be used to play tricks.

What I am trying to accomplish is to (in extensions.conf) force send a DTMF digit, say 4, while a Background video is playing. Currently the user has to press the ‘4’ key to be placed into a Queue, but I would like them to see the Video and be automatically placed into the Queue (without waiting for the video to finish).

I am on Asterisk 15.3, using PJSIP.

Thank you,

Thank you,
I did try PlayDTMF and SendDTMF, but I still had to wait for the video to complete before anything happened. I don’t think the DTMF was sent to Asterisk, because if I manually press the digit, everything works correctly (the video is interrupted). (I am trying to control this in extensions.conf).

If you inject the DTMF to the correct channel side it should work,

I did try playDTMF(4,{CHANNEL}), and just sendDTMF(4), but the 4 is not being picked up until I press the 4 key. is {CHANNEL}, not giving me the current channel?
Thank you!

dont know if is the site that is removing the $ , try to see all chanels, core show channels

Sorry, that is a typo, I do have the $ there.

There aren’t enough commas and ${CHANNEL) is the default, and normally meanst the outgoing leg of the channel running the dialplan, which is normally headed outside of Asterisk.

I actually do have 3 comma’s when I review it, but for some reason it didn’t show it in my message, but here it is again
SendDTMF(4,25,25,${CHANNEL}), I put 25 as a placeholder in case something was causing the commas not to show if I had blanks.

I guess I thought the default channel is what I wanted; I just want it to be as if I pressed the ‘4’ key (because the dial-plan works correct when I physically press the keys).

Thank you,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.