creating priority groups with drouting

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

creating priority groups with drouting

Andrew Pogrebennyk-3
Hi,

I'm looking for a way to setup two groups of gws to route the traffic to
with drouting. OpenSIPS shall use gws in second group only if all gws
within first group failed. So it shall go over the groups sequentially
but within the group, it's random. Think of it like second group
contains expensive e.g. EC2 gateways.

But as you all know drouting does not do any rule fallback - once a rule
is matched, it will use only the destinations from this rule and it will
not try to re-match a different rule.
Also I find it kind of limiting that the priority field in drouting is
considered only when the time selection is used for overlapping rules.

So it looks like I can't achieve this behavior with drouting in its
current shape. Actually it would be sufficient for me that if all the
gws in a rule (higher priority) fail then this rule (or its gws) be
automatically included in a blacklist, so if you call again the next
rule (minor priority) would be taken. Makes sense? Is there anything I
could try?

--
Sincerely,
Andrew Pogrebennyk

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

Re: creating priority groups with drouting

Bogdan-Andrei Iancu
Hi Andrew,

you can achieve what you need by using the "sort_order" option:
       
http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id272689

Probably alg. 1 is what you need:

"/1/ - the destinations from each group are randomly arranged (only the
two elements are randomly selected); groups do maintain their order (as
given); the resulting list is used (with all the defined destinations).
Ex: 1,2;3,4,5;6 -> randomizer -> (A) 2,1;4,3,5;6 -> usage 2,1,4,3,5,6
(B) 1,2;3,5,4;6 -> usage 1,2,3,5,4,6 "


Right now, there is no need for falling back to a different rule as you
can put all the GW options (as list or groups) on the same rule:
       gwlist = "cheap1, cheap2, cheap3 ; expensive1, expesive2,
expensive3 "


Regards,
Bogdan

Andrew Pogrebennyk wrote:

> Hi,
>
> I'm looking for a way to setup two groups of gws to route the traffic to
> with drouting. OpenSIPS shall use gws in second group only if all gws
> within first group failed. So it shall go over the groups sequentially
> but within the group, it's random. Think of it like second group
> contains expensive e.g. EC2 gateways.
>
> But as you all know drouting does not do any rule fallback - once a rule
> is matched, it will use only the destinations from this rule and it will
> not try to re-match a different rule.
> Also I find it kind of limiting that the priority field in drouting is
> considered only when the time selection is used for overlapping rules.
>
> So it looks like I can't achieve this behavior with drouting in its
> current shape. Actually it would be sufficient for me that if all the
> gws in a rule (higher priority) fail then this rule (or its gws) be
> automatically included in a blacklist, so if you call again the next
> rule (minor priority) would be taken. Makes sense? Is there anything I
> could try?
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


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