Summary:ASTERISK-04499: ${AGENTBYCALLERID_${CALLERID} variable is not updated when kicked
Reporter:Johann Hoehn (johann)Labels:
Date Opened:2005-06-29 07:00:10Date Closed:2008-01-15 15:40:01.000-0600
Versions:Frequency of
Description:The variable ${AGENTBYCALLERID_${CALLERID}} is set to their extension(example 4000) after they login with the AgentCallbackLogin().  It is properly cleared when they log out as well.  However, if they are removed from a queue due to not answer, the variable is NOT removed.

By being able to detect if the variable is set it would allow people to design a single extension that would toggle them on or off of as an agent.


The following test extensions were used to report the status of the variable and to login

;; extensions.conf
; testing combined login/logout
exten => 8610,1,NoOp(${AGENTBYCALLERID_${CALLERID}})
exten => 8610,2,AgentCallbackLogin(4000|4000@queue)
exten => 8611,1,NoOp(${AGENTBYCALLERID_${CALLERID}})
exten => 8611,2,AgentCallbackLogin(4000|'#')
exten => 8612,1,NoOp(${AGENTBYCALLERID_${CALLERID}})

;; queues.conf
strategy = leastrecent
leavewhenempty = yes
announce-holdtime = yes
announce-round-seconds = 10
announce-frequency = 60
retry = 5
timeout = 11
wrapuptime = 3
member => Agent/4000

Comments:By: Kevin P. Fleming (kpfleming) 2005-07-05 21:22:23

This has been fixed in CVS HEAD, but will likely not be fixed in CVS STABLE, because it's both invasive and it requires 'agent persistence' to do it correctly (so that the CallerID can be remembered across reloads/restarts).

In CVS HEAD, the CallerID is now remembered at AgentCallbackLogin time, which has a few benefits:

- at logoff time, we use the same CallerID, instead of any different CallerID the agent may happen to have been changed to
- we can now clear AGENTBYCALLERID during the Manager AgentLogoff action
- we can now clear AGENTBYCALLERID during the auto-logoff operation

By: Digium Subversion (svnbot) 2008-01-15 15:40:01.000-0600

Repository: asterisk
Revision: 6036

U   trunk/channels/chan_agent.c

r6036 | kpfleming | 2008-01-15 15:40:01 -0600 (Tue, 15 Jan 2008) | 4 lines

remember CallerID in AgentCallbackLogin, so it can be used at logoff time
use stored CallerID when auto-logoff occurs to clear AGENTBYCALLERID variable (bug ASTERISK-4499)
persist stored CallerID into/out of astdb