Limit the number of simultaneous calls per extension


I need to limit the number of simultaneous (live) calls per few extensions. I have an DID provider from where I can take trunks and put the numbers where I need more channels in those trunks because by default I only have 2 channels/DID.
But from 3 trunks (30 channels) I need to isolate 20 for one customer, 6 for other, etc… and the provider can’t do it per DID.
Is there a way to have an option on those extensions and when asterisk sees that he have 6 live calls on one extension to reject the new onces?


Use the dial plan and math to calculate how many channels are in use for that customer.

This is what I use, … ting_Calls

Works well and lets you play a message


I am sure there is a setting in one of the configurations. I cannot remember which one at the current moment

There is and its buggy!

In queues it doesnt decriment down so the phone shows busy in the end.


I will try the solution provided by ianplain, I know there is also a mechanism in queue which I use but I have a long audio playback before the call enter in the queue.