Commit 5ca8db77 authored by Sylvain Berfini's avatar Sylvain Berfini

Fix missing PN infos in contacts params

parent 56b5ea30
......@@ -260,7 +260,6 @@ namespace Linphone.Model
LpConfig config = server.LinphoneCoreFactory.CreateLpConfig(SettingsManager.GetConfigPath(), SettingsManager.GetFactoryConfigPath());
ConfigureLogger();
server.LinphoneCoreFactory.CreateLinphoneCore(this, config);
server.LinphoneCore.SetUserAgent(DefaultValues.UserAgent, XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value);
server.LinphoneCore.SetRootCA("Assets/rootca.pem");
Debug.WriteLine("[LinphoneManager] LinphoneCore created");
......@@ -268,21 +267,24 @@ namespace Linphone.Model
CallController.MuteRequested += MuteRequested;
CallController.UnmuteRequested += UnmuteRequested;
if (LinphoneCore.GetDefaultProxyConfig() != null)
if (server.LinphoneCore.IsVideoSupported())
{
string host, token;
host = ((App)App.Current).PushChannelUri.Host;
token = ((App)App.Current).PushChannelUri.AbsolutePath;
LinphoneCore.GetDefaultProxyConfig().SetContactParameters("app-id=" + host + ";pn-type=wp;pn-tok=" + token + ";pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf");
DetectCameras();
}
if (LinphoneCore.IsVideoSupported())
server.LinphoneCore.SetUserAgent(DefaultValues.UserAgent, XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value);
if (server.LinphoneCore.GetDefaultProxyConfig() != null)
{
DetectCameras();
string host, token;
host = ((App)App.Current).PushChannelUri.Host;
token = ((App)App.Current).PushChannelUri.AbsolutePath;
SIPAccountSettingsManager sipAccount = new SIPAccountSettingsManager();
sipAccount.Load();
server.LinphoneCore.GetDefaultProxyConfig().SetContactParameters("app-id=" + host + ";pn-type=wp;pn-tok=\"" + token + "\"");
}
lastNetworkState = DeviceNetworkInformation.IsNetworkAvailable;
LinphoneCore.SetNetworkReachable(lastNetworkState);
server.LinphoneCore.SetNetworkReachable(lastNetworkState);
DeviceNetworkInformation.NetworkAvailabilityChanged += new EventHandler<NetworkNotificationEventArgs>(OnNetworkStatusChanged);
isLinphoneRunning = true;
......
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