load balance module routing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

load balance module routing

Ben Dinnerville
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?

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?

Or is there some other way that I am overlooking that already exists to
provide this sort of routing?

Cheers,

Ben


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: load balance module routing

Bogdan-Andrei Iancu
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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: load balance module routing

Ben Dinnerville
Bogdan-Andrei Iancu wrote:

> you do the resource detection in the script, based on whatever
> information you have there.
>

> 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

Thanks for the prompt response Bogdan, I will have a play around with
that and am sure I will get something working.

As something for the future / feature request, could I suggest something
along the lines of the extra table that is used for the LCR module.

IE, at present with load balance there is the load_balancer table that
stores destination information (mapping destinations to resources) which
is similar in function to the gw table for lcr. Lcr also has the "lcr"
table that maps a prefix / request uri to a gateway - adding a table
similar to this to map request uri to resources to the load balance
module would make routing a lot more manageable.

Something along the lines of :

id
request_uri
grp_id
resources
priority


so there would then be 2 tables for the load balance module similar to lcr.

Anyway, just a suggestion, thanks for again for the prompt response and
the great work!

Cheers,

Ben


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: load balance module routing

Bogdan-Andrei Iancu
Hi Ben,

My idea was not to bind the LB to a certain way to of detecting the
needed resources. Instead, you can use any module (dialplan, drouting,
etc) to do it.

Best regards,
Bogdan

Ben Dinnerville wrote:

> Bogdan-Andrei Iancu wrote:
>
>  
>> you do the resource detection in the script, based on whatever
>> information you have there.
>>
>>    
>
>  
>> 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
>>    
>
> Thanks for the prompt response Bogdan, I will have a play around with
> that and am sure I will get something working.
>
> As something for the future / feature request, could I suggest something
> along the lines of the extra table that is used for the LCR module.
>
> IE, at present with load balance there is the load_balancer table that
> stores destination information (mapping destinations to resources) which
> is similar in function to the gw table for lcr. Lcr also has the "lcr"
> table that maps a prefix / request uri to a gateway - adding a table
> similar to this to map request uri to resources to the load balance
> module would make routing a lot more manageable.
>
> Something along the lines of :
>
> id
> request_uri
> grp_id
> resources
> priority
>
>
> so there would then be 2 tables for the load balance module similar to lcr.
>
> Anyway, just a suggestion, thanks for again for the prompt response and
> the great work!
>
> Cheers,
>
> Ben
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users