Commit 6230d36c authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Improved information on incoming call

parent a8d28680
......@@ -812,7 +812,7 @@ void call_state_changed(::LinphoneCore *lc, ::LinphoneCall *call, ::LinphoneCall
Linphone::Core::CallController^ callController = Linphone::Core::Globals::Instance->CallController;
if (state == Linphone::Core::LinphoneCallState::IncomingReceived) {
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = callController->OnIncomingCallReceived(lCall, lCall->GetRemoteContact(), lCall->GetRemoteAddress()->AsStringUriOnly(), callController->IncomingCallViewDismissed);
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = callController->OnIncomingCallReceived(lCall, lCall->GetRemoteAddress()->GetDisplayName(), lCall->GetRemoteAddress()->AsStringUriOnly(), callController->IncomingCallViewDismissed);
lCall->CallContext = platformCall;
}
else if (state == Linphone::Core::LinphoneCallState::OutgoingProgress) {
......@@ -836,7 +836,7 @@ void call_state_changed(::LinphoneCore *lc, ::LinphoneCall *call, ::LinphoneCall
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = (Windows::Phone::Networking::Voip::VoipPhoneCall^) lCall->CallContext;
platformCall->NotifyCallActive();
}
Linphone::Core::LinphoneCoreListener^ listener = Linphone::Core::Globals::Instance->LinphoneCore->CoreListener;
if (listener != nullptr)
{
......
......@@ -498,7 +498,7 @@ namespace Linphone.Model
Logger.Msg("[LinphoneManager] Outgoing progress");
BaseModel.UIDispatcher.BeginInvoke(() =>
{
LookupForContact(sipAddress, call);
LookupForContact(call);
if (CallListener != null)
CallListener.NewCallStarted(sipAddress);
......@@ -506,10 +506,10 @@ namespace Linphone.Model
}
else if (state == LinphoneCallState.IncomingReceived)
{
Logger.Msg("[LinphoneManager] Incoming received");
Logger.Msg("[LinphoneManager] Incoming received");
BaseModel.UIDispatcher.BeginInvoke(() =>
{
LookupForContact(sipAddress, call);
LookupForContact(call);
});
}
else if (state == LinphoneCallState.Connected)
......@@ -614,19 +614,19 @@ namespace Linphone.Model
}
}
private void LookupForContact(String sipAddress, LinphoneCall call)
private void LookupForContact(LinphoneCall call)
{
string sipAddress = call.GetRemoteAddress().AsStringUriOnly();
if (call.GetRemoteAddress().GetDisplayName().Length == 0)
{
String address = sipAddress;
if (address.StartsWith("sip:"))
if (sipAddress.StartsWith("sip:"))
{
address = address.Substring(4);
sipAddress = sipAddress.Substring(4);
}
Logger.Msg("[LinphoneManager] Display name null, looking for remote address in contact: " + address);
Logger.Msg("[LinphoneManager] Display name null, looking for remote address in contact: " + sipAddress);
ContactManager.ContactFound += OnContactFound;
ContactManager.FindContact(address);
ContactManager.FindContact(sipAddress);
}
else
{
......
using System;
using Linphone.Model;
using Linphone.Resources;
using Microsoft.Phone.Shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Linphone.Model;
using Linphone.Resources;
namespace Linphone.Views
{
......
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