How to send automatic DTMF

I am trying to make a system and I want automatic digits pressing during the call.

this command will help you:


Argument Description
digits List of digits 0-9,*#,abcd
timeout_ms Amount of time, in milliseconds, to wait between tones. (defaults to .25s)
duration_ms Duration of each digit, in milliseconds
channel Channel where digits will be played

I tried this but that’s not working. is it specific to some versions? I am using Asterisk 16.30.0. When I dial it just plays a very low sound and the call ends but does not press digits like the sounds of numbers.

Although 16.30.1 will be end of life in about a month and 16.30.0 has known security vulnerabilities, SendDTMF has existed for a very very long time.

You need to explain what you mean by during the call, and what will trigger the sending.

I have a CSV file where I have some data like caller_ids, spg_id etc. and the data is in LACS. Now I need to call from these numbers to constant and only system numbers like 828 etc. and need to update the spg_ids. If I do it manually it will take me time to update every spg_id and data. so I want automatic DTMF entry pressing by the system. The Keys are constant. like first system should press 1, then again 1. then fetch the spg_id from CSV and then start pressing the spg_id with a 3s delay between each dtmf and # symbol at the end of like 3928331838237331# then 1, 2 and then again fetch the card_numbers’s last 4 digits. for every caller_id. Now the digits 1,1 should be constant and only spg_id and card_numbers’ 4 digits needed to be updated only.

I am developing a system where i want to achieve is that when someone calls on pjsip user 1000. we play ivr for 20 seconds and then after 20 seconds we have to press the digits manually but I want dtmfs to generated after 20 seconds we have press 1, again 1 and then 32132178712321# , 1,2 and then call should hangup we have pause of 3 sec between every dtmf.
I don’t know which approach I can use to achieve this. Please help me in this regards. SIPp is not essential just I want if it can be done with only asterisk then that’s also perfect.

You will need something like AMI for that, as you are trying to do it asynchronously with respect to the call and to user actions: PlayDTMF - Asterisk Documentation

As SendDTMF now allows you to specify a channel, I suppose you could do it with Originate, started from an answer subroutine.

Thanks @david551 SendDTMF works for me. like sending automatic dtmfs.

The difficult part of your requirement is not sending DTMF, but rather doing so in the middle of a call without user intervention.

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