Play DTMF on reception

This commit is contained in:
Julien Wadel 2024-08-29 17:00:51 +02:00
parent 206ee43baa
commit 1cf436263a
2 changed files with 4 additions and 3 deletions

View file

@ -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<linphone::Call> &call, int dtmf) {
CoreModel::getInstance()->getCore()->playDtmf(dtmf, gDtmfSoundDelay);
emit dtmfReceived(call, dtmf);
}
@ -493,4 +494,4 @@ void CallModel::onRemoteRecording(const std::shared_ptr<linphone::Call> &call, b
void CallModel::onAuthenticationTokenVerified(const std::shared_ptr<linphone::Call> &call, bool verified) {
emit authenticationTokenVerified(call, verified);
}
}

View file

@ -113,7 +113,7 @@ private:
QTimer mMicroVolumeTimer;
std::shared_ptr<linphone::Conference> mConference;
LinphoneEnums::ConferenceLayout mConferenceVideoLayout;
static constexpr int dtmfSoundDelay = 200;
static constexpr int gDtmfSoundDelay = 200;
DECLARE_ABSTRACT_OBJECT