Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Limiting concurrent calls to each dial plan
Author Message
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Sat Feb 13, 2010 10:54 pm    Post subject: Limiting concurrent calls to each dial plan Reply with quote

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/networkpatterns.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
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Wed Feb 17, 2010 5:19 pm    Post subject: Reply with quote

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/bpbx/v2_x/bpbx_admin_basic_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/v2_x/bss_accountplugin_en.txt
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Thu Feb 18, 2010 8:39 am    Post subject: Reply with quote

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/bpbx/v2_x/bpbx_admin_basic_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/v2_x/bss_accountplugin_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?
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Thu Feb 18, 2010 9:44 am    Post subject: Reply with quote

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

Thank you,
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Thu Feb 18, 2010 2:50 pm    Post subject: Reply with quote

Quote:
Is this applicable on the Brekeke Sip Server? or is it only for Brekeke PBX?

it is only for brekeke pbx

Quote:
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/v2_x/bss_admin_en.pdf
page 61
but it is for checking all sessions
you'd better email brekeke support for plugin sample support@brekeke.com
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Mon Feb 22, 2010 1:15 pm    Post subject: Reply with quote

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?
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Tue Feb 23, 2010 10:11 am    Post subject: Reply with quote

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.
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Wed Feb 24, 2010 6:59 pm    Post subject: Reply with quote

Have you tried the making of own plugin?
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Wed Feb 24, 2010 9:05 pm    Post subject: Reply with quote

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
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Thu Feb 25, 2010 1:42 am    Post subject: Reply with quote

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
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Thu Feb 25, 2010 8:51 pm    Post subject: Reply with quote

Yes. you are correct.

We need to create the session plugin to increase and decrease the counter.
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Fri Feb 26, 2010 9:48 am    Post subject: Reply with quote

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.
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Fri Feb 26, 2010 4:19 pm    Post subject: Reply with quote

You can use own counter variable in the plugin because it is Java based.
Back to top
View user's profile
vedeya
Brekeke Junior Member


Joined: 13 Feb 2010
Posts: 8

PostPosted: Sat Feb 27, 2010 10:20 am    Post subject: Reply with quote

Quote:
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,
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Tue Mar 02, 2010 12:32 pm    Post subject: Reply with quote

I recommend you to contact Brekeke's support team because they have the developer support program.
Good luck.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1