[Asterisk-Users] Re: Auto Logout from queue

Christopher Mayfield cmayfield at primary.net
Thu May 4 12:31:32 MST 2006


it is two scripts an empty_queue.sh and a fill_queue.sh and a members script
If you need intructions please tell me

1047 $  cat empty_queue.sh
#!/bin/bash

# a script to remove everyone in the members script located in the same
directory as this file
# to the Q 3901
# can be called from a script

#Local/3201 at from-internal
#Local/3288 at from-internal
#Local/3204 at from-internal

for wild in `/usr/sbin/asterisk -r -x "show queue 3901"| grep -a dynamic |
awk '{ print $1 }'`;
        do
        /usr/sbin/asterisk -r -x "remove queue member "$wild" from 3901"|
grep -a interface;
        done

1048 $  cat fill_queue.sh
#!/bin/bash

# a script to add everyone in the members script located in the same
directory as this file
# to the Q 3901
# can be called from a script

#Local/3201 at from-internal
#Local/3288 at from-internal
#Local/3204 at from-internal

for wild in `cat /home/cmayfield/members `;
        do
        /usr/sbin/asterisk -r -x "add queue member "$wild" to 3901"| grep -a
interface;
        done

1049 $  cat members
Local/3204 at from-internal
Local/3288 at from-internal

1050 $  crontab -l
#at 8:1 and 8:11 it will fill the queue and it is nondistructive
1,11     8       *       *       1-5       sh /home/cmayfield/fill_queue.sh
| mail -s "fill_queue" cmayfield at primary.net
#at 5:31 and 5:36 it will empty the queue and it is nondistructive
31,36    17       *       *       1-5       sh
/home/cmayfield/empty_queue.sh | mail -s "empty_queue" cmayfield at primary.net

On 5/2/06, Tomislav Parčina <tparcina at lama.hr> wrote:
>
> In article <10fe83740604251430j7445d344x8c85d6cba7cb6761 at mail.gmail.com>,
> cmayfield at primary.net says...
> > that is a nice function
> > I use a cronjob to logout everyone each evening if anyone wants that
> script
> > I would love to provide it.
>
> Please send the script to the list.
>
>
>
> --
> Tomislav Parčina
> Lama Computers Split
> Stinice 12, 21000 Split
> Tel.: +385(21)495148
> SIP: tomo at pbx.lama.hr
> e-mail: tparcina#lama.hr
> http://www.lama.hr
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



--
$15.95/Month DreamHost Hosting SALE
60 GB Disk Storage, 1.6 TB Transfer
Transfer Increases 16 GB Weekly
http://www.dreamhost.com/r.cgi?ap0ught/shared/
Use discount code caralena for $40 off all these low prices
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060504/73cf4172/attachment.htm


More information about the asterisk-users mailing list