[OpenSIPS-Users] Setting do_routing

Bogdan-Andrei Iancu bogdan at opensips.org
Sun Feb 23 10:44:28 CET 2014


Hello Nick,

route_to_gw() accepts as parameter either a static string, either a 
variable (any kind of a variable, including AVPs).
What is the exact problem / error you encountered when using an AVP as 
param ?

Regards,

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

On 23.02.2014 00:14, Nick Cameo wrote:
> Hello Bogdan,
>
> I had a chance to include the patch in our environment. I forgot to
> mention that we
> have an avp with the gwlist loaded, and route_to_gw does not accept
> avps? Is this
> possible to have.
>
> Just for testing, I continued by hard coding an arbitrary gwlist.
> Snips of the config:
>
> ....
> route[1] {
>          if (is_method("INVITE")) {
>                  $var(doOrder) = perl_exec("doOrder");
>                      if($var(doOrder)==1) route_to_gw("7,1,4");
> .....
> }
>
>
> failure_route[1] {
>                  if (use_next_gw()) {
>                        xlog("L_INFO","Next Gateway: From=$fu, To=$tu,
> RU=$ru, CI=$ci IP=$si\n");
>                        t_on_failure("1");
>                        route(1);
>                        exit;
>                  }
>                  else {
>                          t_reply("503", "Service not available, no more gws");
>                          exit;
>                  }
>
>
>
> What I found with the above config is that OpenSIPS did not iterate through the
> gwlist on failures. It simply re invited the same gateway and failed
> again. Bellow
> are some errors that I observed when testing.
>
>
> Feb 22 16:53:47 [15587] ERROR:tm:add_uac: maximum number of branches exceeded
> Feb 22 16:53:47 [15587] ERROR:tm:t_forward_nonack: failure to add branches
> Feb 22 16:53:47 [15587] ERROR:tm:w_t_relay: t_forward_nonack failed
> Feb 22 16:53:47 [15587] ERROR:dialog:push_reply_in_dialog: missing TAG
> param in TO hdr :-/
>
>
> I'm probably missing something? Also, regarding accepting avp as a parameter of
> route_to_gw, it's needed quite urgently.
>
> I really appreciate all your help.
>
> Kind Regards,
>
> Nick.




More information about the Users mailing list