[sr-dev] [Kamailio 1.5 LCR] gw with same IP but different port is not loaded

Henning Westerholt henning.westerholt at 1und1.de
Tue Jun 1 18:35:42 CEST 2010


On Sunday 30 May 2010, Iñaki Baz Castillo wrote:
> [..]
> >> - Am option to allow stopping lcr_rules, this is, if the lcr_rule is
> >> choosen (by priority/prefix/from_uri) and the request fails, no other
> >> gateways from other lcr_rules would be tryed.
> >
> > why can't you do this in the script?
> 
> Because it's ugly to do so in the script, it makes unfeasible to admin
> it via a web interface. A common use case:
> - I want a default route using gw1 and gw2 (for any prefix).
> - In calls to 001 (USA) I want to use *just* gw3, so I could create a
> lcr rule with prefix 001 and grp_id=X, and a lcr_group with id=X
> containing just gw3.
> - If gw3 is down or replies 503 (this is, if the USA lcr rule fails) I
> don't want to try the default route (gw1 and gw2). This is not
> possible with the current design as the default route (lcr rules with
> no prefix) would be loaded automatically.
> - With my proposal (a column "stop" with value 1) there is no need to
> coding ugly and static code in failure_route. Instead load_gws() would
> stop inspecting lcr_rules table when a rule with "stop=1" is found.

Hi Iñaki,

maybe you want to take a look to the cr module (at least for some additional 
inspiration..), where we've added functionality to match for the prefix, 
arbitrary flags or for reply codes and decide with this data if the next rule/ 
which rule should be executed as a next try. You'll find some examples in the 
docs (1.21, 1.22). The specific table is named "carrierfailureroute".
Perhaps it provides a bit more generic solution to the usecase you described, 
if i understand it correctly.

Cheers,

Henning



More information about the sr-dev mailing list