diff --git a/Asterisk.2013/Asterisk.NET/AsterNET.csproj b/Asterisk.2013/Asterisk.NET/AsterNET.csproj
index 87e74cc..5b835a9 100644
--- a/Asterisk.2013/Asterisk.NET/AsterNET.csproj
+++ b/Asterisk.2013/Asterisk.NET/AsterNET.csproj
@@ -232,6 +232,7 @@
+
diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/DialBeginEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/DialBeginEvent.cs
new file mode 100644
index 0000000..4c11454
--- /dev/null
+++ b/Asterisk.2013/Asterisk.NET/Manager/Event/DialBeginEvent.cs
@@ -0,0 +1,18 @@
+namespace AsterNET.Manager.Event
+{
+ ///
+ /// A dial begin event is triggered whenever a phone attempts to dial someone.
+ /// This event is implemented in apps/app_dial.c.
+ /// Available since Asterisk 1.2.
+ ///
+ public class DialBeginEvent : DialEvent
+ {
+ ///
+ /// Creates a new DialBeginEvent.
+ ///
+ public DialBeginEvent(ManagerConnection source)
+ : base(source)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs
index 2300c32..bbc75a5 100644
--- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs
+++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs
@@ -95,15 +95,16 @@ namespace AsterNET.Manager
public delegate void BridgeDestroyEventHandler(object sender, Event.BridgeDestroyEvent e);
public delegate void BridgeEnterEventHandler(object sender, Event.BridgeEnterEvent e);
public delegate void BridgeLeaveEventHandler(object sender, Event.BridgeLeaveEvent e);
+ public delegate void DialBeginEventHandler(object sender, Event.DialBeginEvent e);
- #endregion
+ #endregion
- ///
- /// Default implemention of the ManagerConnection interface.
- ///
- public class ManagerConnection
+ ///
+ /// Default implemention of the ManagerConnection interface.
+ ///
+ public class ManagerConnection
{
#region Variables
@@ -486,11 +487,16 @@ namespace AsterNET.Manager
public event BridgeEnterEventHandler BridgeEnter;
public event BridgeLeaveEventHandler BridgeLeave;
- #endregion
+ ///
+ /// Raised when a dial action has started.
+ ///
+ public event DialBeginEventHandler DialBegin;
- #region Constructor - ManagerConnection()
- /// Creates a new instance.
- public ManagerConnection()
+ #endregion
+
+ #region Constructor - ManagerConnection()
+ /// Creates a new instance.
+ public ManagerConnection()
{
callerThread = Thread.CurrentThread;
@@ -595,11 +601,11 @@ namespace AsterNET.Manager
Helper.RegisterEventHandler(registeredEventHandlers, 90, typeof(BridgeEnterEvent));
Helper.RegisterEventHandler(registeredEventHandlers, 91, typeof(BridgeLeaveEvent));
Helper.RegisterEventHandler(registeredEventHandlers, 92, typeof(BlindTransferEvent));
-
+ Helper.RegisterEventHandler(registeredEventHandlers, 93, typeof(DialBeginEvent));
- #endregion
+ #endregion
- this.internalEvent += new ManagerEventHandler(internalEventHandler);
+ this.internalEvent += new ManagerEventHandler(internalEventHandler);
}
#endregion
@@ -1214,7 +1220,13 @@ namespace AsterNET.Manager
BlindTransfer(this, (BlindTransferEvent)e);
}
break;
- default:
+ case 93:
+ if (DialBegin != null)
+ {
+ DialBegin(this, (DialBeginEvent)e);
+ }
+ break;
+ default:
if (UnhandledEvent != null)
UnhandledEvent(this, e);
return;
diff --git a/Asterisk.2013/ChangeLog.txt b/Asterisk.2013/ChangeLog.txt
index 65924a6..4162b4f 100644
--- a/Asterisk.2013/ChangeLog.txt
+++ b/Asterisk.2013/ChangeLog.txt
@@ -1,3 +1,6 @@
+20.09.2016 (herman1vdb)
+ Added DialBeginEvent
+
05.01.2015 (Skrusty)
Added a sandcastle documentation project to AsterNET. Initial draft includes CHM and HTML output based on AsterNET 1.0.0.