Re: [Asterisk-java-devel] AgentState RINGING
Brought to you by:
srt
From: Pau T. C. <pta...@ru...> - 2008-02-18 16:37:29
|
El Monday 18 February 2008 16:02:30 Carlos G Mendioroz va escriure: > Paul, > I'm not using Live API, but I guess it would be helpful to know what > kind of agent. You say that the call stops ringing at the agent but the > state remains ringing, right ? Yes, the agent is a king of extensions that can be associated to any number of queues and pick up calls from those queues. It's interesting to see the state of the agents in real-time, whos is idle, who is on call, who is ringing, etc. > > BTW, I've done a small app to monitor agents which is based on a backend > daemon that uses Asterisk Java to track manager events (mostly) and > a frontend to show agents and queues, the idea being that the daemon > will grow to generate call center metrics that are lacking AFAIK from > asterisk (TT average/max, TTA average/max, presented/handled/abandon > counts for queues and agents, etc.) That's very interesting. It's a pity Asterisk don't provide those statistics itself, it would be optimal. > > If there is interest, I can share the code, or if there is an argument > to integrate this to Live API, I would like to hear it. Well, I don't know if this kind of statistics-collecting-monitor functionality will belong to Asterisk-Java, but I'm pretty sure it could be implemented with the Live API when its feature complete. So do you use Manager API directly and use all the events generated to keep the agent status? Is'nt it some of an overkill? Can you reliably get agent status? Thanks! > > Frontend/backend interface is plain text over TCP, for easy debugging > and framework decoupling, even though both are 100% java for the time > being: $ telnet doors 4300 > Trying 172.30.0.1... > Connected to doors. > Escape character is '^]'. > A|2000|Carlos Mendioroz|-|-|gone|||-|-|0 > A|2001|Agent 2001|-|-|gone|||-|-|0 > Q|testQueue|0|0|0|0|0|0 > L|1203346873 > > Regards, > -Carlos > > Pau Tallada Crespí @ 18/02/2008 12:39 -0200 dixit: > > Hi! > > > > I'm using latest Asterisk-Java snapshot. > > I'm developing a simple callcenter monitoring app using Live API. > > Trying to monitor Agents state, sometimes an Agent gets stuck in RINGING > > state. > > This happens when this Agents receives a call from a queue but the party > > doing the call hangs up before the agent picks up the all. If the agent > > picks the call or hangs-up the state updates correctly. > > > > Is there any problem with this state? Is this a problem of Asterisk event > > handling? Or it is my fault? > > > > The code is similar to this... > > > > public class AgentPanel > > extends javax.swing.JPanel > > implements PropertyChangeListener > > { > > > > private AsteriskAgent agent; > > > > public AgentPanel(AsteriskAgent agent) { > > initComponents(); > > this.agent = agent; > > initialize(); > > } > > > > private void initialize() > > { > > agent.addPropertyChangeListener("state", this); > > } > > > > public void propertyChange(PropertyChangeEvent e) { > > if ((e.getOldValue() instanceof AgentState) || > > (e.getNewValue() instanceof AgentState)) > > { > > handleAgentStateChange(e); > > } > > } > > > > private void handleAgentStateChange(PropertyChangeEvent e) > > { > > updateState(); > > } > > > > [...] > > > > } > > > > Thanks in advance! -- Pau Tallada Crespí RunSolutions Open Source IT Consulting |