Commit 4c9515d2 authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez

call: add connecting state event

Refs #71781

Change-Id: I05098c994eec4a7eeeed8867c833f9e8a5754f89
parent 9896feaf
......@@ -520,6 +520,7 @@
The acceptable states are:
<ul>
<li>INCOMING: Initial state of incoming calls</li>
<li>CONNECTING: Peer found, contacting him</li>
<li>RINGING: Initial state of received outgoing call</li>
<li>CURRENT: The normal active state of an answered call</li>
<li>HUNGUP: Notify that the call has been hungup by peer</li>
......
......@@ -34,6 +34,20 @@ namespace DRing {
namespace Call {
namespace StateEvent {
constexpr static char INCOMING [] = "INCOMING" ;
constexpr static char CONNECTING [] = "CONNECTING" ;
constexpr static char RINGING [] = "RINGING" ;
constexpr static char CURRENT [] = "CURRENT" ;
constexpr static char HUNGUP [] = "HUNGUP" ;
constexpr static char BUSY [] = "BUSY" ;
constexpr static char FAILURE [] = "FAILURE" ;
constexpr static char HOLD [] = "HOLD" ;
constexpr static char UNHOLD [] = "UNHOLD" ;
}
namespace Details {
constexpr static char CALL_TYPE [] = "CALL_TYPE" ;
......
......@@ -78,6 +78,7 @@
#include "ice_transport.h"
#include "client/ring_signal.h"
#include "dring/call_const.h"
#if HAVE_TLS
#include "gnutls_support.h"
......@@ -685,7 +686,7 @@ Manager::offHoldCall(const std::string& callId)
return false;
}
emitSignal<DRing::CallSignal::StateChange>(callId, "UNHOLD", 0);
emitSignal<DRing::CallSignal::StateChange>(callId, DRing::Call::StateEvent::UNHOLD, 0);
if (isConferenceParticipant(callId))
switchCall(getCallFromCallID(call->getConfId()));
......
......@@ -45,6 +45,7 @@
#include "ice_transport.h"
#include "client/ring_signal.h"
#include "dring/call_const.h"
#include "upnp/upnp_control.h"
#include "system_codec_container.h"
......@@ -230,6 +231,8 @@ RingAccount::newOutgoingCall(const std::string& toUrl)
dht::DhtMessage msg {v->data};
RING_WARN("ICE request replied from DHT peer %s",
toH.toString().c_str());
call->setConnectionState(Call::PROGRESSING);
emitSignal<DRing::CallSignal::StateChange>(call->getCallId(), DRing::Call::StateEvent::CONNECTING, 0);
ice->start(msg.getMessage());
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