Hi, you can make it like this: in init add create tone generator ToneGenerator toneGenerator = new ToneGenerator(); toneGenerator.createToneGenerator(8000, 1); ToneDigitVector digitVector = new ToneDigitVector(); add tone generator to audio port in onCallMediaStateCallback, if (toneGenerator != null) { toneGenerator.startTransmit(mEndpoint.audDevManager().getPlaybackDevMedia()); } and then use this method for dtmf public void PlayDTMFDigit(String digit) { if (!TextUtils.isEmpty(digit)) { try { ToneDigit toneDigit = new ToneDigit(); toneDigit.setDigit(digit.charAt(0)); toneDigit.setOn_msec((short) 100); toneDigit.setOff_msec((short) 200); if (toneGenerator.isBusy()) { digitVector.add(toneDigit); } else { digitVector.add(toneDigit); toneGenerator.playDigits(digitVector); digitVector.clear(); } } catch (Exception e) { Log.e(this, "", e); } } } Best Regards Andrzej Grajnert |
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org