Index: channels/chan_agent.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v retrieving revision 1.147 diff -u -r1.147 chan_agent.c --- channels/chan_agent.c 26 Aug 2005 20:24:16 -0000 1.147 +++ channels/chan_agent.c 9 Sep 2005 21:32:39 -0000 @@ -1729,6 +1729,11 @@ if (!strcmp(p->agent, user) && !strcmp(p->password, pass) && !p->pending) { login_state = 1; /* Successful Login */ + + /* Ensure we can't be gotten until we're done */ + gettimeofday(&p->lastdisc, NULL); + p->lastdisc.tv_sec++; + /* Set Channel Specific Agent Overides */ if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) { if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))