re-add musiconholdevent
re-add musiconholdevent add summaries
This commit is contained in:
parent
bc29b8feb5
commit
5b2dece945
45
Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs
Normal file
45
Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
namespace AsterNET.Manager.Event
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A MusicOnHoldEvent is triggered when music on hold starts or stops on a channel.<br/>
|
||||||
|
/// It is implemented in res/res_musiconhold.c.<br/>
|
||||||
|
/// Available since Asterisk 1.6
|
||||||
|
/// </summary>
|
||||||
|
public class MusicOnHoldEvent : ManagerEvent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new <see cref="MusicOnHoldEvent" />.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source"><see cref="ManagerConnection"/></param>
|
||||||
|
public MusicOnHoldEvent(ManagerConnection source) : base(source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the state.
|
||||||
|
/// </summary>
|
||||||
|
public string State { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the class.<br/>
|
||||||
|
/// The class of music being played on the channel.
|
||||||
|
/// </summary>
|
||||||
|
public string Class { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the account code.
|
||||||
|
/// </summary>
|
||||||
|
public string AccountCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the language.
|
||||||
|
/// </summary>
|
||||||
|
public string Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Linked Id<br/>
|
||||||
|
/// UniqueId of the oldest channel associated with this channel.
|
||||||
|
/// </summary>
|
||||||
|
public string LinkedId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,24 +15,71 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the class of music being played on the channel.
|
/// Gets or sets the class.<br/>
|
||||||
|
/// The class of music being played on the channel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Class { get; set; }
|
public string Class { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the channel state.<br/>
|
||||||
|
/// A numeric code for the channel's current state, related to ChannelStateDesc
|
||||||
|
/// </summary>
|
||||||
public string ChannelState { get; set; }
|
public string ChannelState { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the channel state description.
|
||||||
|
/// </summary>
|
||||||
public string ChannelStateDesc { get; set; }
|
public string ChannelStateDesc { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Caller*ID number.
|
||||||
|
/// </summary>
|
||||||
public string CallerIDNum { get; set; }
|
public string CallerIDNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Caller*ID name.
|
||||||
|
/// </summary>
|
||||||
public string CallerIDName { get; set; }
|
public string CallerIDName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the connected line number.
|
||||||
|
/// </summary>
|
||||||
public string ConnectedLineNum { get; set; }
|
public string ConnectedLineNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the connected line name.
|
||||||
|
/// </summary>
|
||||||
public string ConnectedLineName { get; set; }
|
public string ConnectedLineName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the language.
|
||||||
|
/// </summary>
|
||||||
public string Language { get; set; }
|
public string Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the account code.
|
||||||
|
/// </summary>
|
||||||
public string AccountCode { get; set; }
|
public string AccountCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the context.
|
||||||
|
/// </summary>
|
||||||
public string Context { get; set; }
|
public string Context { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the exten.
|
||||||
|
/// </summary>
|
||||||
public string Exten { get; set; }
|
public string Exten { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the priority.
|
||||||
|
/// </summary>
|
||||||
public string Priority { get; set; }
|
public string Priority { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Linked Id
|
||||||
|
/// UniqueId of the oldest channel associated with this channel.
|
||||||
|
/// </summary>
|
||||||
|
public string LinkedId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,21 +13,67 @@
|
||||||
public MusicOnHoldStopEvent(ManagerConnection source) : base(source)
|
public MusicOnHoldStopEvent(ManagerConnection source) : base(source)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the channel state.<br/>
|
||||||
|
/// A numeric code for the channel's current state, related to ChannelStateDesc
|
||||||
|
/// </summary>
|
||||||
public string ChannelState { get; set; }
|
public string ChannelState { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the channel state description.
|
||||||
|
/// </summary>
|
||||||
public string ChannelStateDesc { get; set; }
|
public string ChannelStateDesc { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Caller*ID number.
|
||||||
|
/// </summary>
|
||||||
public string CallerIDNum { get; set; }
|
public string CallerIDNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Caller*ID name.
|
||||||
|
/// </summary>
|
||||||
public string CallerIDName { get; set; }
|
public string CallerIDName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the connected line number.
|
||||||
|
/// </summary>
|
||||||
public string ConnectedLineNum { get; set; }
|
public string ConnectedLineNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the connected line name.
|
||||||
|
/// </summary>
|
||||||
public string ConnectedLineName { get; set; }
|
public string ConnectedLineName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the language.
|
||||||
|
/// </summary>
|
||||||
public string Language { get; set; }
|
public string Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the account code.
|
||||||
|
/// </summary>
|
||||||
public string AccountCode { get; set; }
|
public string AccountCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the context.
|
||||||
|
/// </summary>
|
||||||
public string Context { get; set; }
|
public string Context { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the exten.
|
||||||
|
/// </summary>
|
||||||
public string Exten { get; set; }
|
public string Exten { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the priority.
|
||||||
|
/// </summary>
|
||||||
public string Priority { get; set; }
|
public string Priority { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Linked Id
|
||||||
|
/// UniqueId of the oldest channel associated with this channel.
|
||||||
|
/// </summary>
|
||||||
|
public string LinkedId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -427,12 +427,20 @@ namespace AsterNET.Manager
|
||||||
public event EventHandler<QueueMemberPauseEvent> QueueMemberPause;
|
public event EventHandler<QueueMemberPauseEvent> QueueMemberPause;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raised when music on hold has started on a channel.
|
/// Raised when music on hold has started/stopped on a channel.<br />
|
||||||
|
/// <b>Available since : </b> Asterisk 1.6.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler<MusicOnHoldEvent> MusicOnHold;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raised when music on hold has started on a channel.<br />
|
||||||
|
/// <b>Available since : </b> <see href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Documentation" target="_blank" alt="Asterisk 12 wiki docs">Asterisk 12</see>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler<MusicOnHoldStartEvent> MusicOnHoldStart;
|
public event EventHandler<MusicOnHoldStartEvent> MusicOnHoldStart;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raised when music on hold has stopped on a channel.
|
/// Raised when music on hold has stopped on a channel.<br />
|
||||||
|
/// <b>Available since : </b> <see href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Documentation" target="_blank" alt="Asterisk 12 wiki docs">Asterisk 12</see>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler<MusicOnHoldStopEvent> MusicOnHoldStop;
|
public event EventHandler<MusicOnHoldStopEvent> MusicOnHoldStop;
|
||||||
|
|
||||||
|
@ -579,6 +587,7 @@ namespace AsterNET.Manager
|
||||||
Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerJoinEvent), arg => fireEvent(QueueCallerJoin, arg));
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerJoinEvent), arg => fireEvent(QueueCallerJoin, arg));
|
||||||
Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerLeaveEvent), arg => fireEvent(QueueCallerLeave, arg));
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerLeaveEvent), arg => fireEvent(QueueCallerLeave, arg));
|
||||||
Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueMemberPauseEvent), arg => fireEvent(QueueMemberPause, arg));
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueMemberPauseEvent), arg => fireEvent(QueueMemberPause, arg));
|
||||||
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldEvent), arg => fireEvent(MusicOnHold, arg));
|
||||||
Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStartEvent), arg => fireEvent(MusicOnHoldStart, arg));
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStartEvent), arg => fireEvent(MusicOnHoldStart, arg));
|
||||||
Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStopEvent), arg => fireEvent(MusicOnHoldStop, arg));
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStopEvent), arg => fireEvent(MusicOnHoldStop, arg));
|
||||||
Helper.RegisterEventHandler(registeredEventHandlers, typeof(ChallengeResponseFailedEvent), arg => fireEvent(ChallengeResponseFailed, arg));
|
Helper.RegisterEventHandler(registeredEventHandlers, typeof(ChallengeResponseFailedEvent), arg => fireEvent(ChallengeResponseFailed, arg));
|
||||||
|
|
Loading…
Reference in a new issue