diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index 75895ffb9..5c058c7fc 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -43,7 +43,6 @@ using namespace std; namespace { constexpr char AutoAnswerObjectName[] = "auto-answer-timer"; - constexpr int DtmfSoundDelay = 200; } CallModel::CallModel (shared_ptr call) { diff --git a/linphone-app/src/components/call/CallModel.hpp b/linphone-app/src/components/call/CallModel.hpp index 8ea89af5a..7a93c738b 100644 --- a/linphone-app/src/components/call/CallModel.hpp +++ b/linphone-app/src/components/call/CallModel.hpp @@ -133,6 +133,8 @@ public: Q_INVOKABLE void toggleSpeakerMute(); + static constexpr int DtmfSoundDelay = 200; + signals: void callErrorChanged (const QString &callError); void isInConferenceChanged (bool status); diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp index 309fa074e..8067fca53 100644 --- a/linphone-app/src/components/core/CoreHandlers.cpp +++ b/linphone-app/src/components/core/CoreHandlers.cpp @@ -132,6 +132,12 @@ void CoreHandlers::onCallCreated(const shared_ptr &, emit callCreated(call); } +void CoreHandlers::onDtmfReceived( + const std::shared_ptr & lc, + const std::shared_ptr & call, + int dtmf) { + CoreManager::getInstance()->getCore()->playDtmf((char)dtmf, CallModel::DtmfSoundDelay); +} void CoreHandlers::onGlobalStateChanged ( const shared_ptr &, linphone::GlobalState gstate, diff --git a/linphone-app/src/components/core/CoreHandlers.hpp b/linphone-app/src/components/core/CoreHandlers.hpp index f47e69c7d..97bbc2275 100644 --- a/linphone-app/src/components/core/CoreHandlers.hpp +++ b/linphone-app/src/components/core/CoreHandlers.hpp @@ -91,6 +91,11 @@ private: const std::shared_ptr & call ) override; + void onDtmfReceived( + const std::shared_ptr & lc, + const std::shared_ptr & call, + int dtmf)override; + void onGlobalStateChanged ( const std::shared_ptr &core, linphone::GlobalState gstate, diff --git a/linphone-app/ui/views/App/Calls/AbstractStartingCall.qml b/linphone-app/ui/views/App/Calls/AbstractStartingCall.qml index 50668522c..6b9fee5eb 100644 --- a/linphone-app/ui/views/App/Calls/AbstractStartingCall.qml +++ b/linphone-app/ui/views/App/Calls/AbstractStartingCall.qml @@ -14,6 +14,7 @@ Rectangle { default property alias _actionArea: actionArea.data property var _sipAddressObserver: SipAddressesModel.getSipAddressObserver(call.fullPeerAddress, call.fullLocalAddress) + property alias showKeypad :telKeypadButton.visible // --------------------------------------------------------------------------- @@ -100,4 +101,27 @@ Rectangle { Layout.preferredHeight: CallStyle.actionArea.height } } + + ActionButton { + id:telKeypadButton + icon: 'tel_keypad' + visible:false + onClicked: telKeypad.visible = !telKeypad.visible + anchors.left:parent.left + anchors.top:parent.top + iconSize: CallStyle.header.iconSize + anchors.leftMargin: CallStyle.header.leftMargin + anchors.topMargin: CallStyle.header.topMargin + } + + // --------------------------------------------------------------------------- + // TelKeypad. + // --------------------------------------------------------------------------- + + TelKeypad { + id: telKeypad + + call: parent.call + visible: SettingsModel.showTelKeypadAutomatically + } } diff --git a/linphone-app/ui/views/App/Calls/OutgoingCall.qml b/linphone-app/ui/views/App/Calls/OutgoingCall.qml index ca8bc46f6..32ba1b25b 100644 --- a/linphone-app/ui/views/App/Calls/OutgoingCall.qml +++ b/linphone-app/ui/views/App/Calls/OutgoingCall.qml @@ -9,6 +9,7 @@ import App.Styles 1.0 // ============================================================================= AbstractStartingCall { + showKeypad:true GridLayout { columns: parent.width < CallStyle.actionArea.lowWidth && call.videoEnabled ? 1 : 2 rowSpacing: ActionBarStyle.spacing