Limiting concurrent calls to each dial plan

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Limiting concurrent calls to each dial plan

Post by vedeya »

1. Brekeke Product Name and version:
Brekeke SIP Server, 2.4.3.0/286


2. Java version:
1.6.0_11


3. OS type and the version:
Linux version 2.6.22-vs2.2.0.7-gentoo


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


5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
Pattern9


6. Your problem:
I would like to be able to control how many concurrent calls are made, simply I would like to allow how many session are allowed for each dial plan, "live sessions". I have 3 dial plans each one is for each provider so when the first dial plan is using 20 live sessions, I want session 21 to use the second dial plan.

Dial plan 1: 0 to 20 live calls can made and used
Dial plan 2: 21 to 35 live calls
Dial plan 3: 36 to 45 live calls


if dial plan 1 used all the 20 sessions, the 21 will go to the second dial plan, if two calls are ended the next call to go to dial plan 1.

Please let me know if my concern is not clear.

Thanks
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

Brekeke PBX ARS rule works similar as dial plan and can set max session under each ARS rule,
and using ars failover to switch to another route if previous route has max active sessions
http://www.brekeke-sip.com/download/bpb ... sic_en.pdf
section 4.18

dial plan session plugin can check total active session of all dial plans
http://www.brekeke-sip.com/download/bss ... gin_en.txt
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

hope wrote:Brekeke PBX ARS rule works similar as dial plan and can set max session under each ARS rule,
and using ars failover to switch to another route if previous route has max active sessions
http://www.brekeke-sip.com/download/bpb ... sic_en.pdf
section 4.18
Is this applicable on the Brekeke Sip Server? or is it only for Brekeke PBX?

hope wrote:dial plan session plugin can check total active session of all dial plans
http://www.brekeke-sip.com/download/bss ... gin_en.txt
Is it possible to use variables? and does the variables save the value for the next time the function is called?

May I get a sample code using dial plan plugin?
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

If we buy support from brekeke would you be able to provide us for the solution? And how long would it take?

Thank you,
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

Is this applicable on the Brekeke Sip Server? or is it only for Brekeke PBX?
it is only for brekeke pbx
Is it possible to use variables? and does the variables save the value for the next time the function is called?
you can use $sessionnum which is at http://www.brekeke-sip.com/download/bss ... min_en.pdf
page 61
but it is for checking all sessions
you'd better email brekeke support for plugin sample support@brekeke.com
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

Hi all,
You need to create a plugin based on the Session Plugin API as hope mentioned.


>> Dial plan 3: 36 to 45 live calls

What happen if the number of concurrent calls exceeds 45?
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

lakeview wrote:
>> Dial plan 3: 36 to 45 live calls

What happen if the number of concurrent calls exceeds 45?
The last dial plan will take all the sessions. so it will be 36 to infinite.
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

Have you tried the making of own plugin?
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

lakeview wrote:Have you tried the making of own plugin?
No, it has been a while since the last time I programmed Java.

Some help would be appreciated
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

What I am looking for is every time a session start on a dial plan a variable will be increased by 1, and when the same session is ended then the same variable will decrease by 1.

we can have 4 variable and every one can be used for a dial plan, then we can use the built in math:

$math.lt( $sessionnum, "47" )=true

but instead of $sessionnum we should have our custom variable.

Thanks
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

Yes. you are correct.

We need to create the session plugin to increase and decrease the counter.
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

The thing I am not sure about is, how to store that variable and keep it some where in the memory not loosing it every time you call the function.
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

You can use own counter variable in the plugin because it is Java based.
vedeya
Posts: 8
Joined: Sat Feb 13, 2010 10:44 pm

Post by vedeya »

You can use own counter variable in the plugin because it is Java based
Would you please give me more explanation of how to use own counter variable in java?

Thanks,
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

I recommend you to contact Brekeke's support team because they have the developer support program.
Good luck.
Post Reply