Commit af98291f authored by Ronan Abhamon's avatar Ronan Abhamon

feat(CallModel): play dtmf when `sendDtmf` is called (close #108)

parent 81c95124
......@@ -31,6 +31,7 @@
#include "CallModel.hpp"
#define AUTO_ANSWER_OBJECT_NAME "auto-answer-timer"
#define DTMF_SOUND_DELAY 200
using namespace std;
......@@ -535,8 +536,10 @@ bool CallModel::getRecording () const {
// -----------------------------------------------------------------------------
void CallModel::sendDtmf (const QString &dtmf) {
qInfo() << QStringLiteral("Send dtmf: `%1`.").arg(dtmf);
mCall->sendDtmf(dtmf.constData()[0].toLatin1());
const char key = dtmf.constData()[0].toLatin1();
qInfo() << QStringLiteral("Send dtmf: `%1`.").arg(key);
mCall->sendDtmf(key);
CoreManager::getInstance()->getCore()->playDtmf(key, DTMF_SOUND_DELAY);
}
// -----------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment