Merge pull request #133 from Pazkov/chan_agent-to-app_agent_pool

Chan agent to app agent pool
This commit is contained in:
Ben Merrills 2018-10-22 16:17:39 +01:00 committed by GitHub
commit 6dbba33a52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 121 additions and 11 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.<br />
/// Available since Asterisk 12.
/// </summary>
public string StateInterface { get; set; }
} }
} }

View file

@ -16,7 +16,14 @@ namespace AsterNET.Manager.Event
public string Queue { get; set; } public string Queue { get; set; }
/// <summary> /// <summary>
/// Get/Set the name of the member's interface. /// Get/Set the name of the member's interface.<br />
/// Added in Asterisk 12
/// </summary>
public string Interface { get; set; }
/// <summary>
/// Get/Set the name of the member's interface.<br />
/// Removed in asterisk 12
/// </summary> /// </summary>
public string Member { get; set; } public string Member { get; set; }

View file

@ -16,7 +16,8 @@ namespace AsterNET.Manager.Event
public long HoldTime { get; set; } public long HoldTime { get; set; }
/// <summary> /// <summary>
/// Get/Set bridged channel. /// Get/Set bridged channel. <br />
/// Removed from Asterisk 12
/// </summary> /// </summary>
public string BridgedChannel { get; set; } public string BridgedChannel { 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,11 +17,12 @@ 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.
/// </summary> /// </summary>
public string Name public string Name
{ {
get { return this.name; } get { return this.name; }
set { this.name = value; } set { this.name = value; }
@ -123,8 +124,19 @@ 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)
{ {
} }