[asterisk-users] Busy notification with call limiting byGROUP_COUNT()

Atis Lezdins atis at iq-labs.net
Wed Jan 9 16:54:07 CST 2008


On 1/9/08, Don Pobanz <dpobanz at hastingsutilities.com> wrote:
> Peter Galiovsky wrote on Wednesday, January 09, 2008 9:39 AM
> > I want the user to be presented as busy if he has at
> > least one call active, be it incoming or outgoing. How
> > should I set things up to achieve this?
>
> I have a very similar need. We are using call queues and would like to
> have only 1 call presented to our trouble call reps at a time, but would
> like to give them the ability to initiate an outgoing call on a
> different line (even while on an incoming call). We are using Aastra
> 480i SIP phones.
>
> I have read that app_groupcount and setgroup may be the way to handle
> this but the wiki is confusing.
>
> http://www.voip-info.org/wiki/view/Asterisk+cmd+SetGroup
>
> Can someone suggest an approach (preferably one currently in use)? We
> are using Asterisk 1.4.17.

I'm currently working on porting my system to GROUP_COUNT etc.. so
what i have learned - before dial to agent from queue:

Set(OUTBOUND_GROUP=${agent}@agent_queue);
Dial(SIP/${agent},...)

this will add result channel (if agent 222 answers) to group 222 at agent_queue.

Analogically you add ${agent}@agent_out and ${agent}@agent_direct to
outgoing calls and incoming non-queue calls.

Then - in context that will receive call from queue (with Local
channel) you check
GROUP_COUNT(222 at agent_queue) & GROUP_COUNT(222 at agent_direct) &
GROUP_COUNT(222 at agent_out)
- this will allow agent to pick up queue call only if he doesn't have
any other calls. Otherwise just execute Busy() and queue will pass
call to next agent.

You can have similar check for direct incoming calls and compare
GROUP_COUNT(222 at agent_queue)+GROUP_COUNT(222 at agent_direct)+GROUP_COUNT(222 at agent_out)<2
- to accept only two simultanous calls per agent.

And finally for outgoing calls - you just don't check any GROUP_COUNT,
just set the group - that will allow any number of outgoing calls.

Regards,
Atis

-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835



More information about the asterisk-users mailing list