mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
sip: handle sip messages during multi-device ringing
Change-Id: I5bb43cf1506adc1a11f0af899b07b540bae52bf9 Tuleap: #938
This commit is contained in:
@ -361,6 +361,15 @@ Call::newIceSocket(unsigned compId)
|
||||
return std::unique_ptr<IceSocket> {new IceSocket(iceTransport_, compId)};
|
||||
}
|
||||
|
||||
void
|
||||
Call::onTextMessage(std::map<std::string, std::string>&& messages)
|
||||
{
|
||||
if (quiet)
|
||||
pendingMessages_.emplace_back(std::move(messages), "");
|
||||
else
|
||||
Manager::instance().incomingMessage(getCallId(), getPeerNumber(), messages);
|
||||
}
|
||||
|
||||
void
|
||||
Call::peerHungup()
|
||||
{
|
||||
|
@ -310,9 +310,9 @@ class Call : public Recordable, public std::enable_shared_from_this<Call> {
|
||||
const std::string &from) = 0;
|
||||
|
||||
|
||||
virtual void onTextMessage(const std::map<std::string, std::string>& messages) = 0;
|
||||
void onTextMessage(std::map<std::string, std::string>&& messages);
|
||||
|
||||
void removeCall();
|
||||
virtual void removeCall();
|
||||
|
||||
virtual bool initIceTransport(bool master, unsigned channel_num=4);
|
||||
|
||||
|
@ -678,12 +678,11 @@ SIPCall::sendTextMessage(const std::map<std::string, std::string>& messages,
|
||||
}
|
||||
|
||||
void
|
||||
SIPCall::onTextMessage(const std::map<std::string, std::string>& messages)
|
||||
SIPCall::removeCall()
|
||||
{
|
||||
if (quiet)
|
||||
pendingMessages_.emplace_back(messages, "");
|
||||
else
|
||||
Manager::instance().incomingMessage(getCallId(), getPeerNumber(), messages);
|
||||
Call::removeCall();
|
||||
inv.reset();
|
||||
setTransport({});
|
||||
}
|
||||
|
||||
void
|
||||
@ -692,7 +691,6 @@ SIPCall::onFailure(signed cause)
|
||||
setState(CallState::MERROR, ConnectionState::DISCONNECTED, cause);
|
||||
Manager::instance().callFailure(*this);
|
||||
removeCall();
|
||||
setTransport({});
|
||||
}
|
||||
|
||||
void
|
||||
@ -701,7 +699,6 @@ SIPCall::onClosed()
|
||||
Manager::instance().peerHungupCall(*this);
|
||||
removeCall();
|
||||
Manager::instance().checkAudio();
|
||||
setTransport({});
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -159,7 +159,7 @@ class SIPCall : public Call
|
||||
void sendTextMessage(const std::map<std::string, std::string>& messages,
|
||||
const std::string& from) override;
|
||||
|
||||
void onTextMessage(const std::map<std::string, std::string>& messages) override;
|
||||
void removeCall() override;
|
||||
|
||||
SIPAccountBase& getSIPAccount() const;
|
||||
|
||||
|
Reference in New Issue
Block a user