[OpenSIPS-Users] load balance module routing

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Aug 5 17:55:44 CEST 2009


Hi Ben,


Ben Dinnerville wrote:
> Hi All,
>
> I am looking into using the load balance module to load balance inbound 
> calls across a asterisk cluster (We currently use LCR for round robin 
> distribution). We offer different services on inbound calls such as 
> vxml, voice rec etc which when using the load balance module, it looks 
> like we can use the resources part of the call to determine which 
> gateway to route the call to.
>
> My question is, how does one determine what resources to choose for a 
> particular call?
>
>   
you do the resource detection in the script, based on whatever 
information you have there.

> Looking at all the documentation, the only way we could do it would be 
> to place a block in the config file for each inbound number / 
> destination that we have and manually in the config file enter a 
> load_balance statement for each destination.
>
> EG:
>
> # DID 612806XXXXX needs voice rec and vxml
> if (uri=~"^sip:612806XXXXX@") {
> 	if (load_balance("1","voicerec;vxml")) {
> 		xlog("sending call to $du\n");
> 		t_relay();
> 		exit;
> 	}
>
> };
>
>
> obviously this works on a small scale solution, but what happens when 
> you have hundreds or thousands of DID's (we have a requirement to setup 
> 1500 dids in the next few weeks)?
>
> Is there some way to manage the routing/resource information on a per 
> destination / did basis in the database so that one can manipulate the 
> database (ie use a browser admin tool or similar) and then execute a 
> lb_reload to have the new routing information reloaded?
>   
I suggest to use the dialplan module - use rules (in DB) to detect (per 
DID) what resources to be used. Than, in the script you just have to 
trigger LB according to the resources returned by the dialplan modules.

Regards,
Bogdan



More information about the Users mailing list