Trunk balancing is a program designed to manage the availability of outbound trunks based on number of minutes used, and number of minutes available. This module is used primarily to help users create a “least-expense” route environment. It can also balance the load on multiple outbound trunks by applying a ratio factor.
If your outbound trunks include a certain number of outbound minutes, and then charge by the minute – or if you simply want to control the load on your trunks via a ratio setting, this module may have just what you’ve been looking for.
Remember – Alpha revision software should not be applied to production, or mission-critical PBXs.
Why not drop by, and kick the tires on this new exciting module for FreePBX.
This is the only forum I can write something since the pbxinflash and the project homepage doesn’t allow me to post anything. The point is that I tried to use the module but the following appear in the logs:
[Mar 23 11:13:22] WARNING[24128] channel.c: No channel type registered for ‘Balancedtrunk’
[Mar 23 11:13:22] WARNING[24128] app_dial.c: Unable to create channel of type ‘Balancedtrunk’ (cause 66 - Channel not implemented)
First, please check that you are using the latest release
+++++++++++ sure, I try 2 ver but both of them not working
Second, could you please log in your CLI with a verbose of 4 or more (asterisk
+++++++++++++++++++++
I found a info is :
– Executing [s@macro-dialout-trunk:28] Dial(“SIP/8006-00000016”, “Balancedtrunk/en0281970262-4|300|tT”) in new stack
there is no out no. including. so, I check the: Trunks,Custom Trunk,BAL_en0281970262-4 settings. there is no "Dialed Number Manipulation Rules"
and also “Custom Dial String” set to “Balancedtrunk/en0281970262-4” which is not match with the examples coz all examples including "$OUTNUM$"
I changed “Custom Dial String” set to "Balancedtrunk/en0281970262-4/$OUTNUM$"
looks better, the sysytem try to dial the no. but still working
– Executing [s@macro-dialout-trunk:28] Dial(“SIP/8006-00000031”, “Balancedtrunk/en0281970262-4/0280693806|300|tT”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:29] NoOp(“SIP/8006-00000031”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 66”) in new stack
I also set a “Dialed Number Manipulation Rules”. if not the system will not comes up "dial"
So, I think this Module need more seetings after adding a balance trunk.
What trunkbalance is doing is going through a series of rules that you define and if one of them failed, it will tell asterisk that the trunk is busy. So asterisk will try the next one. That’s why if you +++++++
+++++++++++++++++++++++++++++++++++++++++++++++
I did this, calls always goes to the backup trunk.
First, please check that you are using the latest release
+++++++++++ sure, I try 2 ver but both of them not working
Second, could you please log in your CLI with a verbose of 4 or more (asterisk
+++++++++++++++++++++
I found a info is :
– Executing [s@macro-dialout-trunk:28] Dial(“SIP/8006-00000016”, “Balancedtrunk/en0281970262-4|300|tT”) in new stack
there is no out no. including. so, I check the: Trunks,Custom Trunk,BAL_en0281970262-4 settings. there is no "Dialed Number Manipulation Rules"
and also “Custom Dial String” set to “Balancedtrunk/en0281970262-4” which is not match with the examples coz all examples including "$OUTNUM$"
I changed “Custom Dial String” set to "Balancedtrunk/en0281970262-4/$OUTNUM$"
looks better, the sysytem try to dial the no. but still working
– Executing [s@macro-dialout-trunk:28] Dial(“SIP/8006-00000031”, “Balancedtrunk/en0281970262-4/0280693806|300|tT”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:29] NoOp(“SIP/8006-00000031”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 66”) in new stack
I also set a “Dialed Number Manipulation Rules”. if not the system will not comes up "dial"
So, I think this Module need more seetings after adding a balance trunk.
What trunkbalance is doing is going through a series of rules that you define and if one of them failed, it will tell asterisk that the trunk is busy. So asterisk will try the next one. That’s why if you +++++++
+++++++++++++++++++++++++++++++++++++++++++++++
I did this, calls always goes to the backup trunk.
Second, could you please log in your CLI with a verbose of 4 or more (asterisk -rvvvv) and check exactly what’s happening. Trunkbalance should show you debug about why it failed your route.
What trunkbalance is doing is going through a series of rules that you define and if one of them failed, it will tell asterisk that the trunk is busy. So asterisk will try the next one. That’s why if you read the wiki (http://projects.colsolgrp.net/projects/trunkbalance/wiki/User_Manual) you need to put in your route more than one trunk, because if it fail, your route will fail. For instance if you want to balance between two trunks A and B you will create an outbound route with the following trunk in order:
balanced trunk A (that you created with a ratio of 1:2)
trunk B
trunk A (as a failover if trunk B is unavailable)
I have sent a message to the module developer for you.
The reason you have not been granted write permissions in either the forums or developer support site that you mentioned is that you are not registering with your real Name or valid email address. In both places, these things are required.
Please be prepared to provide the follwing info:
Linux Version and build, asterisk version, FreePBX version, what technlogy you use for inbound routes, what versions of drivers you are using for analog trunks, what version of PHP are you running, and what version of the Trunk Cost / Load Balance module you are running. Also, check the wiki for the module just in case. Many of the projects at that developer support site have been adding documentation recently. http://projects.colsolgrp.net/projects/trunkbalance/wiki
i have this working for balancing, but for limiting in amount of minutes its no so good, because it count the time of each call in seconds, another drawback is that the module doesnt hangup a call if get the limit, just work if the limit was reached and a new call is trying to be made
As the load factor evaluation is a probabilistic algorithm, it may happen that after passing all trunks, there is still the possibility that none of them returned a 1. Asterisk is not able to open a ‘Balancedtrunk’ channel type; it can only open known channel types and this happens only if any of the trunks returned 1.
To solve this you must set the load factor to 1 for the last evaluated trunk, independently of the setting of the other trunks.
By example, if you have 4 trunks and want to load balance them evenly, then set load factor 4, 4, 4 and 1 for the last one.
The project is not dead, but it is not very active. Development for this module has been taken over by the PBX Open Source Software Alliance (POSSA) and its current home is here:
I tried to register at colsolgrp.net to help develop the module, but the site is not accepting new subscriptios.
Is the module being developed anywhere else? If not, would it be possible for me to carry on with it, taking over the task on another repository?
Of course, this is open source and I am entitled to do whatever I want. But I would not like to fork it or something like that, I like to maintain things running under the same name.
Patrick is no longer actively maintaining this module, tho he will respond to direct email requests. As I said, POSSA is the current maintainer and we would absolutely welcome you aboard if you want to become the project lead. All you need is a Github account. If you are not familiar with github, once you have an account, start a new issue <a href= https://github.com/POSSA/freepbx-trunk-balancing/issues?state=open>here and we will guide you through the process.