<h3>Description</h3>
<p>Using t_set_fr within the LOCATION section of a slightly modified default kamailio.cfg only works if the contact is using UDP and not TCP.</p>
<pre><code># ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 30000)

# User location service
route[LOCATION] {
        [...]
        # per subscriber ring time
        if ($avp(s:ring_time) != $null) {
                # xlog("setting time out to $avp(s:ring_time)");
                t_set_fr($avp(s:ring_time) * 1000);
        }
}
</code></pre>

<h4>Reproduction</h4>
<p>register an contact with UDP, set the timer to 5 seconds. observe kamailio terminates the invite after 5 seconds.<br>
then with TCP observe kamailio terminates the invite after 30 seconds (the default)</p>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.2.1 (x86_64/linux) 947769
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 947769
compiled on 20:48:14 Feb 26 2019 with gcc 4.8.5
</code></pre>
<ul>
<li><strong>Operating System</strong>:<br>
CentOS 7</li>
</ul>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1966?email_source=notifications&email_token=ABO7UZMQLRW3BAD7HWRMLYDPXSEMJA5CNFSM4HP7CJVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWDT5UA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOHUFL4JJJMIS547HLPXSEMJANCNFSM4HP7CJVA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZNZJAHCICYKAQSXXSTPXSEMJA5CNFSM4HP7CJVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWDT5UA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1966?email_source=notifications\u0026email_token=ABO7UZMQLRW3BAD7HWRMLYDPXSEMJA5CNFSM4HP7CJVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWDT5UA",
"url": "https://github.com/kamailio/kamailio/issues/1966?email_source=notifications\u0026email_token=ABO7UZMQLRW3BAD7HWRMLYDPXSEMJA5CNFSM4HP7CJVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWDT5UA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>