# Limit queue to one call?

**URL:** <https://community.asterisk.org/t/limit-queue-to-one-call/36344>\
**Category:** Asterisk Support\
**Created:** [August 15, 2011, 7:11am UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344 "2011-08-15T07:11:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 15, 2011, 7:11am UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/1 "2011-08-15T07:11:40Z")

</div>

Hi,

Is it possible to limit the active calls in a queue to one person?

What I mean by this, is to have a queue, where there are for example 8 members to the queue (static members).

Callers call into the queue, but only one active call can take place at a time - ie one of the 8 members has taken a call from the queue, all other calls are queued until that call is complete.

As an additional nice to have - the ability for a member to be able to pick up an extra call from the queue.

Thanks,

Leon

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [August 15, 2011, 10:24am UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/2 "2011-08-15T10:24:54Z")

</div>

I don’t believe such a facility exists. What is the problem that this would solve for you?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 15, 2011, 10:41am UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/3 "2011-08-15T10:41:36Z")

</div>

An incoming line, where a “ringall” policy is in place to a bunch of static members, however want to restrict incoming calls to only one at a time in order to prevent more than one person becoming tied up with incoming phone calls.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [August 15, 2011, 12:44pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/4 "2011-08-15T12:44:27Z")

</div>

Hi

You could try making the queue have one member "Local/queue@queue\n

Then  
[queue]  
exten =\> queue,1,Dial(SIP/100&SIP/200)

then make sue the queue is set with ringinuse=no

worth a try …

Ian

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 15, 2011, 1:22pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/5 "2011-08-15T13:22:17Z")

</div>

Ian,

I think I tried this, but will try again later tonight when I’m home. (perhaps not with the flag you suggest)

Memory is telling me that it considered the local channel to be an invalid member.

Leon

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [August 15, 2011, 1:24pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/6 "2011-08-15T13:24:17Z")

</div>

Local channels can’t be invalid members, as they are the preferred way of getting the AgentCallbackLogin function, now that is deprecated.

The problem I might expect is that they don’t have a device state, or don’t have a useful one.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [August 15, 2011, 1:45pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/7 "2011-08-15T13:45:00Z")

</div>

I think you may be right on status David, but using teh local channel will allow groupcount to be used and return busy if more than 1

Ian

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 15, 2011, 2:55pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/8 "2011-08-15T14:55:18Z")

</div>

Ian,

Can you expand on your thoughts a little for me, perhaps with an example?

Thanks,

Leon

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 15, 2011, 7:58pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/9 "2011-08-15T19:58:45Z")

</div>

Ok guys - with your suggestions I think I have it !

Starts off with my queue…

`[support]
musicclass=default
strategy=ringall
joinempty=no
leavwhenempty=yes
ringinuse=no
member=Local/queue@support
`

So a user dials in to the auto-attendant, hit’s 1 for support…

```auto
exten => 1,1,Set(GROUP()=support)
same => 1,n,GotoIf($[${GROUP_COUNT(support)} > 1]?maxcalls)
same => 1,n,Queue(support)
same => 1,n(maxcalls),Playback(vm-goodbye) ; example - send to Voicemail etc...
same => 1,n,Hangup()
```

And the queue is dealt with by…

```auto
[support]
exten => queue,1,Noop(Received call to extension ${EXTEN})
exten => queue,n,Dial(SIP/rs_leon&SIP/rs_yoshi&SIP/rs_mobile)
exten => queue,n,Hangup()
```

Seems to work - any issues that you guys can see ?

Thanks,

Leon

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 15, 2011, 8:28pm UTC](https://community.asterisk.org/t/limit-queue-to-one-call/36344/10 "2011-08-15T20:28:24Z")

</div>

Ok - so the example above is slightly different to what I had described in that it sends the 2nd, 3rd, 4th etc caller straight to voicemail (or any other action I choose).

By changing it slightly, only one call is placed through at a time as described above…

Add “/n” to the end of the member line in queues.conf  
And remove the GROUP rules.

I guess, the best example here would be a combination of the two!
