Summary:ASTERISK-22669: AMI/CLI Agent Logoff with soft logs out agent on subsequent logins
Reporter:John Bigelow (jbigelow)Labels:
Date Opened:2013-10-08 13:45:29Date Closed:2013-10-08 16:24:01
Status:Closed/CompleteComponents:Applications/General PBX/General
Versions:12.0.0-alpha1 Frequency of
Environment:Asterisk 12 branch r400672Attachments:( 0) full-agentlogoff.txt
Description:With an agent logged in and the AMI action AgentLogoff with 'soft: true' specified or the equivalent CLI command 'agent logoff <agent> soft' is used, then upon subsequent logins the agent is logged off almost immediately (after about 3 seconds).

Steps taken:
* Login agent
* Issue AMI action or CLI command with specifying 'soft' (no need for the agent to be bridged with another channel to reproduce)
* Login agent again. MOH will briefly be heard and then the agent is logged off.

I believe this message is a good indicated of whats going on. This occurs when logging in an agent after it was logged off using 'soft'. It appears the deferred logoff is never cleared from the agent.
[Oct  8 13:17:30] DEBUG[18225][C-00000001] app_agent_pool.c: Agent 1002: Deferred logoff.

The full log is attached.