Concurrent calls to DID Number

Hi all

Does anyone know of a way to see the number of concurrent calls to an inbound DID number within the dial plan? One of the DID’s is 300, so I was looking along the lines of the following:

exten => s,n,Set(GROUP()=${300})
exten => s,n,NoOp(Number of calls to this DID: [${GROUP_COUNT(${300})})

Cheers

I would think there’s something, but I can’t think of anything “out of the box” that would do that as simply as you’re looking for.

There is a way to limit the number of concurrent calls on a trunk, so the number of connections (in and out) through a trunk should exist somewhere.

Hi Dave

Thanks, I did look at the trunk options, I’m not trying to restrict the number of inbound calls tho.

Basically we have several DID’s that all essentially all end up at the same place - after passing through different IVRs, or system announcements etc. What I am looking to do is say allow 50 concurrent calls to have come in via the various DID’s and when the 51st comes in put that caller down a different path.

What seemed simple in my head… doesnt appear to be as simple :slight_smile:

Cheers

The problem is in the teardown. Creating a running total in an Asterisk variable through a custom context is simple, but how to track that call going away so you can decrement the counter.

I can’t think of an easy way to do it by DID.

Maybe I’m missing something but you can set the max callers in a queue. Setup a queue with 50 callers max and the 51st caller goes to the default destination instead of this queue

I’m assuming the OP knows what he’s looking for - I know I don’t normally, but in this case, the question was alarmingly specific. The problem, as posed, is hard since it’s based on the inbound DID and not the destination queue. I’m also assuming that he’s trying to do multi-tenant with FreePBX, which we all know is extremely challenging the more tenants you add and the more options you want.

Given that, I’m stuck. I’m not getting paid, so I’m not going to spend a lot of time on it, and it’s not something that actually interests me, but the question does deserve some kind of response. I’m not aware of anything in the system that works by DID - having said that, there are other ways of reacting to the count (as you suggest, a limited size queue as one option) but without knowing what he wants is conjecture, so he’s going to get vague answers to his specific question.

Hi Guys

The use case I have:

  • DID 001 - calls are for fault type A
  • DID 003 - calls are for fault type B
  • DID 010 - calls are for fault type C

These calls will step through a custom context, that plays information to the caller around faults, etc, and offer the option to discuss the issue in more detail.

If we have more than 50 calls in progress to any of the above DIDs (these are likely to be within the custom context at this stage) we want to play a generic message.

Cheers

Finally - the real problem.

One way - Instantiate a Queue for each one of these with a custom announcement. Put a 50 call limit on the queue and send the rest of the callers to your generic announcement when the queue is full.

The only tricky bit is the “Do you want to talk to a representative?” part at the end, although there’s probably a relatively way to do that as well. There are lots of flexible options in the queue process (press this to go to voicemail, etc.) and you could probably simulate a mini-IVR using the queue processing model.

If you already have the custom context written, you could create an Asterisk DB entry that counts the calls by incrementing the call count at the start of the context and decrementing the count at the end of the context.