Play DTMF on reception
This commit is contained in:
parent
206ee43baa
commit
1cf436263a
2 changed files with 4 additions and 3 deletions
|
|
@ -385,10 +385,11 @@ void CallModel::sendDtmf(const QString &dtmf) {
|
||||||
const char key = dtmf.constData()[0].toLatin1();
|
const char key = dtmf.constData()[0].toLatin1();
|
||||||
qInfo() << QStringLiteral("Send dtmf: `%1`.").arg(key);
|
qInfo() << QStringLiteral("Send dtmf: `%1`.").arg(key);
|
||||||
if (mMonitor) mMonitor->sendDtmf(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) {
|
void CallModel::onDtmfReceived(const std::shared_ptr<linphone::Call> &call, int dtmf) {
|
||||||
|
CoreModel::getInstance()->getCore()->playDtmf(dtmf, gDtmfSoundDelay);
|
||||||
emit dtmfReceived(call, dtmf);
|
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) {
|
void CallModel::onAuthenticationTokenVerified(const std::shared_ptr<linphone::Call> &call, bool verified) {
|
||||||
emit authenticationTokenVerified(call, verified);
|
emit authenticationTokenVerified(call, verified);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ private:
|
||||||
QTimer mMicroVolumeTimer;
|
QTimer mMicroVolumeTimer;
|
||||||
std::shared_ptr<linphone::Conference> mConference;
|
std::shared_ptr<linphone::Conference> mConference;
|
||||||
LinphoneEnums::ConferenceLayout mConferenceVideoLayout;
|
LinphoneEnums::ConferenceLayout mConferenceVideoLayout;
|
||||||
static constexpr int dtmfSoundDelay = 200;
|
static constexpr int gDtmfSoundDelay = 200;
|
||||||
|
|
||||||
DECLARE_ABSTRACT_OBJECT
|
DECLARE_ABSTRACT_OBJECT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue