diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java index 02bbb3500..8852b63a1 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java @@ -670,10 +670,10 @@ public DtmfSender getDtmfSender() { } public boolean applyDtmfTone(String tone) { - if (toneManager == null || peerConnection == null || peerConnection.getSenders().isEmpty()) { + if (toneManager == null || peerConnection == null || localAudioTrack == null) { return false; } - peerConnection.getSenders().get(0).dtmf().insertDtmf(tone, TONE_DURATION, 100); + localAudioTrack.rtpSender.dtmf().insertDtmf(tone, TONE_DURATION, 100); toneManager.startTone(TONE_CODES.get(tone), TONE_DURATION); return true; }