There is no way for developers to do this via public APIs. Unfortunately, Android doesn't handle DTMF control very well. For example, there's a two year old feature request to allow a user to send DTMF controls at an arbitrary time during a call; it's been abandoned.
As you know, using ACTION_CALL
or ACTION_DIAL
and doing <number>|,;|<tones>
will send DTMF tones directly after a call is connected, but that's where user control over the issue stops.
Any additional controls, such as sending additional tones or muting the tone response to the handset, are handled by internal APIs, notable com.android.internal.telephony
. Of note is the stopDtmf()
method, which would possibly do what you're looking for, except that it's internal and may not have consistent behavior.
Here's what the 2.x source looked like for the method. As stated, there's no guarantee this would work and using internal APIs is strongly discouraged.