Summary:ASTERISK-12400: [patch] p->ackcall not reset when agent logs out
Reporter:David Woolley (davidw)Labels:
Date Opened:2008-07-17 09:49:02Date Closed:2008-11-24 13:28:58.000-0600
Versions:Frequency of
Environment:Attachments:( 0) 20080731__issue13098_agent_ackcall_not_reset.diff
Description:p->ackcall can be set by setting the channel variable ACKCALL, but currently is not reset when the agent logs out.


I think it may be sufficient to set it to the global default, in __login_exec, if the ACKCALL variable isn't set.  It would be more elegant to reset it on logouts, but I think there is more than one place where this would have to be done.  It looks to me that the manager initiated logins always set it explicitly.

This has proved a minor nuisance to us in development, but in real life operation, it may be unusual to switch between manual and auto-answer modes.
Comments:By: Brett Bryant (bbryant) 2008-07-17 13:30:26

davidw, please test this patch and see if it fixes the issue for you.

By: David Woolley (davidw) 2008-07-18 05:21:26

Will do.

As an aside, I think you implemented ackcall=always for a manager login.  I think manager logins can only be ringback ones, for which always and true are treated the same.

By: David Woolley (davidw) 2008-07-18 07:49:16

p->ackcall is getting reset before the first call is offered to the agent.  I'll have a look and see if I can work out why.

Note that hunk 3 of the patch fuzzes on because the trailing context doesn't match, although I don't believe this is a problem:

patching file channels/chan_agent.c
Hunk #1 succeeded at 1982 (offset -54 lines).
Hunk #3 succeeded at 2002 with fuzz 2 (offset -54 lines).
Hunk #4 succeeded at 2438 (offset -7 lines).

By: David Woolley (davidw) 2008-07-18 08:05:09

I would think this was the bad line:

+ p->ackcall = autologoff;

I'll make the obvious fix locally (for the avoidance of doubt, that is to change the left side of the assignment!) ......... That seems to do it.

By: Brett Bryant (bbryant) 2008-07-31 12:27:25

Uploaded is a fixed version of the patch, this just needs to be reviewed by someone else before it gets committed.

By: David Woolley (davidw) 2008-08-01 05:09:03

I can confirm that that is the fix that I tried.

By: Digium Subversion (svnbot) 2008-08-19 18:08:26

Repository: asterisk
Revision: 138942

U   branches/1.4/channels/chan_agent.c

r138942 | mmichelson | 2008-08-19 18:08:25 -0500 (Tue, 19 Aug 2008) | 11 lines

Reset agent_pvt variables back to the values in agents.conf
(from what the corresponding channel variables were set to)
when the agent logs out.

(closes issue ASTERISK-12400)
Reported by: davidw
     20080731__issue13098_agent_ackcall_not_reset.diff uploaded by bbryant (license 36)
Tested by: davidw