Re: [Asterisk-java-users] AsteriskQueue Interface
Brought to you by:
srt
From: Chris H. <ch...@as...> - 2006-09-27 13:22:37
|
Stefan Reuter wrote: > Hey Chris, > > >> 1. Number of queue members logged into the queue. >> 2. Number of queue members available to take calls >> 3. Number of channels currently waiting in the queue (looks like >> AsteriskQueue will do this one) >> 4. Average wait time. >> > > Yes these sound like a good fit for AsteriskQueue. > > >> It looks like the AsteriskQueue interface is a good start for this but >> I'm not sure if it's even possible to get the other information without >> parsing through a big list of queuemember responses. >> > > There already is an empty method in live.internal.QueueManager called > handleQueueMemberEvent() that is called on initialization, where we > could put some meat in. > A new live object QueueMember (or AsteriskAgent) will be needed to > represent agents. > The interesting part starts after initialization, i.e. tracking agent > events and updating the model. The relevant ones seem to be > - AgentLoginEvent > - AgentLogoffEvent > - AgentCallbackLoginEvent > - AgentCallbackLogoffEvent > To associate agents with the callers they are serving (and to see > whether they are busy or not) looking for AgentCalledEvents will be > needed as well as observing the associated channel for hangup or > redirection so we know when the agent is available again. > > Once that has been done some new methods could be added to AsteriskQueue > and AsteriskAgent like support for easy login/logout, etc. > We are doing something similar in our queue management application (external from Asterisk-Java). Getting the initial state is fun as you probably already have callers in the queue and agents on the phone. I'm willing to invest some resources in this as it would make my life much easier to keep this info in Aasterisk-Java and make my presentation piece more light weight. Where do we start? > >> I'm thinking about >> adding an action to asterisk QueueStatSummaryRequest that will take as >> an argument the queue name and return the above info as a response (I >> really hate the way asterisk tries to send events as a response). Any >> thoughts? >> > I hope that this is not needed because the idea of the live package is > to observe asterisk events and update an in memory model of asterisks > state so you dont have to talk to asterisk each time you query the state. > For our immediate needs we created a QueueSummary action that returns the info needed. This patch has already been accepted in trunk. http://bugs.digium.com/view.php?id=8035 -- Chris Howard Email: ch...@as... Director Software Development Direct: 256.705.0262 Asteria Solutions Group, Inc. Main: 256.705.0277 2904 WestCorp BLVD, Suite 203 Fax: 256.705.0280 Huntsville, AL, 35805 Fax2Mail: 256.705.0262 http://www.asteriasgi.com Toll-Free: 877.ASGI.4.ME |