DTMF masking on the outgoing channel


         I am new to Asterisk and i was wondering if somebody can help me with a suggestion regarding DTMF tones. As far as i understood so far, Asterisk will detect the DTMF tones on the incoming channel and regenerate them on the outgoing channel.

         There is nothing i can find about DTMF masking, which confuses me, because if the above is correct, that would mean that Asterisk would only need to skip the tones being regenerated. Which seems trivial. So it is either my above understand is incorrect, either incomplete ( configuration? )

         How can i implement DTMF masking on the outgoing channel? Even if that would mean the tones are overwritten with dummy values, if removal is not possible. All i need is a hint for the right direction :)

Thank you guys,

I don’t understand what you mean by DTMF masking on the outgoing channel. In a properly configured system the DTMF is removed on the ingress audio stream.

Simply put, for a call between two parties (A and B) thru an Asterisk system, i want to be able to process DTMF tones sent from A, but i don’t want B to hear the tones. And the same for B to A

I figured out how to process the tones, AMI or ARI seem good choices to built something (and probably there are other), but i can’t find any option on how to suppress the tones on the “way out”

The channel driver or the remote side (if given to Asterisk out of band) is responsible for suppressing the tone from the audio stream. There is nothing an end-user or a developer has to do except ensure the system is set up properly.

1 Like

Do you actually want Asterisk to not pass through the DTMF instead? If so that depends on how exactly stuff is established…

Yes, that is the right term :slight_smile: i want to disable the DTMF passthrough, if not per channel ( or other context ) then system wide

What i understood is Asterisk extract the DTMF tone, remove it from the “source” channel and then re-generate it on the “destination” channel. That is what i’ve read, i might have misunderstood it

Also by looking at the events raised by AMI i can clearly see 4 events for each tone, Begin/Received, End/Received, Begin/Sent and End/Sent.Since this is a two step process, and clearly in the boundary of how Asterisk works there has to be a way to suppress the second "step. I find it hard to believe there is no option to fine-tune this process

I am sorry for the long chat, just looking for a pointer


In a bridged scenario the expected behavior for almost everyone is for DTMF to just pass through, there’s only particular cases where the behavior is questionable (such as in a conference bridge). Using something like Dial there’s no option. What scenario are you wanting to control?

“almost” is the key word :slight_smile: If the tones are actually sensitive informations like a credit card PAN, and the callee is a call center agent, then optimally the tones should not pass thru, or be masked with something else for PCI/DSS compliance reasons

For the conference scenario, do you know how can i supress the tones for everyone in the conference, if selectively might be challanging?

There is an option to ConfBridge (dtmf_passthrough) which configures whether DTMF is passed through or not. It defaults to off.

Thank you very much and once again apologize for the long thread :slight_smile:

@ovidiu78 did you ever get anywhere with this? I also have a similar requirement - we have agents in queues and want to strip DTMF tones both outbound or inbound from the queue.