Commit c2a970f3 authored by Adrien Béraud's avatar Adrien Béraud

sipcall: add some call failure reasons

Refs #70789

Change-Id: I0e4fb3f93b1a5d397e73ab167bd0276793692746
parent c69ec67c
......@@ -63,6 +63,8 @@
#include <chrono>
#endif
#include "errno.h"
namespace ring {
#ifdef RING_VIDEO
......@@ -207,7 +209,7 @@ SIPCall::setTransport(const std::shared_ptr<SipTransport>& t)
if (not SipTransport::isAlive(t, state) and this_->getConnectionState() != DISCONNECTED) {
RING_WARN("Ending call because underlying SIP transport was closed");
this_->setConnectionState(Call::DISCONNECTED);
Manager::instance().callFailure(*this_);
Manager::instance().callFailure(*this_, ECONNRESET);
this_->removeCall();
}
} else // should not happen
......@@ -779,7 +781,7 @@ SIPCall::startAllMedia()
{
if (isSecure() && not transport_->isSecure()) {
RING_ERR("Can't perform secure call over insecure SIP transport");
Manager::instance().callFailure(*this);
Manager::instance().callFailure(*this, EPROTONOSUPPORT);
removeCall();
return;
}
......@@ -874,7 +876,7 @@ SIPCall::onMediaUpdate()
if (this_->iceTransport_->isFailed() or std::chrono::steady_clock::now() >= iceTimeout) {
RING_DBG("ice init failed (or timeout)");
this_->setConnectionState(Call::DISCONNECTED);
Manager::instance().callFailure(*this_); // signal client
Manager::instance().callFailure(*this_, ETIMEDOUT); // signal client
this_->removeCall();
return false;
}
......
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