[OpenSIPS-Users] How to reach failure_route if remote end doesn't reply on INVITEs
Simon Gajski
simon at softnet.si
Fri Jul 14 10:19:17 UTC 2023
Thank you Brett
I will try this aswell
BR
Simon
Brett Nemeroff je 13.07.2023 ob 16:09 napisal:
> Simon,
> 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.
>
> See the full docs for the tm module for your version here:
> https://opensips.org/html/docs/modules/2.1.x/tm.html#fr_timeout
>
> And for your convenience, I've cut and pasted the relevant sections
> from the link above:
>
> -----%<-----
> 1.1.2. Timeout-Based Failover
>
> 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.
>
> The transaction module exports two types of timeouts:
>
> *
>
> *fr_timeout* - used when no response was received yet. If there is
> no response after /fr_timeout/ 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 /fr_inv_timeout/ seconds and RT_T2 for all
> other transactions. Once a final response is received, the
> transaction has finished.
>
> *
>
> *fr_inv_timeout* - this timeout starts counting down once a
> provisional response was received for an INVITE transaction.
>
> 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 /fr_timeout/ to 3 and /fr_inv_timeout/ to 60.
>
> -----%<-----
>
>
> Please let us know if you need anything else
> -Brett
>
>
>
> On Thu, Jul 13, 2023 at 8:39 AM Simon Gajski via Users
> <users at lists.opensips.org> wrote:
>
> Thank you
> it works as expected
>
> BR
> Simon
>
> M S je 13.07.2023 ob 11:27 napisal:
>> 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.
>>
>> On Thu, Jul 13, 2023 at 10:28 AM Simon Gajski via Users
>> <users at lists.opensips.org> wrote:
>>
>> Hi
>>
>> I am running opensips 2.1.1 and have a question regarding
>> accessing
>> failure_route.
>>
>>
>> In case I send INVITE to some destination where I receive
>> 3xx, 4xx or
>> 5xx reply, call goes to failure_route and uses next gw from
>> there.
>> Everything fine so far.
>> But in some cases it hapens that opensips sends INVITE to a
>> destination
>> from where there is no reply.
>> In this case opensips repeatedly sends INVITEs to that
>> destination and
>> doesn't do failover to failure_route.
>>
>> I played so far with $DLG_timeout variable, set to 2 sec.
>> In this case opensips does failover to failure_route after 2
>> sec,
>> however established call via next gw is also terminated after
>> 2 sec.
>>
>>
>> Is there another way to reach failure_route if remote end
>> doesn't replay
>> in expected time?
>>
>> BR
>> Simon
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> _______________________________________________
> 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/20230714/d1ea7bbb/attachment.html>
More information about the Users
mailing list