[OpenSIPS-Users] Dynamic Routing "flow" question 1.8

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Feb 23 23:35:50 CET 2016


Hi Jim,

Better make a prefixless rule with gwlist pointing to the 2 carriers, 
like "#carrier1,#carrier2"....and simply do do_routing() + failure route 
on "next_gw".

In this way, the do_routing() will assemble from the beginning a list 
with the gws from both carriers, and there is no need to manually 
aggregate them.

Regards,

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

On 23.02.2016 00:27, Jim DeVito wrote:
> Hi All! Question. What I have for testing is below. It works and 
> cycles through the gateways for carrier 1. What I can not seem to do 
> right is AFTER all the GW's for carrier 1 are exhausted I would like 
> try carrier 2 (provided a second valid carrier is returned) do_routing 
> does this good for me but I want to handle cost based authorization 
> "off-server" so I will end up returning to opensips with a variable 
> containing a list of valid carriers for that call.
>
> if (route_to_carrier(#carrier1))
> {
>     t_on_failure("next_gw");
>     t_relay();
> }
>
> if (route_to_carrier(#carrier2))
> {
>     t_on_failure("next_gw");
>     t_relay();
>         exit;
>
> }
>




More information about the Users mailing list