Ricardo Martinez writes:
GW1, GW2 and GW3. Let’s suppose also that each gateway is connected to digital E1 with 30 channels. At certain time of the day one of the gateways is at full capacity using the 30 channels. This is what I wanted to do : can I have a variable with the maximum channels available for a certain gateway, and for each call going to that gateway a counter?. When the counter reach the maximum, can I remove the gateway from the LCR choosing algorithm until it has capacity again?
there is function defunct_gw(period) that you can use to defunct a full gateway for some period of time.
for what you propose, you would need to use dialog module to keep track of dialogs to each gateway and that way manage your counters. then after calling next_gw(), you could check if its counter allows you to actually use it.
i'm not myself a believer of dialogs in sip proxy.
-- juha