diff --git a/bin/dbus/callmanager-introspec.xml b/bin/dbus/callmanager-introspec.xml index 2fb551ce33621de7260dc4dcb03cfc6e358a5ed1..66cb318e86b61245f4600a399b3adc3a60cf7e6a 100644 --- a/bin/dbus/callmanager-introspec.xml +++ b/bin/dbus/callmanager-introspec.xml @@ -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> diff --git a/src/dring/call_const.h b/src/dring/call_const.h index 85ac20cf78ed93d3ca11e4acdda1e1acb72c750e..64078d525b56970122cccc4b2fd4fd2796323fee 100644 --- a/src/dring/call_const.h +++ b/src/dring/call_const.h @@ -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" ; diff --git a/src/manager.cpp b/src/manager.cpp index a430f6bb7da3b19e46d19b794777095824f0ab8c..b1e1e8e32a6ef4fdc098241d141b1895fb0aac2f 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -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())); diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index c2f81381380fb7871388d7c77d15401017746aa9..33b24e8c9adaa4a57aeac6b52c9792bb8dee1bee 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -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; }