Re: [Asterisk-java-devel] AgentState RINGING
Brought to you by:
srt
|
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
|