Commit 3ec59a12 authored by Ghislain MARY's avatar Ghislain MARY

Allow not sending SIP RINGING message.

parent 763b4e3a
......@@ -138,6 +138,7 @@ protected:
bool deferUpdate = false;
bool needLocalIpRefresh = false;
bool nonOpError = false; /* Set when the LinphoneErrorInfo was set at higher level than sal */
bool notifyRinging = true;
bool referPending = false;
bool reinviteOnCancelResponseRequested = false;
......
......@@ -550,7 +550,8 @@ void CallSessionPrivate::handleIncomingReceivedStateInIncomingNotification () {
L_Q();
/* Try to be best-effort in giving real local or routable contact address for 100Rel case */
setContactOp();
op->notify_ringing(false);
if (notifyRinging)
op->notify_ringing(false);
if (op->get_replaces() && lp_config_get_int(linphone_core_get_config(q->getCore()->getCCore()), "sip", "auto_answer_replacing_calls", 1))
q->accept();
}
......
......@@ -69,7 +69,7 @@ public:
virtual void iterate (time_t currentRealTime, bool oneSecondElapsed);
LinphoneStatus redirect (const std::string &redirectUri);
LinphoneStatus redirect (const Address &redirectAddr);
virtual void startIncomingNotification ();
virtual void startIncomingNotification (bool notifyRinging = true);
virtual int startInvite (const Address *destination, const std::string &subject = "", const Content *content = nullptr);
LinphoneStatus terminate (const LinphoneErrorInfo *ei = nullptr);
LinphoneStatus transfer (const std::shared_ptr<CallSession> &dest);
......
......@@ -4202,7 +4202,7 @@ void MediaSession::sendVfuRequest () {
#endif
}
void MediaSession::startIncomingNotification () {
void MediaSession::startIncomingNotification (bool notifyRinging) {
L_D();
d->makeLocalMediaDescription();
d->op->set_local_media_description(d->localDesc);
......@@ -4218,7 +4218,7 @@ void MediaSession::startIncomingNotification () {
}
}
CallSession::startIncomingNotification();
CallSession::startIncomingNotification(notifyRinging);
}
int MediaSession::startInvite (const Address *destination, const string &subject, const Content *content) {
......
......@@ -56,7 +56,7 @@ public:
LinphoneStatus sendDtmf (char dtmf);
LinphoneStatus sendDtmfs (const std::string &dtmfs);
void sendVfuRequest ();
void startIncomingNotification () override;
void startIncomingNotification (bool notifyRinging = true) override;
int startInvite (const Address *destination, const std::string &subject = "", const Content *content = nullptr) override;
void startRecording ();
void stopRecording ();
......
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