Saturday, March 21, 2020

Issabel Trunk Balancing in asterisk

Issabel distribution of Asterisk as a feature called Trunk Balance




This is a work in progress but you can use it in this methodology

Trunk balance lets you load balance across multiple trunks.  It also allows you to limit time usage on a trunk and values in SQL servers.

This example will balance "evenly' across 2 trunks, "Trunk1" and "Trunk2"
Go into TRUNK BALANCE

(Some unused options in the screen capture below were removed to show only settings for this example)

Trunk Description: "TrunkBalanceTest1"
Trunk Destination:  Your first trunk that you want to send calls.  In my example "Trunk1"

LOAD RATIO:  This is the ratio of calls this trunk should accept.  If you wanted 1/3 of the calls to go through this trunk, you would put a "3'" for 1/3.  This means the trunk would accept 1 out of 3 calls that are sent to it.

This example uses 2 trunks, I will put in a "2" in this to ensure this trunk gets 1/2 the calls.

IMPORTANT:
Your total here for all( ENABLE) TRUNKS must = 100% (at least)
IF you DISABLE a trunk, you MUST alter the ratio on the other trunks to ensure it equals to 100% at least.

Example:  If you have two trunks with 1/2 calls on each, and you DISABLE a trunk, you must change the value of the remaining active trunk for a "2" to a "1" to ensure the remaining trunk gets all the calls, else it will give 1/2 the calls busy signals!

Testing has shown that putting a value of "1" in the last trunk will ensure it always answers all remaining calls that it receives.

press SUBMIT CHANGES

Now Create a second balance trunk

Trunk Description: "TrunkBalanceTest2"
Trunk Destination:  Your first trunk that you want to send calls.  In my example "Trunk2"
LOAD ration = 2

press SUBMIT CHANGES

Now, go to your outbound routes that you want to use these trunks on.

Put your Trunk balance entries into your outbound routes that you want to use these


Submit your changes

Apply your settings.

Make some test calls!  It won't be exactly 50/50 split, but it will average out over time.

This example below is testing to the external number 7020

[2020-03-21 22:34:31] VERBOSE[65441][C-00000122] res_agi.c:     -- trunkbalance.php,5,7020: This trunk TrunkBalanceTest2 is balanced. Evaluating rules
[2020-03-21 22:34:37] VERBOSE[65452][C-00000123] res_agi.c:     -- trunkbalance.php,4,7020: This trunk TrunkBalanceTest1 is balanced. Evaluating rules
[2020-03-21 22:34:43] VERBOSE[65459][C-00000124] res_agi.c:     -- trunkbalance.php,4,7020: This trunk TrunkBalanceTest1 is balanced. Evaluating rules
[2020-03-21 22:34:48] VERBOSE[65466][C-00000125] res_agi.c:     -- trunkbalance.php,4,7020: This trunk TrunkBalanceTest2 is balanced. Evaluating rules
[2020-03-21 22:34:55] VERBOSE[65473][C-00000126] res_agi.c:     -- trunkbalance.php,4,7020: This trunk TrunkBalanceTest1 is balanced. Evaluating rules




8 comments:


  1. is it possible to balance dahdi trunks in this module?

    ReplyDelete
    Replies
    1. I've never tried it, but I don't really see a reason why it wouldn't work.

      Delete
    2. how add balance trunk in issabel

      Delete
  2. i install issabel but i do not find trunk balance , how install it in issabel?
    thanks

    ReplyDelete
  3. how can active this feature in issable

    ReplyDelete
    Replies
    1. https://forum.issabel.org/d/3618-trunk-rotation-for-external-connections/5
      At the end, but in Portugal language, i think !

      Delete
  4. is it possible to balance SIP trunks in this module?

    ReplyDelete