trunk load balancing?

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#1
EWT describes some ways to do load balancing on outbound trunk based on number of calls.

Does someone has a good load balancing module or script to manage the load balancing on trunk usage.

For instance, I have a trunk with a provider A that give me 2h of call included in the price, but every additional minutes is more expensive than my provider B.

I would like to change the priority order of the trunk when the 2h limit is reached within each billing cycle.

I would prefer a nice freepbx/elastix way of doing it. But I guess than an independant script with a cron job can survey the cdr and change the trunk order in an outbound route via the manager or directly in the sql database.

Any pointer somewhere?
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#2
Ok, as nobody answered I've spend my weekend building something.

You can find the alpha release of a trunk balancing module for Freepbx here.

http://projects.colsolgrp.net/wiki/trunkbalance/User_Manual

It's an alpha release and could be a little bit more user friendly, but so far it does the job.
Please report feedback.

Patrick
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#3
version alpha 0.0.2 is out for testing.

Same functionalities, but some bugs corrections.
Continue to send feedback.
 

andydeng

Joined
Jul 6, 2010
Messages
2
Likes
0
Points
0
#4
Great work, Patrick, thanks!
I have downloaded the latest 0.3.2 version and only got one question, can we make all or more features available for ZAP trunk?
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#5
With freepbx 2.6 it's not that easy as the zap trunk are handled differently (not on the same table in the database).

I'll give a look at the later freepbx version to see if they upgraded the way to handle the zap trunk.

If not, I would have to rewrite a specific behavior for these trunks that may be difficult with the way I'm injecting my agi in the dialplan.
 

andydeng

Joined
Jul 6, 2010
Messages
2
Likes
0
Points
0
#6
Thanks for explanation about this. I don't know zap trunk is using different table in database.

By the way, is there a simple way to deploy trunk load balancing in your software, for example we only build one custom trunk, and put all trunks which we want to be load-balance, then it can be done. Thanks!
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#7
andydeng said:
By the way, is there a simple way to deploy trunk load balancing in your software, for example we only build one custom trunk, and put all trunks which we want to be load-balance, then it can be done. Thanks!
That's not really the way this add on was developed.
The root concept is that each trunk has different limit/need/filter...
You then just create a go/no go filter (the balanced_trunk) for a set of condition on one trunk. And then you can continue to organized your trunk and balanced trunk within your routes the way you want.

If you are only looking for an evenly balanced load between different trunk, I could create a more simplified gui. But you will loose the fine tuning between each trunk (the ratio mode) and all the other options (like time limit, filter on number dialed, etc...)
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#8

Hiko78

Joined
Aug 24, 2011
Messages
3
Likes
0
Points
0
#9
Hi, Patrick, wich version of elastix is these module intended for?
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#10
It's for freePBX version 2.6 and 2.7. I'm not sure about 2.8.
It should work with the Elastix versions using these versions of FreePBX.
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#11
Hi Patrick,

I'm testing your trunk balancing module and i have a question about it:
Can i limit calls duration by call instead limiting by time interval with your module ?

Regards
Greg
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#12
Hi Greg,

I'm not sure I understand your question.
As you know my module does not limit the length of a call nor shut down a call in progress (your mod for that is the best way to do it). It's only checking before a call.

Regarding the number of different calls (the OVH 99 different numbers monthly limit), my module has this option already with the 'Max. different call' entry.

If you use another provider that just limit the number of calls (and count each call, even to the same number as a different one) then use the 'Maximum number of call' parameter instead.

Patrick
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#13
Patrick,

Thank you for your quick answer.

My idea is to limit the duration of each outgoing call to one hour but only for a specific trunk, not for all trunks.

I would like to know if your module can manage this scenario ?

Regards
Greg
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#14
no, not at this time. But you can probably do something with your L(x:y:z).
It can maybe be added to the trunk rule, but I haven't investigated that option.
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#15
Ok, thank you Patrick.

I have read a lot of documents but nothing about the L(x:y:z) for trunk configuration directly.

Regards
Greg
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88

dingoland82

Joined
Jan 15, 2008
Messages
37
Likes
0
Points
0
#17
It is where i pick up infos to do it on my Elastix ;)

Regards
Greg
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#18
héhé. :laugh:
 

tataghost

Joined
Apr 1, 2010
Messages
46
Likes
0
Points
0
#19
Dears

I just tried to use the load balancing module but i need to have some answers please

1- Max time and Max number of calls , i tried to put 1 and 1 but it didnot work
call can go more than 1 min and i can do more than 1 call using that trunk

Sorry if i miss some thing here


But that what i need ,
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#20
go in the cli with an asterisk -rvvvvv and look at what is happening. The module should tell you step by step what it is doing.

You maybe have chosen the wrong trunk or put the wrong rules...
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,915
Messages
130,920
Members
17,595
Latest member
feparra121
Top