[Home]

Summary:ASTERISK-12108: Autologoff is not working properly
Reporter:Rodrigo (rodrigo)Labels:
Date Opened:2008-05-29 10:01:48Date Closed:2008-06-09 10:03:19
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_agent
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 12754.patch
Description:Hello,

I have one asterisk 1.4.20.1 setup with one queue and various agents, in which the autologoff parameter is set in agents.conf

The problem is that only logs off the agent if and only if the caller hangs up while the call is at the agent; if the call goes through the queue and passes to the next agent, then it does not log off anybody.

I think it could be some trouble relationed with timing of the queue/autologoff but I have been making throughout testing with no final evidence.
Comments:By: Mark Michelson (mmichelson) 2008-05-29 16:40:59

The autologoff feature in chan_agent is a bit finicky, but luckily the wording used in the configuration file is mostly accurate.

"This is how long the phone has to ring with no answer before the agent is automatically logged off"

This is accurate in the sense that *only* the time that the agent's phone is actually ringing is taken into account towards auto logoff. It also is misleading since the amount of time the phone rings has to be greater than the amount of time specified by autologoff in order for the agent to be logged off automatically, and also the agent will only be logged out when some sort of "event" causes the agent's phone to stop ringing (i.e. the queue moves on to a different agent or the caller hangs up).

Now, it may be that you are perfectly aware of the autologoff implementation and if you were, I apologize, but you didn't give a lot of details here. Two very important details would be the queue's timeout value specified in queues.conf, and the other would be the value specified in agents.conf for autologoff. If the timeout in queues.conf is less than or equal to the autologoff time in agents.conf, then I would not be surprised by the behavior you are seeing. On the other hand, if your autologoff time is less than the queues.conf timeout, then the agent should be logged off automatically if the call passes through to the next agent.

By: Rodrigo (rodrigo) 2008-05-30 01:08:35

Thank you for the detailed description.

Sorry for not being more detailed, but I do not exactly what would you need, I guess is a matter of time (for my second bug report, I presume :-)

The autologoff parameter is set at 4 seconds, and the queue timeout is at 600 seconds (in order to display a periodic-announce each 15 seconds)

The thing is that I am having the autologoff time smaller than the queues.conf timeout.

Being more exactly:

---->queues.conf

[queue]
music=default
timeout=600
retry=7
maxlen=0
periodic-announce-frequency=15
periodic-announce = busy_wait
strategy=leastrecent
member=>Agent/101,1
member=>Agent/102,1

---->agents.conf

[general]
persistentagents=yes

[agents]
autologoff=4
musiconhold => default
recordagentcalls=yes

agent => 101,,"101"
agent => 102,,"102"

---->extensions.conf

exten => s,1,Answer()
exten => s,n,Queue(alcala)

Obviously I have cut the significant code, leaving behind what (I think) it is not important. If you need any other piece of code, ask for it.

Thank you

By: Mark Michelson (mmichelson) 2008-06-03 18:35:19

Ah, I think I see what might be happening now. In order for autologoff to occur in your scenario, the entire 600 second timeout would have to elapse. I think that your Dial() calls in the dialplan have a much smaller timeout. As a result, the 600 second timeout is never reached.

As a temporary workaround, you can remove the timeout from the Dial() application and instead set the timeout in queues.conf to that value. I will work on allowing autologoff to work in your scenario, too.

By: Mark Michelson (mmichelson) 2008-06-03 18:55:57

I have uploaded a patch to try. See if this fixes the issue for you.

By: Rodrigo (rodrigo) 2008-06-04 02:12:35

Thank you, I will be testing it ASAP. As results come I will keep you up to date.

By: Rodrigo (rodrigo) 2008-06-09 06:01:17

The tests have been a complete success, with the patch you provided. Thank you for your interest and your time.

Best regards

Rodrigo

By: Mark Michelson (mmichelson) 2008-06-09 09:48:22

Excellent. I'm glad I could help out. I will be committing the patch ASAP.

By: Digium Subversion (svnbot) 2008-06-09 09:56:01

Repository: asterisk
Revision: 121229

U   branches/1.4/channels/chan_agent.c

------------------------------------------------------------------------
r121229 | mmichelson | 2008-06-09 09:56:00 -0500 (Mon, 09 Jun 2008) | 16 lines

A unique situation of timeouts brought forth a failure situation for
autologoff in chan_agent. If using AgentCallbackLogin-style agents,
then if the timeout specified by the Dial() to reach the agent's phone
was shorter than the timeout specified in queues.conf, then autologoff
would only work if the caller hung up while the agent's phone was ringing.
This patch allows autologoff to work in this situation when the call in
queue transfers to the next available agent (as it would have if the timeout
in queues.conf were less than the timeout in the Dial()).

(closes issue ASTERISK-12108)
Reported by: Rodrigo
Patches:
     12754.patch uploaded by putnopvut (license 60)
Tested by: Rodrigo


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121229

By: Digium Subversion (svnbot) 2008-06-09 10:02:26

Repository: asterisk
Revision: 121230

_U  trunk/
U   trunk/channels/chan_agent.c

------------------------------------------------------------------------
r121230 | mmichelson | 2008-06-09 10:02:25 -0500 (Mon, 09 Jun 2008) | 27 lines

Merged revisions 121229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(Note that this is being merged to trunk/1.6.0 because
it may affect non-callback agents with ackcall set)

........
r121229 | mmichelson | 2008-06-09 10:02:37 -0500 (Mon, 09 Jun 2008) | 16 lines

A unique situation of timeouts brought forth a failure situation for
autologoff in chan_agent. If using AgentCallbackLogin-style agents,
then if the timeout specified by the Dial() to reach the agent's phone
was shorter than the timeout specified in queues.conf, then autologoff
would only work if the caller hung up while the agent's phone was ringing.
This patch allows autologoff to work in this situation when the call in
queue transfers to the next available agent (as it would have if the timeout
in queues.conf were less than the timeout in the Dial()).

(closes issue ASTERISK-12108)
Reported by: Rodrigo
Patches:
     12754.patch uploaded by putnopvut (license 60)
Tested by: Rodrigo


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121230

By: Digium Subversion (svnbot) 2008-06-09 10:03:19

Repository: asterisk
Revision: 121231

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_agent.c

------------------------------------------------------------------------
r121231 | mmichelson | 2008-06-09 10:03:19 -0500 (Mon, 09 Jun 2008) | 35 lines

Merged revisions 121230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r121230 | mmichelson | 2008-06-09 10:08:58 -0500 (Mon, 09 Jun 2008) | 27 lines

Merged revisions 121229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(Note that this is being merged to trunk/1.6.0 because
it may affect non-callback agents with ackcall set)

........
r121229 | mmichelson | 2008-06-09 10:02:37 -0500 (Mon, 09 Jun 2008) | 16 lines

A unique situation of timeouts brought forth a failure situation for
autologoff in chan_agent. If using AgentCallbackLogin-style agents,
then if the timeout specified by the Dial() to reach the agent's phone
was shorter than the timeout specified in queues.conf, then autologoff
would only work if the caller hung up while the agent's phone was ringing.
This patch allows autologoff to work in this situation when the call in
queue transfers to the next available agent (as it would have if the timeout
in queues.conf were less than the timeout in the Dial()).

(closes issue ASTERISK-12108)
Reported by: Rodrigo
Patches:
     12754.patch uploaded by putnopvut (license 60)
Tested by: Rodrigo


........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121231