Automatic log out hanging "Zombie" (power failure)

I have a call center working on Asterisk 1.2.0 on Fedora Core 4.Here are important parts of my conf files.

agent => 1,001,Agent 1

callerid=“101” <101>

exten => 001,1,AgentLogin(1)
exten => 001,2,Hangup

exten => 0240,1,NoOp(${CALLERIDNUM})
exten => 0240,2,Wait(1)
exten => 0240,3,Answer
exten => 0240,4,Queue(callqueue|thH)
exten => 0240,5,Hangup

musiconhold = najava
strategy = fewestcalls
maxlen = 0
announce-holdtime = no
monitor-format = wav
monitor-join = yes
leavewhenempty = no
member => Agent/1,1

So my agents have logged in callqueue via agentlogin aplication and they can recieve calls.It worked fine until agent’s computer had power failure…After that Asterisk did not log out agent from queue aoutomaticly.Insted of that Asterisk thinked that Agent has been still logged on and distributed calls to him and agent could not answer because he was not really loged in and he could not log in on system (agent alredy on) until I remove him manuely from cli with agent logoff agent/1 .
It is not big problem at the moment because I have few agents but what if I had 5000 agents ?This would be a nightmare.I am sure there is a solution for this annoying problem
Can you help me please. ? Does protocol sip or iax2 has something with it ?
Every hint is welcome.

Thank you :smile:

P.S. I tryed to put autologoff in agents.conf but this did not solve the problem.

Would AgentCallbackLogin help? Pretty sure many call centers will have this problem if there’s no way for agent to log off remotely. So search around.

Well AgentCallbackLogin could help maybe.But when I put AgentCallbackLogin insted of AgentLogin and auto logoff=n sec it really log out agent but problem with AgentCallbackLogin is that phone has to ring and detect that someone did not answer the call.There is no music on hold for agents during waiting for a call.My agents prefer to hear music until they recieve call.So I would like to use AgentLogin but to do somehow automatic logout.Or if you could help me to set musiconhold for agents in agentcallbacklogin application.

I tried everything including book Asterisk Future of Telephony #asterisk chat on #asterisk at irc.freenode wiki asteriskguru and did not found the solution.I must say that asterisk documentation need to be better.I dream about documentation like apache has.Part of digium web site exampe /doc/ where people can find all commands which they can put in every *.config file with short examples.That would make Asterisk in telephony world what is Apache in Web Server world.

Could bash script in crond which would periodicly (every 2 minutes) check sip status help ? I mean something like if 101 is status unreachable then do system command from cli agent logoff agent/1 ?