[Asterisk-Users] AgentCalled event
BJ Weschke
bweschke at gmail.com
Thu Apr 13 06:38:37 MST 2006
On 4/13/06, Alex Brett <alex.brett at loho.co.uk> wrote:
> 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?
>
It is intentional because AgentCalled is fired off from within
chan_agent and you can call an agent's channel from outside of a
queue. AgentConnect and AgentComplete are called from app_queue. I
agree, it is somewhat confusing. We should probably consider a change
to the terminology.
--
Bird's The Word Technologies, Inc.
http://www.btwtech.com/
More information about the asterisk-users
mailing list