[Asterisk-Users] AgentCalled event

Alex Brett alex.brett at loho.co.uk
Thu Apr 13 06:20:26 MST 2006


Hi,

I'm writing a Java client/server application that talks to the Asterisk 
manager interface via the asterisk-java stuff. The idea being it will 
give you an app to run on your desktop that monitors your phone 
essentially. Once I've got something vaguely working it will be released 
under the GPL and hopefully people will contribute to it etc...

As part of this, I'm currently trying to understand the various Asterisk 
manager events, for normal calls I can now successfully keep track of 
them, understand when they finished, if they were answered or not, 
handle transfers etc etc. The problem I've got is with queues. In my 
system for example I used AgentCallbackLogin. I can handle the renaming 
that happens when a call is connected to an Agent, the problem I've got 
is determining what queue a call to an agent is from (I have the same 
agents in multiple queues).

The reason I'm having problems, is that the AgentCalled event doesn't 
have a queue name in it, is this deliberate, and if so why, as the 
AgentConnect and AgentComplete events both have queue names in. I've 
come up with a workaround by looking at the context on the AgentCalled 
event, but this isn't reliable enough to use in general, as it is 
specific to my system.

The other issue is that I'm wondering if there is a better way of 
determining if a new call is an agent call other than matching the 
callerid details from the AgentCalled event with the incoming call, and 
if they match and its within a certain amount of time of the AgentCalled 
event assume they're related. I guess what I'm looking for is a uniqueid 
in the AgentCalled event that I can simply compare?

Thanks in advance,
Alex Brett
alex.brett at loho.co.uk
http://www.loho.co.uk/




More information about the asterisk-users mailing list