Queue auto logout

Hey guys sorry to ask this i looked on the forms and didn’t get a good answers…
Im looking for a ya to have agents get logout every night… there a mix of at home people and office people. if anyone knows if there a script or addon… it would be great… thank you.

For example execute script from cron:

#!/bin/bash

QUEUES=$(/usr/sbin/asterisk -rx "queue show" | /bin/egrep -o '^[[:digit:]]+')
LOGGEDIN=$(/usr/sbin/asterisk -rx "queue show" | /bin/egrep -o 'Local/[[:digit:]]+@from-queue/n')

for q in $QUEUES; do
        for i in $LOGGEDIN; do
                /usr/sbin/asterisk -rx "queue remove member $i from $q"
        done
done
4 Likes

cool thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.