[OpenSIPS-Users] Setting do_routing

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Feb 14 12:55:40 CET 2014


Hi Nick,

So the input of route_to_gw() should be also a list of GW IDs (from the 
dr_gateways table)....I will look into this.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 13.02.2014 21:16, Nick Cameo wrote:
>>> What will help you is a kind of route_to_gw() but instead of taking as param a single GW, >> to take a list of GWs ? and to iterate through using use_next_gw() ?
> That's exactly what I need! :) Or a do_routing() gw_whitelist which is
> executed in order.
> As you would imagine we already `use_next_gw()` in our failure route
> and that works
> together with dr_rules as expected....
>
>>> Also, what Nick Altman says is very very true - you can simply populate the AVPs he
>>> mentioned (do it from script, loading from a DB, replacing the functionality of do_routing() >> and do the use_next_gw() ......it simply works....and it simply scale :)
> Yes I literally just examined into these avps:
>
> modparam("drouting", "ruri_avp", '$avp(dr_ruri)')
> modparam("drouting", "gw_id_avp", '$avp(dr_gw_id)')
> modparam("drouting", "gw_attrs_avp", '$avp(dr_gw_attrs)')
>
>
> That being said `gw_id_avp` is the only one that I should need to
> change? However, correct me if I am wrong, I will not be able to
> assign my comma separated gwlist (ie, 7,4,1) to it, and have opensips
> do everything as it does with `do_routing` and `use_next_gw`?
>
> $avp(dr_gw_id) = 7,4,1 -> Where 7,4,1 are gateway IDs found in
> dr_gateways. If I can do this, it would be case closed!
>
> If not, I would have to:
>
> i) Substring comma separated list into individual IDs
> ii) Assign separated ID to $avp(dr_gw_id) in default route before relay
> iii) Pass next gateway in the list to use_next_gw in the failure route
> iv) Iterate?
>
> Your help is greatly appreciated!
>
> Kind Regards,
>
> Nick.




More information about the Users mailing list