Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] app_queue New Function ToggleQueueMemberUse()


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
benoit at plessis.info
Guest





PostPosted: Fri May 09, 2008 3:49 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

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.
Back to top
russell at digium.com
Guest





PostPosted: Fri May 09, 2008 9:15 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Benoit Plessis wrote:
Quote:
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.
Back to top
benoit at plessis.info
Guest





PostPosted: Fri May 09, 2008 9:24 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Russell Bryant a ?crit :
Quote:
Benoit Plessis wrote:

Quote:
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
Quote:
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 Smile
Is it from 1.6 too ?
Back to top
benoit at plessis.info
Guest





PostPosted: Fri May 09, 2008 9:29 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Benoit Plessis a ?crit :
Quote:
Russell Bryant a ?crit :

Quote:
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 Smile
Is it from 1.6 too ?

don't bother, i found the backport
Back to top
russell at digium.com
Guest





PostPosted: Fri May 09, 2008 9:33 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Benoit Plessis wrote:
Quote:
Quote:
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.

Quote:
Quote:
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 Smile
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.
Back to top
Guest






PostPosted: Fri May 09, 2008 9:49 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Russell Bryant wrote:
Quote:

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
Back to top
benoit at plessis.info
Guest





PostPosted: Fri May 09, 2008 5:07 pm    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

On Fri, May 09, 2008 at 10:49:02AM -0400, Watkins, Bradley wrote:
Quote:
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
<benoit at plessis.info>
Back to top
benoit at plessis.info
Guest





PostPosted: Fri May 09, 2008 5:29 pm    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Russell Bryant a ?crit :
Quote:
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
<benoit at plessis.info> +33 4 67 28 06 96
Back to top
asterisk-list at puzzl...
Guest





PostPosted: Sat May 10, 2008 4:35 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

On Fri, 2008-05-09 at 16:29 +0200, Benoit Plessis wrote:
Quote:
Benoit Plessis a ?crit :
Quote:
Russell Bryant a ?crit :

Quote:
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 Smile
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
Back to top
benoit at plessis.info
Guest





PostPosted: Sat May 10, 2008 9:06 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Patrick a ?crit :
Quote:
Can you please tell me where you found the backport?

Thanks,
Patrick

Russel already sent the links:
Quote:
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
Back to top
stotaro at totarotechn...
Guest





PostPosted: Sat May 10, 2008 9:20 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

On Sat, May 10, 2008 at 10:06 AM, Benoit Plessis <benoit at plessis.info> wrote:
Quote:
Patrick a ?crit :
Quote:
Can you please tell me where you found the backport?

Thanks,
Patrick

Russel already sent the links:
Quote:
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
Back to top
benoit at plessis.info
Guest





PostPosted: Sat May 10, 2008 9:33 am    Post subject: [asterisk-users] app_queue New Function ToggleQueueMemberUse Reply with quote

Steve Totaro a ?crit :
Quote:

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
<benoit at plessis.info> +33 4 67 28 06 96
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services