[asterisk-commits] mmichelson: branch 1.4 r138942 - /branches/1.4/channels/chan_agent.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 19 18:17:17 CDT 2008
Author: mmichelson
Date: Tue Aug 19 18:17:17 2008
New Revision: 138942
URL: http://svn.digium.com/view/asterisk?view=rev&rev=138942
Log:
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
Modified:
branches/1.4/channels/chan_agent.c
Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=138942&r1=138941&r2=138942
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Tue Aug 19 18:17:17 2008
@@ -2044,6 +2044,8 @@
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 @@
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 @@
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 @@
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;
More information about the asterisk-commits
mailing list