aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-19 23:17:17 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-19 23:17:17 +0000
commit62b9db5664469d79ca4c15b3a5497916561aed59 (patch)
tree6b43ed366623d0b2e5df84509208a5a09b8483a4
parent5bc2e1212e0e07bd1ffd568974adbb6bb477677d (diff)
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 #13098) Reported by: davidw Patches: 20080731__issue13098_agent_ackcall_not_reset.diff uploaded by bbryant (license 36) Tested by: davidw git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138942 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_agent.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 45232f336..46f776607 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -2044,6 +2044,8 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
tmpoptions=pbx_builtin_getvar_helper(chan, "AGENTACKCALL");
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTACKCALL=%s, setting ackcall to: %d for Agent '%s'.\n",tmpoptions,p->ackcall,p->agent);
+ } else {
+ p->ackcall = ackcall;
}
if (pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF") && strlen(pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF"))) {
p->autologoff = atoi(pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF"));
@@ -2052,6 +2054,8 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
tmpoptions=pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF");
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTAUTOLOGOFF=%s, setting autologff to: %d for Agent '%s'.\n",tmpoptions,p->autologoff,p->agent);
+ } else {
+ p->autologoff = autologoff;
}
if (pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME") && strlen(pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME"))) {
p->wrapuptime = atoi(pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME"));
@@ -2060,6 +2064,8 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
tmpoptions=pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME");
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTWRAPUPTIME=%s, setting wrapuptime to: %d for Agent '%s'.\n",tmpoptions,p->wrapuptime,p->agent);
+ } else {
+ p->wrapuptime = wrapuptime;
}
ast_channel_unlock(chan);
unlock_channel = 0;
@@ -2447,7 +2453,9 @@ static int action_agent_callback_login(struct mansession *s, const struct messag
p->wrapuptime = 0;
}
- if (ast_true(ackcall_s))
+ if (strcasecmp(ackcall_s, "always"))
+ p->ackcall = 2;
+ else if (ast_true(ackcall_s))
p->ackcall = 1;
else
p->ackcall = 0;