<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thank you Brett<br>
<br>
I will try this aswell <br>
<br>
BR<br>
Simon<br>
</p>
<div class="moz-cite-prefix">Brett Nemeroff je 13.07.2023 ob
16:09 napisal:<br>
</div>
<blockquote type="cite"
cite="mid:CAPwC5wzWVOOXtvw9NHAdz33GiiRPHkK6juTQnAdok_sfkMeB2Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Simon,
<div>What you are describing is the default behavior. For "fast
failover" you'll need to adjust the fr_timeout parameter. If
you read the tm module documentation (which I included for you
below) , I believe you'll see that it describes how to do
exactly what are you doing. I don't think you actually want to
use DLG_timeout for your purposes; however, it might work fine
given that you reset it after the call is answered. </div>
<div><br>
</div>
<div>See the full docs for the tm module for your version here: </div>
<div><a
href="https://opensips.org/html/docs/modules/2.1.x/tm.html#fr_timeout"
moz-do-not-send="true" class="moz-txt-link-freetext">https://opensips.org/html/docs/modules/2.1.x/tm.html#fr_timeout</a><br>
</div>
<div><br>
</div>
<div>And for your convenience, I've cut and pasted the relevant
sections from the link above: </div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium"><br>
</span></div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium">-----%<-----</span></div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium">1.1.2. Timeout-Based
Failover</span><br>
</div>
<div>
<p
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;color:rgb(0,0,0)">Timeouts
can be used to trigger failover behavior. E.g. if we send a
call to a gateway and the gateway does not send a
provisional response within 3 seconds, we want to cancel
this call and send the call to another gateway. Another
example is to ring a SIP client only for 30 seconds and then
redirect the call to the voicemail.</p>
<p
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;color:rgb(0,0,0)">The
transaction module exports two types of timeouts:</p>
<div class="gmail-itemizedlist"
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium">
<ul class="gmail-itemizedlist" type="disc">
<li class="gmail-listitem">
<p style="font-size:12px;text-align:justify"><span
class="gmail-bold"><strong>fr_timeout</strong></span> -
used when no response was received yet. If there is no
response after <span class="emphasis"><em>fr_timeout</em></span> seconds,
the timer triggers (and failure route will be executed
if t_on_failure() was called). For INVITE
transactions, if a provisional response was received,
the timeout is reset to <span class="emphasis"><em>fr_inv_timeout</em></span> seconds
and RT_T2 for all other transactions. Once a final
response is received, the transaction has finished.</p>
</li>
<li class="gmail-listitem">
<p style="font-size:12px;text-align:justify"><span
class="gmail-bold"><strong>fr_inv_timeout</strong></span> -
this timeout starts counting down once a provisional
response was received for an INVITE transaction.</p>
</li>
</ul>
</div>
<p
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;color:rgb(0,0,0)">For
example: You want to have failover if there is no
provisional response after 3 seconds, but you want to ring
for 60 seconds. Thus, set the <span class="emphasis"><em>fr_timeout</em></span> to
3 and <span class="emphasis"><em>fr_inv_timeout</em></span> to
60.</p>
<p
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;color:rgb(0,0,0)"><span
style="font-size:medium;text-align:start">-----%<-----</span><br>
</p>
<p
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;color:rgb(0,0,0)"><span
style="font-size:medium;text-align:start"><br>
</span></p>
Please let us know if you need anything else<br>
-Brett
<p
style="font-family:Helvetica,Arial;font-size:12px;text-align:justify;color:rgb(0,0,0)"><span
style="font-size:medium;text-align:start"><br>
</span></p>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 13, 2023 at
8:39 AM Simon Gajski via Users <<a
href="mailto:users@lists.opensips.org"
moz-do-not-send="true" class="moz-txt-link-freetext">users@lists.opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Thank you<br>
it works as expected<br>
<br>
BR<br>
Simon<br>
</p>
<div>M S je 13.07.2023 ob 11:27 napisal:<br>
</div>
<blockquote type="cite">
<div dir="ltr">You can set DLG_timeout to 2sec for
failure route to work, then also look for ACK in main
route to set DLG_timeout to 3600 (for example) if the
call was answered.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 13, 2023
at 10:28 AM Simon Gajski via Users <<a
href="mailto:users@lists.opensips.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">users@lists.opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
I am running opensips 2.1.1 and have a question
regarding accessing <br>
failure_route.<br>
<br>
<br>
In case I send INVITE to some destination where I
receive 3xx, 4xx or <br>
5xx reply, call goes to failure_route and uses next gw
from there. <br>
Everything fine so far.<br>
But in some cases it hapens that opensips sends INVITE
to a destination <br>
from where there is no reply.<br>
In this case opensips repeatedly sends INVITEs to that
destination and <br>
doesn't do failover to failure_route.<br>
<br>
I played so far with $DLG_timeout variable, set to 2
sec.<br>
In this case opensips does failover to failure_route
after 2 sec, <br>
however established call via next gw is also
terminated after 2 sec.<br>
<br>
<br>
Is there another way to reach failure_route if remote
end doesn't replay <br>
in expected time?<br>
<br>
BR<br>
Simon<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
</blockquote>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
</blockquote>
</body>
</html>