Author Topic: autologoffunavail  (Read 3746 times)

vlad.dc

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
autologoffunavail
« on: April 22, 2008, 23:53:22 »
Hello,

autologoff=yes  in agent.conf can logoff an agent that signed in, but don't signed by the extension. If a agent forgot to logoff before shut off sip client, it will stay login forever.

Im had applyed the patch http://bugs.digium.com/view.php?id=6038  on chan_agent.c but don't work.

This is the log on asterisk:

----------------------------------
-- Executing Dial("Local/101@from-internal-6736,2", "SIP/101||trM(auto-blkvm)") in new stack
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing Set("Local/101@from-internal-6736,2", "DIALSTATUS=CHANUNAVAIL") in new stack
    -- Executing Set("Local/101@from-internal-6736,2", "SV_DIALSTATUS=CHANUNAVAIL") in new stack
    -- Executing GosubIf("Local/101@from-internal-6736,2", "0?docfu|1") in new stack
    -- Executing GosubIf("Local/101@from-internal-6736,2", "0?docfb|1") in new stack
    -- Executing Set("Local/101@from-internal-6736,2", "DIALSTATUS=CHANUNAVAIL") in new stack
    -- Executing NoOp("Local/101@from-internal-6736,2", "Voicemail is novm") in new stack
    -- Executing GotoIf("Local/101@from-internal-6736,2", "1?s-CHANUNAVAIL|1") in new stack
    -- Goto (macro-exten-vm,s-CHANUNAVAIL,1)
    -- Executing PlayTones("Local/101@from-internal-6736,2", "congestion") in new stack
    -- Executing Congestion("Local/101@from-internal-6736,2", "10") in new stack
    -- Agent/820 is circuit-busy
----------------------------------

On this case the status is "UNKNOWN" to peer SIP/101  then the call would be send to an agent available, but the call always is send it to Agent 820.

How can I use autologoffunavail ??  I have asterisk 1.2.26.2 and queuemetrics 1.4.3

Regards.

Vlad.



QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: autologoffunavail
« Reply #1 on: April 23, 2008, 15:57:04 »
I have no idea, but you could create a script to log off all agents manually if e.g. your call center works 9-18.

vlad.dc

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: autologoffunavail
« Reply #2 on: April 25, 2008, 19:55:27 »
I'm not a programmer but I'm did the next script:

Code: [Select]
#!/bin/bash
agent=`tail -300 /var/log/asterisk/full | grep 'Agent.....is.circuit-busy'|awk '
{print $7}'`
asterisk -rx "agent logoff $agent"
echo "agent logoff $agent"

Ideas to optimieze script... welcome!!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: autologoffunavail
« Reply #3 on: April 26, 2008, 07:03:48 »
Cool! You could start by "show agents" and then logoff each one of them.