[Asterisk-Dev] AgentCallbackLogin, 1.2-beta1 issues

alan alan at pair.com
Mon Sep 12 13:40:39 MST 2005


Hello.

I have a problem with AgentCallBackLogin which I believe is a bug. This
is reproduceable in Asterisk 1.2-beta1 (and HEAD, since the code is
unchanged), but it is not new to this version. This issue, in
combination with other oddities, makes the agent/queue system difficult
for us to use in practice.

When an agent who is logged in with AgentCallbackLogin logs in at
another extension (without logging out first), they are no longer dialed
at their original extension, but ${AGENTBYCALLERID_${CALLERIDNUM}} for
the original extension stays populated with their agent ID. This makes
it impossible for the dial plan to detect whether someone is logged in
to the old extension.

This could easily be fixed in action_agent_callback_login by resetting
the old AGENTBYCALLERID variable prior to logging in. Just test for
!ast_strlen_zero(p->loginchan) prior to setting p->loginchan, and if so,
null out p->loginchan and call set_agentbycallerid(p).


I am using AGENTBYCALLERID to prevent multiple agents from logging in to
the same extension, which is a discussion for a different day.


Thank you very much,

Alan Ferrency
pairNIC
alan at pair.com



More information about the asterisk-dev mailing list