It would be interesting to monitor the global active channels number for all trunks.
We have actually a maximum channels limit for each trunk, but for most professional setups we have more than one trunk. At least one RTC provider trunk, one RTC backup provider trunk, one or more private trunks, and one Enum trunk.
To avoid bandwith saturation on the Wan, we need to restrict the number of calls. This is not done efficiently by the actual method because the sum of calls on each trunk need to be lower than the maximum global number of calls.
If we had a maximum number of calls setting for all trunk, we could put a higher maximum for each trunk.
This should work as soon as we are using the same Codec for all trunks. (in a professional setup, we use most of the time G711).
Restricting the number of calls is quite an unprofessional method of controlling bandwith. Using RSVP or a similar bandwith allocation method, wa can mimic traditional telephony ATM bandwith control. This is a better way. But unfortunately hardware supporting RSVP is expensive.
Without RSVP, an alternative way could be to compute the total bandwith from the bandwith sum of all active calls, and authorize or decline new calls.
Then we would just have to give the WAN bandwith, and the asterisk system would stay below. This seems quite an acceptable method, as soon as the WAN link is dedicated to only one Asterisk server traffic. (most companies setup should be in this situation, because even if they have a backup server, it does not run normally at the same time).
Asterisk and FreePBX seems to be quite mature as of today, but they miss a basic bandwith management method.