From 1cf436263ae98b362020942753f5e185a503418e Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 29 Aug 2024 17:00:51 +0200 Subject: [PATCH] Play DTMF on reception --- Linphone/model/call/CallModel.cpp | 5 +++-- Linphone/model/call/CallModel.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Linphone/model/call/CallModel.cpp b/Linphone/model/call/CallModel.cpp index 822619f38..086ebd347 100644 --- a/Linphone/model/call/CallModel.cpp +++ b/Linphone/model/call/CallModel.cpp @@ -385,10 +385,11 @@ void CallModel::sendDtmf(const QString &dtmf) { const char key = dtmf.constData()[0].toLatin1(); qInfo() << QStringLiteral("Send dtmf: `%1`.").arg(key); if (mMonitor) mMonitor->sendDtmf(key); - CoreModel::getInstance()->getCore()->playDtmf(key, dtmfSoundDelay); + CoreModel::getInstance()->getCore()->playDtmf(key, gDtmfSoundDelay); } void CallModel::onDtmfReceived(const std::shared_ptr &call, int dtmf) { + CoreModel::getInstance()->getCore()->playDtmf(dtmf, gDtmfSoundDelay); emit dtmfReceived(call, dtmf); } @@ -493,4 +494,4 @@ void CallModel::onRemoteRecording(const std::shared_ptr &call, b void CallModel::onAuthenticationTokenVerified(const std::shared_ptr &call, bool verified) { emit authenticationTokenVerified(call, verified); -} \ No newline at end of file +} diff --git a/Linphone/model/call/CallModel.hpp b/Linphone/model/call/CallModel.hpp index 4d3f4cad7..189a9e146 100644 --- a/Linphone/model/call/CallModel.hpp +++ b/Linphone/model/call/CallModel.hpp @@ -113,7 +113,7 @@ private: QTimer mMicroVolumeTimer; std::shared_ptr mConference; LinphoneEnums::ConferenceLayout mConferenceVideoLayout; - static constexpr int dtmfSoundDelay = 200; + static constexpr int gDtmfSoundDelay = 200; DECLARE_ABSTRACT_OBJECT