Benoit Plessis
2008-May-09 08:49 UTC
[asterisk-users] app_queue New Function ToggleQueueMemberUse()
Hi, I'm using a Queue in asterisk with IAX2 peers and my agents are also doing outbond calls. Actually we are using a GROUP() function like that to prevent users from beeing Dialed while in communication: exten => s,1,gotoif($[${GROUP_COUNT(${MACRO_EXTEN}@agents)}=0]?:busy) exten => s,n,Set(OUTBOUND_GROUP=${MACRO_EXTEN}@agents) ... But this system fill the asterisk console with queue dial attempt, and even with our small system it make debugging a pain in the a**. So i'm wondering if someone already as made a dialplan function that could toggle the 'Use' flag of an agent ? or if this kind of function would be integrated into the core if i build it ? Regards, benoit CCed to asterisk-dev but i'm not subscribed so please make me in copy.
Russell Bryant
2008-May-09 14:15 UTC
[asterisk-users] app_queue New Function ToggleQueueMemberUse()
Benoit Plessis wrote:> So i'm wondering if someone already as made a dialplan function that > could toggle the 'Use' flag of > an agent ? or if this kind of function would be integrated into the core > if i build it ?This is a slightly different approach, but have you seen the state interface code that is in Asterisk 1.6? There is a backport of the code for 1.4 floating around somewhere, I think. It allows you to specify a different device for a queue member that app_queue will use to determine the state of an agent. So, you can still list a Local channel for dialing, but Asterisk will look at the state of SIP/myphone, for example, to know whether the agent is busy or not. Alternatively, if you would like to control the usability of an agent through the dialplan, then you could use the DEVICE_STATE() function to create a custom device state. Then, you could list your custom "device" as what app_queue should look at before attempting to call the agent. -- Russell Bryant Senior Software Engineer Open Source Team Lead Digium, Inc.
Steve Totaro
2008-May-10 14:20 UTC
[asterisk-users] app_queue New Function ToggleQueueMemberUse()
On Sat, May 10, 2008 at 10:06 AM, Benoit Plessis <benoit at plessis.info> wrote:> Patrick a ?crit : >> Can you please tell me where you found the backport? >> >> Thanks, >> Patrick >> > Russel already sent the links: >> Yes, this is also from 1.6, but an unsupported backport of DEVICE_STATE(), >> exists, as well. >> >> http://www.asterisk.org/node/48325 >> >> http://www.asterisk.org/node/48360 >> > > > -- > Benoit Plessis +33 6 77 42 78 32 > <benoit at plessis.info> +33 4 67 28 06 96 > >Depending on the phone, the simplest and easiest way to handle this is to set the phone to not accept call waiting. Thanks, Steve Totaro