Automated DTMF

Let users on your telephone system, often place calls where they have DTMF dialing the same sequence of numbers (PIN code, navigation through voice menu, testing GSM gate, etc.).

The Asterisk has several options allowing automatically send DTMF (tone signals, most often used for extension dialing an extension number or voice menu navigation) after answering the call.

The function SendDTMF() – one of those options.
Example of use:

exten => 7777,1,Dial(SIP/8888,120,M(senddtmf,5555555#))

exten => s,1,Set(DTMFSTR=${ARG1})
exten => s,n,Wait(0.5)
exten => s,n,SendDTMF(${DTMFSTR},500,500)
exten => s,n,Wait(0.5)

If the peer 8888 is expected after answer any extension dialing, then the call to 7777 will dial 8888 and after answering an asterisk send number 5555555# as DTMF and is connected to the calling party.

We have SendDTMF options allow to adjust the pauses between the individual set of numbers (or letters), as well as the duration of the tone. You can also select a different channel to sending tones instead of the current. Adjust pause between numbers can be another way: w symbol in the transmitted string will be replaced by a 0.5 second pause.

The DTMF mode by RFC2833 (dtmfmode=rfc2833) the proposed scheme works fine. However, in mode in-band (dtmfmode=inband) error occurred: for example, if the number contains a sequence of repeated digits, then transferred to only one of the whole sequence. This bug has been noticed in asterisk issue tracker but did not get enough attention: SendDTMF fails for repeating number . Perhaps in the new versions of Asterisk it is not observed: the error was detected when interacting between versions 11.17.1 and


Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.