[OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Sep 15 13:41:22 CEST 2009


Hi Iñaki,

priority applies only to rules that overlap - this can happens only when 
time selection is used for the rules:

Ex: RULE1:  for prefix 1234, all the time,  use GW1, prio =1
      RULE2:  for prefix 1234, during weekend, use GW1, prio = 4

Here the rules will overlap during the weekend - they both match; in 
this interval, the highest priority rule will be used.

The priority mechanism is used exclusively for this case.

The module does not do any rule fallback - once a rule is match, it will 
use only the destination from the rules and it will not try to re-match 
a different rule.

Regards,
Bogdan

Iñaki Baz Castillo wrote:
> Hi, I'm trying to figure if it makes sense and it's possible to set various 
> entries in 'dr_rules' table with same 'groupid' but different 'priority' so 
> after trying all the gateways in the rule with highest priority, the gateways 
> in the second rule would be tryed.
>
> However it seems that I'm wrong since it doesn't work. Just the rule with 
> highest priority is taken (and all its configured gateways or list of 
> gateways).
>
> In the doc I read:
>
> --------------------------------------
> 1.1.5. Routing Rule Processing
>
> within the set of rules is applied the time criteria, and the rule which has 
> the highest priority and matches the time criteria is selected to drive the 
> routing.
> --------------------------------------
>
> But it doesn't work for me. I've two rules:
>
> rule 1:
> - groupid = 1
> - priority = 10 (highest)
> - gwlist = 1,2
>
> rule 2:
> - groupid = 1
> - priority = 5
> - gwlist = 3,4
>
>
> Then in the script I do:
>
>   do_routing("1");
>   t_relay();
>
> and in failure route:
>   if t_check_status("408|503") {
>     use_next_gw();
>     t_relay();
>   }
>
>
> In my example call the rule 1 is choosen (since it has highest prioriry). 
> Gateways 1 and 2 fail (reply 503 code) and there is no more failover, this is: 
> servers 3 and 4 are not tryed, is it the expected behaviour?
>
>
> Thanks.
>
>
>   




More information about the Users mailing list