[asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Benoit Plessis

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([EMAIL PROTECTED])}=0]?:busy)
exten => s,n,Set([EMAIL PROTECTED])
...

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.


___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Russell Bryant
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.

___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Benoit Plessis
Russell Bryant a écrit :
> 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.
>   
ok but since we are using IAX2 with ZoIPer for sendurl() handling this 
won't help
> 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
This is more interesting :)
Is it from 1.6 too ?



___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Benoit Plessis
Benoit Plessis a écrit :
> Russell Bryant a écrit :
>
>> 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
> This is more interesting :)
> Is it from 1.6 too ?
>
don't bother, i found the backport



___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Russell Bryant
Benoit Plessis wrote:
>> 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.
>>   
> ok but since we are using IAX2 with ZoIPer for sendurl() handling this 
> won't help

I don't see why this wouldn't help.  You just list the IAX2 peer as the device
Asterisk uses to determine the state of the agent.

>> 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
>
> This is more interesting :)
> Is it from 1.6 too ?

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

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.

___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Watkins, Bradley
Russell Bryant wrote:
> 
> 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.
>

One problem with that cunning plan is that using custom device states
doesn't work.  The code for handling device state changes in app_queue
is looking for a forward-slash in the device name, and returns if it
doesn't find one:

loc = strchr(technology, '/');
if (loc) {
   *loc++ = '\0';
} else {
   ast_free(sc);
   return 0;
}


I've worked around it by modifying that particular bit of code, though
in a way I'm not sure I'd want committed to mainline Asterisk SVN (which
is why I haven't submitted it yet).
- Brad

___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread benoit plessis
On Fri, May 09, 2008 at 10:49:02AM -0400, Watkins, Bradley wrote:
> Russell Bryant wrote:
> > 
> 
> One problem with that cunning plan is that using custom device states
> doesn't work.  The code for handling device state changes in app_queue
> is looking for a forward-slash in the device name, and returns if it
> doesn't find one:

Why not modifying func_devstate instead to support Custom/ ?

btw why is it limited to some channel name ? it would be nice 
to use the Agent/xxx channel directly

-- 
Benoit Plessis+33 4 67 36 42 59
<[EMAIL PROTECTED]>


___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-09 Thread Benoit Plessis
Russell Bryant a écrit :
> I don't see why this wouldn't help.  You just list the IAX2 peer as the device
> Asterisk uses to determine the state of the agent.
>   
Well i've read elsewhere that only SIP peers did support the use flag ?


-- 
Benoit Plessis  +33 6 77 42 78 32
<[EMAIL PROTECTED]> +33 4 67 28 06 96


___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-10 Thread Patrick

On Fri, 2008-05-09 at 16:29 +0200, Benoit Plessis wrote:
> Benoit Plessis a écrit :
> > Russell Bryant a écrit :
> >
> >> 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
> > This is more interesting :)
> > Is it from 1.6 too ?
> >
> don't bother, i found the backport

Can you please tell me where you found the backport?

Thanks,
Patrick



___
-- 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

Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-10 Thread Benoit Plessis
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
<[EMAIL PROTECTED]> +33 4 67 28 06 96


___
-- 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

Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-10 Thread Steve Totaro
On Sat, May 10, 2008 at 10:06 AM, Benoit Plessis <[EMAIL PROTECTED]> 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
> <[EMAIL PROTECTED]>   +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

___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2008-05-10 Thread Benoit Plessis
Steve Totaro a écrit :
>
> Depending on the phone, the simplest and easiest way to handle this is
> to set the phone to not accept call waiting.
>
>   
That's not always possible, if you use IAX2 then that's not even an 
option (at least on the PBX side):
http://www.voip-info.org/wiki/view/Asterisk+Queue+with+limited+calls+per+IAX+agent
Or if you want your queue agent to be joinable with internal calls while 
in communication with a queue
member.


-- 
Benoit Plessis  +33 6 77 42 78 32
<[EMAIL PROTECTED]> +33 4 67 28 06 96


___
-- 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


Re: [asterisk-users] app_queue New Function ToggleQueueMemberUse()

2009-02-22 Thread Rajkumar S
Resurrecting an old thread.

On Fri, 9 May 2008, Russell Bryant wrote:

> 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 ?



> 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.

How can this be done? I have looked much and there are no document/mail 
explaining how this can be done. An example especially in the context of 
queues-with-callback-members document would be very very helpful.

with regards,

raj

___
-- 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