Commit e0da5b89 authored by Sylvain Berfini's avatar Sylvain Berfini

Added SRTP submodule + SRTP in available in app + improved call stats with ice...

Added SRTP submodule + SRTP in available in app + improved call stats with ice and media encryption status
parent 5d95434d
......@@ -64,3 +64,6 @@
[submodule "submodules/msisac"]
path = submodules/msisac
url = git://git.linphone.org/msisac.git
[submodule "submodules/srtp"]
path = submodules/srtp
url = git://git.linphone.org/srtp.git
......@@ -97,6 +97,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmsisac", "submodules\msi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webrtcisac", "submodules\webrtc\build\windows\webrtcisac\webrtcisac\webrtcisac.vcxproj", "{A5A719E5-FDD6-4DFD-AAF6-68C9534B5562}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srtp", "submodules\srtp\build\windows\srtp\srtp\srtp.vcxproj", "{B4B96BC4-2B72-4964-98E4-7FD048A43363}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -683,6 +685,26 @@ Global
{A5A719E5-FDD6-4DFD-AAF6-68C9534B5562}.Release|x64.ActiveCfg = Release|Win32
{A5A719E5-FDD6-4DFD-AAF6-68C9534B5562}.Release|x86.ActiveCfg = Release|Win32
{A5A719E5-FDD6-4DFD-AAF6-68C9534B5562}.Release|x86.Build.0 = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|Any CPU.ActiveCfg = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|ARM.ActiveCfg = Debug|ARM
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|ARM.Build.0 = Debug|ARM
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|Win32.ActiveCfg = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|Win32.Build.0 = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|x64.ActiveCfg = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|x86.ActiveCfg = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Debug|x86.Build.0 = Debug|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|Any CPU.ActiveCfg = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|ARM.ActiveCfg = Release|ARM
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|ARM.Build.0 = Release|ARM
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|Mixed Platforms.Build.0 = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|Win32.ActiveCfg = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|Win32.Build.0 = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|x64.ActiveCfg = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|x86.ActiveCfg = Release|Win32
{B4B96BC4-2B72-4964-98E4-7FD048A43363}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -107,10 +107,14 @@ namespace Linphone.Model
public RegistrationState LastKnownState {
get
{
if (isLinphoneRunning && LinphoneCore.GetDefaultProxyConfig() != null)
try
{
_lastKnownState = LinphoneCore.GetDefaultProxyConfig().GetState();
if (isLinphoneRunning && LinphoneCore.GetDefaultProxyConfig() != null)
{
_lastKnownState = LinphoneCore.GetDefaultProxyConfig().GetState();
}
}
catch { }
return _lastKnownState;
}
......
......@@ -1057,12 +1057,15 @@ namespace Linphone.Model
private LpConfig Config;
private Dictionary<string, string> TunnelModeToString;
private Dictionary<string, FirewallPolicy> FirewallPolicyToEnum;
private Dictionary<string, MediaEncryption> MediaEncryptionToEnum;
private Dictionary<string, string> StringToTunnelMode;
private Dictionary<string, string> StringToFirewallPolicy;
private Dictionary<string, string> StringToMediaEncryption;
#region Constants settings names
private const string SIPTransportSettingKeyName = "SIPTransport";
private const string SIPPortKeyName = "SIPPort";
private const string MediaEncryptionKeyName = "MediaEncryption";
private const string FirewallPolicyKeyName = "FirewallPolicy";
private const string StunServerKeyName = "StunServer";
private const string TunnelServerKeyName = "TunnelServer";
......@@ -1111,6 +1114,16 @@ namespace Linphone.Model
{ "UseStun", AppResources.FirewallPolicyStun },
{ "UseIce", AppResources.FirewallPolicyIce }
};
MediaEncryptionToEnum = new Dictionary<string, MediaEncryption>()
{
{ AppResources.MediaEncryptionNone, MediaEncryption.None },
{ AppResources.MediaEncryptionSRTP, MediaEncryption.SRTP }
};
StringToMediaEncryption = new Dictionary<string, string>()
{
{ "None", AppResources.MediaEncryptionNone },
{ "SRTP", AppResources.MediaEncryptionSRTP }
};
}
#region Implementation of the ISettingsManager interface
......@@ -1142,6 +1155,7 @@ namespace Linphone.Model
dict[StunServerKeyName] = LinphoneManager.Instance.LinphoneCore.GetStunServer();
dict[FirewallPolicyKeyName] = StringToFirewallPolicy[LinphoneManager.Instance.LinphoneCore.GetFirewallPolicy().ToString()];
dict[MediaEncryptionKeyName] = StringToMediaEncryption[LinphoneManager.Instance.LinphoneCore.GetMediaEncryption().ToString()];
// Load tunnel configuration
dict[TunnelModeKeyName] = AppResources.TunnelModeDisabled;
......@@ -1211,6 +1225,12 @@ namespace Linphone.Model
LinphoneManager.Instance.LinphoneCore.SetFirewallPolicy(FirewallPolicyToEnum[firewallPolicy]);
}
if (ValueChanged(MediaEncryptionKeyName))
{
string mediaEncryption = GetNew(MediaEncryptionKeyName);
LinphoneManager.Instance.LinphoneCore.SetMediaEncryption(MediaEncryptionToEnum[mediaEncryption]);
}
// Save tunnel configuration
if (LinphoneManager.Instance.LinphoneCore.IsTunnelAvailable() && Customs.IsTunnelEnabled)
{
......@@ -1263,6 +1283,21 @@ namespace Linphone.Model
}
}
/// <summary>
/// Media encryption setting (String).
/// </summary>
public string MEncryption
{
get
{
return Get(MediaEncryptionKeyName);
}
set
{
Set(MediaEncryptionKeyName, value);
}
}
/// <summary>
/// Firewall policy setting (String).
/// </summary>
......
......@@ -210,6 +210,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Call.
/// </summary>
public static string CallStatsMenu {
get {
return ResourceManager.GetString("CallStatsMenu", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cancel.
/// </summary>
......@@ -813,6 +822,33 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to None.
/// </summary>
public static string MediaEncryptionNone {
get {
return ResourceManager.GetString("MediaEncryptionNone", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Media encryption.
/// </summary>
public static string MediaEncryptionSetting {
get {
return ResourceManager.GetString("MediaEncryptionSetting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to SRTP.
/// </summary>
public static string MediaEncryptionSRTP {
get {
return ResourceManager.GetString("MediaEncryptionSRTP", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Message received.
/// </summary>
......@@ -1192,6 +1228,24 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to ICE connectivity.
/// </summary>
public static string StatICE {
get {
return ResourceManager.GetString("StatICE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Media encryption.
/// </summary>
public static string StatMediaEncryption {
get {
return ResourceManager.GetString("StatMediaEncryption", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Codec.
/// </summary>
......
......@@ -580,4 +580,22 @@ Do you want to report it to the developpers ? It will help fix it faster.</value
<value> is writing...</value>
<comment>Must start by a blank space</comment>
</data>
<data name="CallStatsMenu" xml:space="preserve">
<value>Call</value>
</data>
<data name="MediaEncryptionNone" xml:space="preserve">
<value>None</value>
</data>
<data name="MediaEncryptionSetting" xml:space="preserve">
<value>Media encryption</value>
</data>
<data name="MediaEncryptionSRTP" xml:space="preserve">
<value>SRTP</value>
</data>
<data name="StatMediaEncryption" xml:space="preserve">
<value>Media encryption</value>
</data>
<data name="StatICE" xml:space="preserve">
<value>ICE connectivity</value>
</data>
</root>
\ No newline at end of file
......@@ -28,6 +28,12 @@
Header="{Binding Path=LocalizedResources.TransportSetting, Source={StaticResource LocalizedStrings}}">
</toolkit:ListPicker>
<toolkit:ListPicker
x:Name="MediaEncryption"
SelectionMode="Single"
Header="{Binding Path=LocalizedResources.MediaEncryptionSetting, Source={StaticResource LocalizedStrings}}">
</toolkit:ListPicker>
<toolkit:ListPicker
x:Name="FirewallPolicy"
SelectionMode="Single"
......
......@@ -38,6 +38,14 @@ namespace Linphone.Views
vibrator.IsChecked = _chatSettings.VibrateOnIncomingMessage;
resizeDown.IsChecked = _chatSettings.ScaleDownSentPictures;
List<string> mediaEncryptions = new List<string>
{
AppResources.MediaEncryptionNone,
AppResources.MediaEncryptionSRTP,
};
MediaEncryption.ItemsSource = mediaEncryptions;
MediaEncryption.SelectedItem = _networkSettings.MEncryption;
List<string> firewallPolicies = new List<string>
{
AppResources.FirewallPolicyNone,
......@@ -116,6 +124,7 @@ namespace Linphone.Views
_callSettings.SendDTFMsSIPInfo = sipInfo.IsChecked;
_callSettings.Save();
_networkSettings.MEncryption = MediaEncryption.SelectedItem.ToString();
_networkSettings.FWPolicy = FirewallPolicy.SelectedItem.ToString();
_networkSettings.StunServer = Stun.Text;
_networkSettings.TunnelMode = tunnelMode.SelectedItem.ToString();
......
......@@ -27,16 +27,22 @@
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="emptyPanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Style="{StaticResource PhoneTextSmallStyle}"/>
</StackPanel>
<!-- Statistics panel -->
<StackPanel x:Name="statsPanel" Grid.Row="1" Margin="12,17,0,28" Visibility="Collapsed">
<Grid Grid.Row="1" Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
......@@ -46,14 +52,17 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="AudioStats" Text="{Binding Path=LocalizedResources.AudioStatsMenu, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="0" Grid.Row="0"/>
<TextBlock x:Name="AudioDownBw" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="0" Grid.Row="1"/>
<TextBlock x:Name="AudioUpBw" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="0" Grid.Row="2"/>
<TextBlock x:Name="AudioPType" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="0" Grid.Row="3"/>
<TextBlock x:Name="VideoStats" Text="{Binding Path=LocalizedResources.VideoStatsMenu, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="1" Grid.Row="0" Visibility="Collapsed"/>
<TextBlock x:Name="VideoDownBw" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="1" Grid.Row="1"/>
<TextBlock x:Name="VideoUpBw" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="1" Grid.Row="2"/>
<TextBlock x:Name="VideoPType" Style="{StaticResource PhoneTextNormalStyle}" Grid.Column="1" Grid.Row="3"/>
<TextBlock x:Name="AudioStats" Text="{Binding Path=LocalizedResources.AudioStatsMenu, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="0"/>
<TextBlock x:Name="AudioDownBw" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="1"/>
<TextBlock x:Name="AudioUpBw" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="2"/>
<TextBlock x:Name="AudioPType" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="3"/>
<TextBlock x:Name="VideoStats" Text="{Binding Path=LocalizedResources.VideoStatsMenu, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="2" Grid.Row="0" Visibility="Collapsed"/>
<TextBlock x:Name="VideoDownBw" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="1" Grid.Row="1"/>
<TextBlock x:Name="VideoUpBw" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="1" Grid.Row="2"/>
<TextBlock x:Name="VideoPType" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="1" Grid.Row="3"/>
<TextBlock x:Name="CallStats" Text="--" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2"/>
<TextBlock x:Name="MediaEncryption" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2"/>
<TextBlock x:Name="ICE" Style="{StaticResource PhoneTextSmallStyle}" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="2"/>
</Grid>
</StackPanel>
......
......@@ -280,6 +280,8 @@ namespace Linphone.Views
LinphoneCallParams param = call.GetCurrentParamsCopy();
Status.Text = mm.ToString("00") + ":" + ss.ToString("00");
MediaEncryption.Text = String.Format(AppResources.StatMediaEncryption + ": {0}", param.GetMediaEncryption().ToString());
LinphoneCallStats audioStats = null;
try
{
......@@ -291,6 +293,7 @@ namespace Linphone.Views
{
AudioDownBw.Text = String.Format(AppResources.StatDownloadBW + ": {0:0.00} kb/s", audioStats.GetDownloadBandwidth());
AudioUpBw.Text = String.Format(AppResources.StatUploadBW + ": {0:0.00} kb/s", audioStats.GetUploadBandwidth());
ICE.Text = String.Format(AppResources.StatICE + ": {0}", audioStats.GetIceState().ToString());
}
PayloadType audiopt = param.GetUsedAudioCodec();
......
oRTP @ d7b4d285
Subproject commit 253bc2f26c8adc46a56c17d4e17d0d8afeb163c9
Subproject commit d7b4d285d8174566c16c600a9e61abed04cb8789
srtp @ 79624706
Subproject commit 79624706a253ae411b3342d6fba13f81498eff69
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