mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 19:38:09 +00:00
- Add a player when receiving a DTMF
- Show keypad on outgoing call to allow sending DTMF before 200
This commit is contained in:
parent
b32d063b88
commit
79753e62df
6 changed files with 38 additions and 1 deletions
|
|
@ -43,7 +43,6 @@ using namespace std;
|
|||
|
||||
namespace {
|
||||
constexpr char AutoAnswerObjectName[] = "auto-answer-timer";
|
||||
constexpr int DtmfSoundDelay = 200;
|
||||
}
|
||||
|
||||
CallModel::CallModel (shared_ptr<linphone::Call> call) {
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@ public:
|
|||
|
||||
Q_INVOKABLE void toggleSpeakerMute();
|
||||
|
||||
static constexpr int DtmfSoundDelay = 200;
|
||||
|
||||
signals:
|
||||
void callErrorChanged (const QString &callError);
|
||||
void isInConferenceChanged (bool status);
|
||||
|
|
|
|||
|
|
@ -132,6 +132,12 @@ void CoreHandlers::onCallCreated(const shared_ptr<linphone::Core> &,
|
|||
emit callCreated(call);
|
||||
}
|
||||
|
||||
void CoreHandlers::onDtmfReceived(
|
||||
const std::shared_ptr<linphone::Core> & lc,
|
||||
const std::shared_ptr<linphone::Call> & call,
|
||||
int dtmf) {
|
||||
CoreManager::getInstance()->getCore()->playDtmf((char)dtmf, CallModel::DtmfSoundDelay);
|
||||
}
|
||||
void CoreHandlers::onGlobalStateChanged (
|
||||
const shared_ptr<linphone::Core> &,
|
||||
linphone::GlobalState gstate,
|
||||
|
|
|
|||
|
|
@ -91,6 +91,11 @@ private:
|
|||
const std::shared_ptr<linphone::Call> & call
|
||||
) override;
|
||||
|
||||
void onDtmfReceived(
|
||||
const std::shared_ptr<linphone::Core> & lc,
|
||||
const std::shared_ptr<linphone::Call> & call,
|
||||
int dtmf)override;
|
||||
|
||||
void onGlobalStateChanged (
|
||||
const std::shared_ptr<linphone::Core> &core,
|
||||
linphone::GlobalState gstate,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue