[Asterisk-java-devel] AgentState RINGING
Brought to you by:
srt
From: Pau T. C. <pta...@ru...> - 2008-02-18 14:39:22
|
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 |