add DialBeginEvent

This commit is contained in:
Herman van den Berg 2016-09-20 15:29:46 +02:00
parent 75e737f694
commit 959c53de8c
4 changed files with 47 additions and 13 deletions

View file

@ -232,6 +232,7 @@
<Compile Include="Manager\Event\BridgeEvent.cs" />
<Compile Include="Manager\Event\ChannelReloadEvent.cs" />
<Compile Include="Manager\Event\ChannelUpdateEvent.cs" />
<Compile Include="Manager\Event\DialBeginEvent.cs" />
<Compile Include="Manager\Event\FailedACLEvent.cs" />
<Compile Include="Manager\Event\MeetmeMuteEvent.cs" />
<Compile Include="Manager\Event\DTMFEvent.cs" />

View file

@ -0,0 +1,18 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// A dial begin event is triggered whenever a phone attempts to dial someone.<br/>
/// This event is implemented in apps/app_dial.c.<br/>
/// Available since Asterisk 1.2.
/// </summary>
public class DialBeginEvent : DialEvent
{
/// <summary>
/// Creates a new DialBeginEvent.
/// </summary>
public DialBeginEvent(ManagerConnection source)
: base(source)
{
}
}
}

View file

@ -95,6 +95,7 @@ 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);
@ -486,6 +487,11 @@ namespace AsterNET.Manager
public event BridgeEnterEventHandler BridgeEnter;
public event BridgeLeaveEventHandler BridgeLeave;
/// <summary>
/// Raised when a dial action has started.<br/>
/// </summary>
public event DialBeginEventHandler DialBegin;
#endregion
#region Constructor - ManagerConnection()
@ -595,7 +601,7 @@ 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
@ -1214,6 +1220,12 @@ namespace AsterNET.Manager
BlindTransfer(this, (BlindTransferEvent)e);
}
break;
case 93:
if (DialBegin != null)
{
DialBegin(this, (DialBeginEvent)e);
}
break;
default:
if (UnhandledEvent != null)
UnhandledEvent(this, e);

View file

@ -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.