<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Jeff,<br>
<br>
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.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 20.11.2024 17:18, Pyle, Jeff wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SJ1PR12MB609852F6473C5BFFB659D4D1A9212@SJ1PR12MB6098.namprd12.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Hello,</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
A few years ago Bogdan did an <a
href="https://github.com/OpenSIPS/opensips/commit/d0d05907099add7666e31820b4b9ecd2d4c85e7e"
id="LPlnk" class="OWAAutoLink"
title="https://github.com/OpenSIPS/opensips/commit/d0d05907099add7666e31820b4b9ecd2d4c85e7e"
moz-do-not-send="true">
update</a> 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:</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
ERROR:drouting:route2_gw: no GW added at all</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
I had <a
href="http://lists.opensips.org/pipermail/users/2020-April/042755.html"
id="LPlnk549755" class="OWAAutoLink"
title="http://lists.opensips.org/pipermail/users/2020-April/042755.html"
moz-do-not-send="true">
asked around that time</a> 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.</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
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?</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Regards,</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Jeff</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
This message is subject to Fusion Connect, Inc.’s email
communication policy: <a class="moz-txt-link-abbreviated" href="http://www.fusionconnect.com/email-policy">www.fusionconnect.com/email-policy</a>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>