Diff
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/EventWatcher.csproj (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/EventWatcher.csproj 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/EventWatcher.csproj 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,6 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EventWatcher</RootNamespace>
<AssemblyName>EventWatcher</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/Properties/Resources.Designer.cs (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/Properties/Resources.Designer.cs 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/Properties/Resources.Designer.cs 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.312
+// Runtime Version:2.0.50727.4016
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/Properties/Settings.Designer.cs (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/Properties/Settings.Designer.cs 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/EventWatcher/Properties/Settings.Designer.cs 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.312
+// Runtime Version:2.0.50727.4016
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace EventWatcher.Properties
-{
-
-
+namespace EventWatcher.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitch.EventSocket.Test/FreeSwitch.EventSocket.Test.csproj (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitch.EventSocket.Test/FreeSwitch.EventSocket.Test.csproj 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitch.EventSocket.Test/FreeSwitch.EventSocket.Test.csproj 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,6 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreeSwitch.EventSocket.Test</RootNamespace>
<AssemblyName>FreeSwitch.EventSocket.Test</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitch.EventSocket.sln (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitch.EventSocket.sln 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitch.EventSocket.sln 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,6 +1,6 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSwitch.EventSocket", "FreeSwitchEventSocket\FreeSwitch.EventSocket.csproj", "{3F8895F6-F710-4323-B96A-4EFB6BC97E08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSwitch.EventSocket.Test", "FreeSwitch.EventSocket.Test\FreeSwitch.EventSocket.Test.csproj", "{3679225D-79A3-4B6C-BCA1-E2DC265E423A}"
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/EventManager.cs (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/EventManager.cs 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/EventManager.cs 2010-01-07 12:38:20 UTC (rev 16196)
@@ -31,6 +31,11 @@
private readonly object _logLocker = new object();
private readonly LogWriterHandler _logWriter;
+ /// <summary>
+ /// Gets or sets display all missing event types.
+ /// </summary>
+ public bool DisplayMissingEventTypes { get; set; }
+
/// <summary>
/// FreeSWITCH password, default is "ClueCon".
/// </summary>
@@ -129,7 +134,7 @@
eb.Parse(parameters);
EventReceived(eb);
}
- else
+ else if (DisplayMissingEventTypes)
_logWriter(LogPrio.Warning, "Failed to load '" + eventName + "'.");
}
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/EventSocket.cs (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/EventSocket.cs 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/EventSocket.cs 2010-01-07 12:38:20 UTC (rev 16196)
@@ -131,6 +131,11 @@
TryConnect();
LogWriter(LogPrio.Debug, "Connected to freeswitch.");
}
+ catch(InvalidOperationException err)
+ {
+ LogWriter(LogPrio.Debug, "Failed to connect to freeswitch, reason: " + err.Message);
+ HandleDisconnect();
+ }
catch (SocketException err)
{
LogWriter(LogPrio.Debug, "Failed to connect to freeswitch, reason: " + err.Message);
@@ -148,12 +153,6 @@
Connected(this);
BeginRead();
-
- if (_timer == null) return;
- Timer tmr = _timer;
- _timer = null;
- tmr.Change(Timeout.Infinite, Timeout.Infinite);
- tmr.Dispose();
}
}
@@ -235,15 +234,9 @@
return;
if (!_socket.Connected)
{
- try
- {
- TryConnect();
- LogWriter(LogPrio.Info, "We've connected again");
- }
- catch (SocketException)
- {
- return;
- }
+ if (_timer == null)
+ _timer = new Timer(OnTryConnect, null, RetryTimeout, RetryTimeout);
+ return;
}
byte[] bytes = Encoding.ASCII.GetBytes(s);
@@ -321,12 +314,35 @@
}
Disconnected(this);
- if (!AutoConnect || _timer != null) return;
+ if (!AutoConnect || _timer != null)
+ return;
+
LogWriter(LogPrio.Info, "Launching autoconnect timer.");
- _timer = new Timer(TryConnect, this, RetryTimeout, RetryTimeout);
+ _timer = new Timer(OnTryConnect, this, RetryTimeout, RetryTimeout);
}
- private void RequestEvents()
+ private void OnTryConnect(object state)
+ {
+ try
+ {
+ TryConnect();
+ LogWriter(LogPrio.Info, "Connected again.");
+ if (_timer == null)
+ return;
+
+ Timer tmr = _timer;
+ _timer = null;
+ tmr.Change(Timeout.Infinite, Timeout.Infinite);
+ tmr.Dispose();
+ }
+ catch(Exception err)
+ {
+ if (!(err is SocketException))
+ LogWriter(LogPrio.Error, "Unexpected exception in try connect: " + err);
+ }
+ }
+
+ private void RequestEvents()
{
if (_events.Count <= 0 && _authed)
return;
@@ -363,17 +379,5 @@
// All commands need replies.
Write(command + "\n\n");
}
-
- private void TryConnect(object state)
- {
- EventSocket client = (EventSocket) state;
- try
- {
- client.TryConnect();
- LogWriter(LogPrio.Info, "Connected again.");
- }
- catch (SocketException)
- {}
- }
}
}
\ No newline at end of file
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/FreeSwitch.EventSocket.csproj (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/FreeSwitch.EventSocket.csproj 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/FreeSwitch.EventSocket.csproj 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,8 +1,8 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3F8895F6-F710-4323-B96A-4EFB6BC97E08}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -13,6 +13,26 @@
</StartupObject>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EventSocket.pfx</AssemblyOriginatorKeyFile>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -114,6 +134,33 @@
<ItemGroup>
<None Include="EventSocket.pfx" />
</ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/SipEvents/EventPresenceProbe.cs (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/SipEvents/EventPresenceProbe.cs 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/FreeSwitchEventSocket/SipEvents/EventPresenceProbe.cs 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,16 +1,52 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace FreeSwitch.EventSocket.SipEvents
+namespace FreeSwitch.EventSocket
{
- class EventPresenceProbe : EventPresence
- {
- public override string ToString()
- {
- return "PresenceProbe." + base.ToString();
- }
+ /// <summary>
+ ///
+ /// </summary>
+ /// <example>
+ /// proto: sip
+/// login: sip%3Amod_sofia%4010.0.1.250%3A5060
+/// from: 1009%4010.0.1.250
+/// status: Available
+/// event_type: presence
+/// event_subtype: probe
+/// proto-specific-event-name: dialog
+/// Event-Name: PRESENCE_PROBE
+/// Core-UUID: 2130a7d1-c1f7-44cd-8fae-8ed5946f3cec
+/// FreeSWITCH-Hostname: localhost.localdomain
+/// FreeSWITCH-IPv4: 10.0.1.250
+/// FreeSWITCH-IPv6: 127.0.0.1
+/// Event-Date-Local: 2007-12-16%2022%3A31%3A16
+/// Event-Date-GMT: Mon,%2017%20Dec%202007%2004%3A31%3A16%20GMT
+/// Event-Date-timestamp: 1197865876565022
+/// Event-Calling-File: sofia_presence.c
+/// Event-Calling-Function: sofia_presence_sub_reg_callback
+ /// Event-Calling-Line-Number: 484
+ /// </example>
+ public class EventPresenceProbe : SipEvent
+ {
+ /// <summary>
+ /// Gets or sets user status.
+ /// </summary>
+ public string Status { get; set; }
- }
+ /// <summary>
+ /// Gets or sets login module used.
+ /// </summary>
+ public string Login { get; set; }
+ public override bool ParseCommand(string name, string value)
+ {
+ switch (name)
+ {
+ case "status":
+ Status = value;
+ break;
+ case "login":
+ Login = value;
+ break;
+ }
+ return true;
+ }
+ }
}
Modified: freeswitch/trunk/contrib/verifier/EventSocket/trunk/IvrSocket/IvrSocket.csproj (16195 => 16196)
--- freeswitch/trunk/contrib/verifier/EventSocket/trunk/IvrSocket/IvrSocket.csproj 2010-01-07 06:43:51 UTC (rev 16195)
+++ freeswitch/trunk/contrib/verifier/EventSocket/trunk/IvrSocket/IvrSocket.csproj 2010-01-07 12:38:20 UTC (rev 16196)
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,6 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IvrSocket</RootNamespace>
<AssemblyName>IvrSocket</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>