Summary:ASTERISK-23499: app_agent_pool: Interval hook prevents channel from being hung up
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-03-18 12:51:53Date Closed:2014-05-28 11:27:46
Status:Closed/CompleteComponents:Applications/app_agent_pool Core/Bridging
Versions:12.1.1 Frequency of
Environment:Attachments:( 0) full.txt
Description:The agent_acknowledge/agent_acknowledge_error test uncovered this particular bug.

When an agent has a prompt that is played for it as an acknowledgement, but the agent never chooses to acknowledge the new call correctly (via not pressing a DTMF), the interval hook played for the agent will continue to play ad nauseum.

This becomes particularly bad if the channel is hung up. It will get removed from the application, but the interval hook will continue to play merrily along, preventing the channel from being disposed of.

The agent pool bridge should be smart enough to look at a channel that leaves the bridge. If the channel is leaving the bridge and it still has an interval hook on it, it should clean it up.
Comments:By: Richard Mudgett (rmudgett) 2014-05-22 17:19:24.088-0500

The original issue description is not a bug.  That interval hook is the agent heartbeat timer monitor and it fires every second the agent is in the holding bridge.  The test was configured with the agent's auto logoff timer disabled so the requesting channel will wait forever for the agent to correctly acknowledge the call.  Once the test declared the scenario a success the test failed to hangup the agent channel.

As a result of this issue:
1) If the agent fails to acknowledge the requesting call either by being auto logged off or hanging up, the requesting call will continue in the dialplan with the AGENT_STATUS channel variable set to NOT_CONNECTED.  Reviewboard: https://reviewboard.asterisk.org/r/3551/
2) The testsuite agent_acknowledge_error test scenario is fixed to auto logoff the agent and setup so it can actually fail.  Reviewboard: https://reviewboard.asterisk.org/r/3561/