Control the number of channels allowed in a SIP trunk

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
uhupfeld
Posts: 77
Joined: Sat Nov 08, 2008 12:15 pm
Location: Brazil

Control the number of channels allowed in a SIP trunk

Post by uhupfeld »

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
Posts: 97
Joined: Wed Feb 11, 2015 10:12 pm

Post by snuyzm »

uhupfeld
Posts: 77
Joined: Sat Nov 08, 2008 12:15 pm
Location: Brazil

Post by 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
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by 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
Posts: 1
Joined: Fri Sep 01, 2017 2:18 am

Post by 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.
Last edited by DarrahLog on Thu Aug 23, 2018 12:12 am, edited 1 time in total.
uhupfeld
Posts: 77
Joined: Sat Nov 08, 2008 12:15 pm
Location: Brazil

Post by 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
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

Matching Patterns
$request = ^INVITE
$getHost(Contact) = ^1\.1\.1\.1$|^2\.2\.2\.2$
To = sip:(1212.+)@
$route.underlimit("gateway1","30") = true
uhupfeld
Posts: 77
Joined: Sat Nov 08, 2008 12:15 pm
Location: Brazil

Post by uhupfeld »

Thanks!
Post Reply