Number of simultaneous calls

I need to limit the number of simultaneous calls, both incoming and outgoing

example:

Merely 4 lines, users can make two outbound calls and receive two calls

I saw it in the trunk can be limited but only in output

I also saw that by manipulating a context can limit fattening

But I want it to be a total of 4

I hope I was clear

What about having an incoming queue (one that is pointed to by incoming route) with call limit 4 ? The failover to be VM or just hang-up.

Thank you for your suggestion
Actually they ask me to limit the number of simultaneous calls per trunk
In practice, if we limit 4 outgoing calls and incoming simultaneous total may not exceed 4
I do not know there is a way

There are no /incoming/ limits in the settings of trunks or inbound routes, that I can see… but you can probably use a queue (capacity 4, with queue-no-answer option set, and MOH set to ‘ring’) per incoming trunk, to that effect (set queue failover destination to terminate/hang up, not VM)

And if you made a contest only for the outgoing and incoming trunk and says that in that context can make up to 10 simultaneous calls?
If it were possible I could say how many contemporary lines are used …

Maybe this can help :slight_smile:
With this you can limit concurrent lines lost a given IP “provvaider”

#vi sip.conf
context = mydefaultContext

[SIPTrunkFORserver2]
type = peer
fromdomain = server1_IP_add
host = server2_IP_add
outboundproxy = server2_IP_add
call-limit = 100

; Here I am limiting to 100 max concurrent calls thru 'this trunk
context = FromServer2Trunk
; Call From This trunk lands to [FromServer2Trunk] context

What do you say?

This looks a lot like the trunk configuration - can you add the call-limit to your peer config?
Also see the help text on the Maximum Channels option of the trunk, may be what you want. (controls maximum number of outbound channels (simultaneous calls) etc…)
If that works, then you probably don’t need to limit it by the queue.
However having (a) queue(s) helps if you have calls ringing in simultaneously.

It is in fact
Today I can not find it I think …
But I hope to do it soon
Just tested will give information on this post
In addition there is a way more complex motion but I’m catching a glimpse as the most powerful human … In practice by creating groups coninvolti in the rule of limitation:

#vi extensions.conf
#Asterisk Dialplan on Server1 [FromServer2Trunk] exten => _X., 1, Verbose (1 ***** Server2 dialing $ {EXTEN} *******) same => n, Set (GROUP () = server2Trunkgroup) same => n, Verbose (1 **** Number of concurrent calls are $ {GROUP_COUNT (server2Trunkgroup)}) same => n, GotoIf ($ [$ {GROUP_COUNT (server2Trunkgroup)}> 100]? 999) same => n, Dial (SIP / telco / $ {EXTEN}) same => 999, Verbose (1 *** Number of concurrent calls are $ {GROUP_COUNT (server2Trunkgroup)} over limit) same => n, Set (DIALSTATUS = CHANUNAVAIL)

Let me know

I am sorry I can not speak Asterisk …
also your snippet got mangled.

, I too only just catch the gist of it… so it could work maybe, but I probably wouldn’t go on editing extensions.conf to add this (as a reload of FreePBX will erase this), but rather to extensions(something)_custom.conf and call that context from a custom destination ?

it might be better to work on custom
I intend to talk about it when I have worked on this
I will test soon and I will share what I get