Is there a way within load balancer module to route certain calls to certain specific servers?
Let's say I have my load balancer set up and calls are being distributed to the servers; however, I would like to send an specific call to a specific server such as routing test numbers and things in that sort.
Is it possible to route the call to an specific dest IP within the load balancer module so those calls will be accounted for as well?
Actually you cannot do that in a nice way - LB module does not allow you to force calls to a certain destination. Of course, you can divert these special calls to a destination, before hitting the LB, but the corresponding load will not be counted by LB.
If you want to have the load counted by DB, there is an ugly, ugly way to do it : as LB is using dialog profiles to count the calls, you could manually add your test calls (from the script) into the corresponding profiles, like:
where aaaaa is the name of the resource and 0xnn is the hexa version (capital letters) of the id of the destination (as per DB).
Thank you for the response.
How about this as a work around: For each dest_uri I would add one unique resource such as server1, server2, etc. Then If I want to send the call to the first server, I do load_balance("1","server1")
This way the call will be forced to the first server since that's the only server that has that resource.
I wonder how would that affect the total number of channels available on that server?
that will not work in the desired way - the LB module calculates the load per resource. So adding a new resource for each box (dest_uri), will not change the way the load and routing is done on the first resource. LB will know that it has 500 channels for first resource and it do LB according the load over the first resource only - it will not care that you also put some calls on the second resource.
It is a bit tricky, but I hope I managed to explain it clear :)
Thanks Bogdan. It makes sense and you explained it well.
I will try the solution you suggested earlier and keep thinking of other possibilities. Will post the results here.
It would be a good improvement to add rules to the load balancer, so you keep using the same resources with your specific rules.
I did implement your suggestion below and it works well. However, I still have a problem. You suggested earlier this:
> where aaaaa is the name of the resource and 0xnn is the hexa version (capital letters) of the id of the destination (as per DB).
Currently I need to do a db query to get the 0xnn (the id of the destination), is there a way that I can find the id without a DB query? DB access slows down the service.
The reason I want to find a way to do this without a query is that I need to increment the used channels for a specific gw when there is an outgoing call from that gw that does not go through the load balancer module but still uses the resources on the gw. i.e. if I have 100 channels on a gw, and there are 10 outgoing calls from the gw, the load balancer module thinks the gw still has 100 free channels to terminate the calls not 90.
Any advice here would be greatly appreciated.