app_chan_agent modify some agents actions and events

This commit is contained in:
Sandro Pazzi 2018-02-06 23:10:44 +01:00
parent 9b92917925
commit 697e289037
3 changed files with 111 additions and 9 deletions

View file

@ -94,5 +94,11 @@ namespace AsterNET.Manager.Action
/// true if the queue member should be paused when added. /// true if the queue member should be paused when added.
/// </summary> /// </summary>
public bool Paused { get; set; } public bool Paused { get; set; }
/// <summary>
/// Get/Set an alternate interface to be used to determine the state of the member.
/// Available since Asterisk 12.
/// </summary>
public string StateInterface { get; set; }
} }
} }

View file

@ -39,18 +39,102 @@ namespace AsterNET.Manager.Event
public string Status { get; set; } public string Status { get; set; }
/// <summary> /// <summary>
/// Get/Set the name of channel this agent logged in from or "n/a" if the agent is not logged in. /// Get/Set the name of channel this agent logged in from or "n/a" if the agent is not logged in.<br />
/// Removed on Asterisk 12 app_agent_pool.so module. Use Channel instead.
/// </summary> /// </summary>
public string LoggedInChan { get; set; } public string LoggedInChan { get; set; }
/// <summary> /// <summary>
/// Get/Set the time (in seconds since 01/01/1970) when the agent logged in or 0 if the user is not logged. /// Get/Set the numerical Caller*ID of the channel this agent is talking toor "n/a" if this agent is talking to nobody.<br />
/// Removed on Asterisk 12 app_agent_pool.so module. Use TalkingToChan instead.
/// </summary>
public string TalkingTo { get; set; }
/// <summary>
/// Get/Set BRIDGEPEER value on agent channel.<br />
/// Present if Status value is AGENT_ONCALL.
/// </summary>
public string TalkingToChan { get; set; }
/// <summary>
/// Get/Set Epoche time when the agent started talking with the caller.<br />
/// Present if Status value is AGENT_ONCALL.
/// </summary>
public string CallStarted { get; set; }
/// <summary>
/// Get/Set the time (in seconds since 01/01/1970).<br />
/// Present if Status value is AGENT_IDLE or AGENT_ONCALL.
/// </summary> /// </summary>
public long LoggedInTime { get; set; } public long LoggedInTime { get; set; }
/// <summary> /// <summary>
/// Get/Set the numerical Caller*ID of the channel this agent is talking toor "n/a" if this agent is talking to nobody. /// Get/Set a numeric code for the channel's current state, related to ChannelStateDesc.
/// </summary> /// </summary>
public string TalkingTo { get; set; } public int ChannelState { get; set; }
/// <summary>
/// Get/Set a description for the channel's current state.<br />
/// This is one of
/// <dl>
/// <dt>Down</dt>
/// <dt>Rsrvd</dt>
/// <dt>OffHook</dt>
/// <dt>Dialing</dt>
/// <dt>Ring</dt>
/// <dt>Ringing</dt>
/// <dt>Up</dt>
/// <dt>Busy</dt>
/// <dt>Dialing Offhook</dt>
/// <dt>Pre-ring</dt>
/// <dt>Unknown</dt>
/// </dl>
/// </summary>
public string ChannelStateDesc { get; set; }
/// <summary>
/// Get/Set the callerID number.
/// </summary>
public string CallerIDNum { get; set; }
/// <summary>
/// Get/Set the callerID name.
/// </summary>
public string CallerIDName { get; set; }
/// <summary>
/// Get/Set the connected line number.
/// </summary>
public string ConnectedLineNum { get; set; }
/// <summary>
/// Get/Set the connected line name.
/// </summary>
public string ConnectedLineName { get; set; }
/// <summary>
/// Get/Set the account codee.
/// </summary>
public string AccountCode { get; set; }
/// <summary>
/// Get/Set the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Get/Set the extension.
/// </summary>
public string Exten { get; set; }
/// <summary>
/// Get/Set the agent priority.
/// </summary>
public int Priority { get; set; }
/// <summary>
/// Get/Set the uniqueid of the oldest channel associated with this channel.
/// </summary>
public int Linkedid { get; set; }
} }
} }

View file

@ -17,6 +17,7 @@ namespace AsterNET.Manager.Event
private int status; private int status;
private bool paused; private bool paused;
private string name; private string name;
private bool incall;
/// <summary> /// <summary>
/// Get/Set the name of the queue member. /// Get/Set the name of the queue member.
@ -123,6 +124,17 @@ namespace AsterNET.Manager.Event
get { return this.paused; } get { return this.paused; }
set { this.paused = value; } set { this.paused = value; }
} }
/// <summary>
/// Is this queue member in call??<br/>
/// Available since Asterisk 12.<br/>
/// true if this member is in call,
/// false if not
/// </summary>
public bool InCall
{
get { return this.incall; }
set { this.incall = value; }
}
public QueueMemberEvent(ManagerConnection source) public QueueMemberEvent(ManagerConnection source)
: base(source) : base(source)