trunk load balancing?

Discussion in 'General' started by Patrick_elx, Nov 27, 2009.

  1. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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?
     
  2. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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
     
  3. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    version alpha 0.0.2 is out for testing.

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

    Joined:
    Jul 6, 2010
    Messages:
    2
    Likes Received:
    0
    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?
     
  5. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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.
     
  6. andydeng

    Joined:
    Jul 6, 2010
    Messages:
    2
    Likes Received:
    0
    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!
     
  7. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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...)
     
  8. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
  9. Hiko78

    Joined:
    Aug 24, 2011
    Messages:
    3
    Likes Received:
    0
    Hi, Patrick, wich version of elastix is these module intended for?
     
  10. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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.
     
  11. dingoland

    Joined:
    Jan 16, 2008
    Messages:
    220
    Likes Received:
    0
    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
     
  12. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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
     
  13. dingoland

    Joined:
    Jan 16, 2008
    Messages:
    220
    Likes Received:
    0
    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
     
  14. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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.
     
  15. dingoland

    Joined:
    Jan 16, 2008
    Messages:
    220
    Likes Received:
    0
    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
     
  16. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
  17. dingoland82

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

    Regards
    Greg
     
  18. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    héhé. :laugh:
     
  19. tataghost

    Joined:
    Apr 1, 2010
    Messages:
    46
    Likes Received:
    0
    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 ,
     
  20. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    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...
     

Share This Page