Forums Read-only archive

Control the number of channels allowed in a SIP trunk

8 posts · Brekeke SIP Server Forum

uhupfeld Original post
1. Brekeke Product Name and Version: SIP Server 3.6.3.0/454

2. Java version: 1.8.0_121-b13

3. OS type and the version: Win7 Pro

4. UA (phone), gateway or other hardware/software involved:

5. Your problem:
I would like to limit the number of simultaneous calls in a SIP trunk. Can this be done? If yes, how?

BR

Udo
snuyzm
uhupfeld
Great, this is exactly what I was looking for, thanks. I was relying too much on the PDF...

So, to make it more complicated, if I want to restrict overall calls to 30 from a customer which may have 2 or more IP adresses as origin (like 1.1.1.1 and 2.2.2.2) AND I use a prefix for the call (like 1212), the Dial Plan rule would be:

--------------------------------------------
[Matching Patterns]
$request = ^INVITE
To = sip:1212(.+)@
$or("$addr=1\.1\.1\.1","$addr=2\.2\.2\.2") = true
$route.underlimit( "gateway1", "30" ) = true

[Deploy Patterns]
To = sip:1212%1@172.16.1.101
$routename = gateway1
$continue = true
--------------------------------------------


Right?

BR

Udo
taitan
Try this.

Matching Patterns
$request = ^INVITE
$addr = ^1\.1\.1\.1$|^2\.2\.2\.2$
To = sip:(1212.+)@
$route.underlimit("gateway1","30") = true

Deploy Patterns
To = sip:%1@172.16.1.101
$routename = gateway1
$continue = true
DarrahLog
uhupefeld wrote:This works well if the originating IP is in the From field of the INVITE.
What if this list of originating IPs is in the Contact field?
What do I play online bingo instead of $addr ?
That worked for me thanks Taitan.
uhupfeld
This works well if the originating IP is in the From field of the INVITE.
What if this list of originating IPs is in the Contact field?
What do I use instead of $addr ?
taitan
Matching Patterns
$request = ^INVITE
$getHost(Contact) = ^1\.1\.1\.1$|^2\.2\.2\.2$
To = sip:(1212.+)@
$route.underlimit("gateway1","30") = true
uhupfeld
Thanks!