Commit a53e7536 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Improved fake call state events generated and improved handling

parent a9be3e9d
......@@ -127,7 +127,8 @@ LinphoneAddress^ LinphoneCore::InterpretURL(Platform::String^ destination)
LinphoneCall^ LinphoneCore::Invite(Platform::String^ destination)
{
std::lock_guard<std::recursive_mutex> lock(g_apiLock);
this->callAccepted = true;
return ref new LinphoneCall("", destination);
}
......
......@@ -302,9 +302,6 @@ namespace Linphone.Model
LinphoneCall LCall = LinphoneCore.Invite(sipAddress);
LCall.CallContext = call;
LinphoneCore.Call = LCall;
if (CallListener != null)
CallListener.NewCallStarted(sipAddress);
}
/// <summary>
......@@ -365,7 +362,7 @@ namespace Linphone.Model
/// </summary>
public void CallState(LinphoneCall call, LinphoneCallState state)
{
Debug.WriteLine("[LinphoneManager] Call state changed: " + call.GetRemoteContact() + " => " + state.ToString());
Debug.WriteLine("[LinphoneManager] Call state changed: " + call.GetRemoteAddress().AsStringUriOnly() + " => " + state.ToString());
if (state == LinphoneCallState.IncomingReceived)
{
String contact = call.GetRemoteContact();
......@@ -386,9 +383,6 @@ namespace Linphone.Model
vcall.NotifyCallActive();
LinphoneCore.AcceptCall(call);
if (CallListener != null)
CallListener.NewCallStarted(number);
});
vcall.RejectRequested += ((c, eventargs) =>
{
......@@ -405,6 +399,9 @@ namespace Linphone.Model
else if (state == LinphoneCallState.StreamsRunning)
{
Debug.WriteLine("[LinphoneManager] Call accepted and running");
if (CallListener != null)
CallListener.NewCallStarted(call.GetRemoteAddress().AsStringUriOnly());
}
else if (state == LinphoneCallState.CallEnd ||
state == LinphoneCallState.Error ||
......
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