Hi all, Someone know how can I check for available members on a queue Before I queue the call, so I can do something else with it? Note that is not the case for joinempty Thanks, Gabriel Ortiz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090718/462b725b/attachment.htm
On Sat, Jul 18, 2009 at 11:11 AM, Gabriel Ortiz Lour <ortiz.admin at gmail.com>wrote:> Hi all, > > Someone know how can I check for available members on a queue Before I > queue the call, so I can do something else with it? Note that is not the > case for joinempty > > Thanks, > Gabriel Ortiz > >Maybe too simple or not what you are looking for, but you can timeout people in the queue quickly and then redirect them via the dialplan. Similar to the cascading queues below, but do what you want. http://www.voip-info.org/wiki/view/Asterisk+call+queues Cascading Queues You can set up a series of queues that cascade to each other. You can get a similar effect by using the penalty feature but this can be a better way to do things for some situations (e.g. if you want to overflow calls to your receptionist into your office for when your receptionist is busy). The first thing you must do is have a timeout on our queue. This is done as a parameter of the Queue command used in extensions.conf (example: Queue(dave|t|||45)). You can then set up a number of queues and simply have your dialplan call each queue in succession. example: exten => 1589,1,Answer exten => 1589,2,Ringing exten => 1589,3,Wait(2) exten => 1589,4,Queue(testq|t|||45) exten => 1589,5,Queue(testq2|t|||45) exten => 1589,6,Hangup -- Thanks, Steve Totaro +18887771888 (Toll Free) +12409381212 (Cell) +12024369784 (Skype) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090718/e4d881c4/attachment.htm
Maybe this function will help QUEUE_MEMBER_COUNT QUEUE_MEMBER_COUNT(<queuename>) Count number of members answering a queue This is in at least version 1.6.0.x. There are a few other related functions that can be seen by using the CLI command: core show functions like QUEUE Function names are upper case so you need to use upper case when trying to list them! -- Jim Dickenson mailto:dickenson at cfmc.com CfMC http://www.cfmc.com/ From: Steve Totaro <stotaro at asteriskhelpdesk.com> Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Date: Sat, 18 Jul 2009 11:17:05 -0400 To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] Count Available Queue members On Sat, Jul 18, 2009 at 11:11 AM, Gabriel Ortiz Lour <ortiz.admin at gmail.com> wrote:> Hi all, > > ? Someone know how can I check for available members on a queue Before I queue > the call, so I can do something else with it? Note that is not the case for > joinempty > > Thanks, > Gabriel Ortiz >Maybe too simple or not what you are looking for, but you can timeout people in the queue quickly and then redirect them via the dialplan. Similar to the cascading queues below, but do what you want. http://www.voip-info.org/wiki/view/Asterisk+call+queues Cascading Queues You can set up a series of queues that cascade to each other. You can get a similar effect by using the penalty feature but this can be a better way to do things for some situations (e.g. if you want to overflow calls to your receptionist into your office for when your receptionist is busy). The first thing you must do is have a timeout on our queue. This is done as a parameter of the Queue command used in extensions.conf (example: Queue(dave|t|||45)). You can then set up a number of queues and simply have your dialplan call each queue in succession. example: ?exten?=>?1589,1,Answer ?exten?=>?1589,2,Ringing ?exten?=>?1589,3,Wait(2) ?exten?=>?1589,4,Queue(testq|t|||45) ?exten?=>?1589,5,Queue(testq2|t|||45) ?exten?=>?1589,6,Hangup ? -- Thanks, Steve Totaro +18887771888 (Toll Free) +12409381212 (Cell) +12024369784 (Skype) _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090718/10faa6cc/attachment.htm
Gabriel Ortiz Lour wrote:> Someone know how can I check for available members on a queue Before I > queue the call, so I can do something else with it? Note that is not the > case for joinemptyIt's going to take some sort of hack, since there appears to be no dialplan app to do this succinctly. One option is to call an AGI script that in turn runs: asterisk -rx 'queue show your-queue-name' | egrep 'SIP\/.+ \(Not in use\)' | wc -l It can set a channel variable and you can then evaluate its value in the dial plan with GotoIf(). Another, more sophisticated option is to have a piece of middleware that keeps track of when agents are connected to a caller via listening to the Asterisk manager interface, or by reading the queue log. It can then be queried via FastAGI. Really, there should be a dialplan app for this. Feature request? -- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671