[OpenSIPS-Users] ERROR:drouting_route2_gw on route_to_gw() when gateway is disabled

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Dec 9 09:12:04 UTC 2024


Hi Jeff,

yeah, there is a bit of fairness into changing the ERR to INFO (or so), 
as this is not a 100% error and depends on the runtime context. Testing 
the GW status in advance may be a bit hackish, as the function will do 
that for you anyhow. Ideally the route function should (if not already) 
return a different err ret code for this case - the GW to use.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 20.11.2024 17:18, Pyle, Jeff wrote:
> Hello,
>
> A few years ago Bogdan did an update 
> <https://github.com/OpenSIPS/opensips/commit/d0d05907099add7666e31820b4b9ecd2d4c85e7e> to 
> route_to_gw() that ignores a gateway when it is disabled. The problem 
> I'm running into now is that if I try to route to a gateway that is 
> disabled, I get an error message:
>
> ERROR:drouting:route2_gw: no GW added at all
>
> I had asked around that time 
> <http://lists.opensips.org/pipermail/users/2020-April/042755.html> if 
> there was a way to detect the status of a gateway within the script, 
> and then it seemed if we could simply not route to one that was down, 
> the problem was solved. True, except for polluting the log with errors 
> of down gateways. That's what I'm trying to avoid now.
>
> Then it was on 2.4.7, and now on 3.4.9. Is there a way today that I 
> can avoid calling route_to_gw() on a gateway that's down, or at least 
> avoid the error message if it is?
>
>
>
> Regards,
> Jeff
>
>
>
> This message is subject to Fusion Connect, Inc.’s email communication 
> policy: www.fusionconnect.com/email-policy
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20241209/80e18541/attachment.html>


More information about the Users mailing list