Currently Agora.io's Android SDK does not directly support playing audio on the caller side. This would need to be achieved using Android's Telcom package, more specifically implementing Connection, ConnectionService and ToneGenerator classes.
Whenever you start your call you may want to create a new tone, replacing <AUDIO STREAM>
below with the stream that you want to play the tone within, and replacing <VOLUME LEVEL>
with an integer (or enum) to set the volume level.
ToneGenerator dtmfGenerator = new ToneGenerator(<AUDIO STREAM>,<VOLUME LEVEL>);
dtmfGenerator.startTone(ToneGenerator.TONE_DTMF_0, 1000);
dtmfGenerator.stopTone();
For example if you want to leverage the Call tone using the above example, you would use ToneGenerator.TONE_SUP_RINGTONE
ToneGenerator dtmfGenerator = new ToneGenerator(ToneGenerator.TONE_SUP_RINGTONE,ToneGenerator.MAX_VOLUME);
dtmfGenerator.startTone(ToneGenerator.TONE_DTMF_0, 1000);
dtmfGenerator.stopTone();