Thread: [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 |
From: Carlos G M. <tr...@hu...> - 2008-02-18 15:02:48
|
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 ? 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.) 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. 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! > -- Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina |
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 |
From: Carlos G M. <tr...@hu...> - 2008-02-18 17:08:19
|
Pau Tallada Crespí @ 18/02/2008 14:37 -0200 dixit: > 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. Well, there seem to be many ways to implement queues, I'm not 100% sure I know all of them. CallBack agents, which is what I use, seem to have different functionality depending on the underlying channel (SIP/IAX/Zap/???) > 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? I don't see why it would be an overkill. You have to have the events anyway. Yes, I get the states ok. There is an "intermediate" state in 1.2, when the queue checks the state of the would be selected agent that I expose. 1.2 selects agents one at a time, I haven't moved to 1.4 yet. I kind of extend what's related to the agent, that was the main reason not to go inside Asterisk-Java (I agree that Live API should follow aseterisk semantics closely). E.g. my "agents" do have associated IP address, and state, which now tracks being paused or in "out states". I plan to have "outgoing" state as soon as I settle in a model that handles the multi line problem nicely... I have not documented this much, but I could. -Carlos > > 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! > > > -- Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina |
From: Martin S. <ma...@be...> - 2008-02-19 15:42:04
|
Hi Carlos, I'm definitely interested. I think it would also be interesting to start some sort of F/OSS project for this kind of thing -- mostly listening to events from Asterisk and generating statistics and realtime "dashboards" and whatnot. I'd love to see what other folks are up to in this area :) Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of Carlos G Mendioroz > Subject: Re: [Asterisk-java-devel] AgentState RINGING > > 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.) > > 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. |
From: Carlos G M. <tr...@hu...> - 2008-02-19 16:43:25
|
Fine with me. Hope Stefen is ok with us using some list BW for this :) Current development nickname is Terminus, which already has a sibling at sourceforge, but related to NMS. TMI for Terminus Management Interface (the current backend name) seems free. As I said, this is work in progress, but if we can keep it general, may be a good thing to share. -Carlos Martin Smith @ 19/02/2008 13:41 -0200 dixit: > Hi Carlos, > > I'm definitely interested. I think it would also be interesting to start > some sort of F/OSS project for this kind of thing -- mostly listening to > events from Asterisk and generating statistics and realtime "dashboards" > and whatnot. I'd love to see what other folks are up to in this area :) > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > >> -----Original Message----- >> From: ast...@li... >> [mailto:ast...@li...] On >> Behalf Of Carlos G Mendioroz >> Subject: Re: [Asterisk-java-devel] AgentState RINGING >> >> 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.) >> >> 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. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > -- Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina |
From: Stefan R. <ste...@re...> - 2008-02-26 01:55:29
Attachments:
signature.asc
|
Carlos G Mendioroz wrote: > Fine with me. Hope Stefen is ok with us using some list BW for this :) > Current development nickname is Terminus, which already has a sibling > at sourceforge, but related to NMS. TMI for Terminus Management > Interface (the current backend name) seems free. Sounds like an interesting project indeed. It would be great if you could use the live API for this so we can further enhance it. I found myself to reinvent the wheel far to often writing basically the same event parsing/call tracking code over and over again - that's what lead me to the live API :) If there is anything I can do to help you just let me know. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Carlos G M. <tr...@hu...> - 2008-02-26 10:13:04
|
Stefan Reuter @ 25/02/2008 23:55 -0200 dixit: > Carlos G Mendioroz wrote: >> Fine with me. Hope Stefen is ok with us using some list BW for this :) >> Current development nickname is Terminus, which already has a sibling >> at sourceforge, but related to NMS. TMI for Terminus Management >> Interface (the current backend name) seems free. > > Sounds like an interesting project indeed. It would be great if you > could use the live API for this so we can further enhance it. > I found myself to reinvent the wheel far to often writing basically the > same event parsing/call tracking code over and over again - that's what > lead me to the live API :) Sounds familiar :) Agreed that a litle extra cost for not completelly aligned objetives is worth the added stability of the code. > > If there is anything I can do to help you just let me know. > > =Stefan I'll take a look at the live API. One of my concerns is that being asterisk so general and low level, when you start building compound functionality you end up "fixing" ways of doing things, and then loose generality. E.g. I use IAX agents (mostly) because I found a client for windows and linux that I could change to integrate remote dialing and status. But then now my code expects agent->ip mapping being revealed by iax peering. Many use SIP clients and... That's easy to fix, but just a hint. Enhanced agent states, outgoing call tracking, etc, might be not so easy or posible at all. Back to offer, being here and sharing your code and knowledge is more than what I would ask for :) -Carlos -- Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina |