Logoff all agents from a queue in one hit

Discussion in 'General' started by lfletche, Nov 24, 2010.

  1. lfletche

    Joined:
    Jul 24, 2010
    Messages:
    5
    Likes Received:
    0
    Hey Guys,

    I have been doing some searching around trying to see if there is a way to do this and so far I haven't found anything.

    We have a queue which is made up of dynamic agents and I would like a way to have a number that anyone can dial which will log all agents out of the queue in one hit rather then have to cycle through and manually do each logged in agent.

    Ideally I want to have this as an option for our call center guys in events like if there is a fire alarm and they all need to log out straight away.

    I can see a way of doing this through a dial plan and cycling through each logged in agent that way - but I was hoping there is a command which will just automatically log out all the logged in agents in a queue in one hit.

    Thanks for any help you can provide!

    Cheers,
    Luke.
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    You could in your dialplan make a "System call" to a one liner something like :-
    Code:
    exten => <ext>,n,System(for i in `rasterisk -x 'agent show online'|grep available|cut -d ' ' -f1`;do rasterisk -x "agent logoff Agent/$i" ;done)
    exten => <ext>,n,PlayBack(now_get_the_hell_out_of_here_the_buildings_on_fire&You_dont_have_time_to_mess_with_the_Phone_system&screw_the_clients)
     
  3. lfletche

    Joined:
    Jul 24, 2010
    Messages:
    5
    Likes Received:
    0
    Thanks Dicko!

    That wasn't exactly right for our environment as we needed to use the "queue" commands rather then the "agent" ones but you got me thinking along the right line.

    This is how I implemented it (Note "$queueNum" is the queue number you want to remove the agents from):

    for i in `rasterisk -x "queue show $queueNum" | grep Local | awk '{print $1}'`;do rasterisk -x "queue remove member $i from $queueNum" ;done

    Works perfectly! Thanks very much for your help!

    Cheers,
    Luke.
     

Share This Page