<p></p>
<h3>Description</h3>
<p>Apparently the remapping of 503 to 500 codes in the tm module does also change the to-tag. This behaviour breaks dialogs with yate and therefore calls hang and the 503 remains unacknowledged.</p>
<p>Removing to-tags seems to contradict RFC3261</p>
<p>"12 Dialogs<br>
A dialog is identified at each UA with a dialog ID, which consists of a Call-ID value, a local tag <strong>and a remote tag</strong>…"</p>
<p>Due to the bug the UA cannot identify the dialog the 500 belongs to. Therefore the dialog remains open and Kamailio keeps repeating 500 messages.</p>
<h3>Troubleshooting</h3>
<p>After disabling the 503 to 500 remapping with modparam("tm", "remap_503_500", 0) dialogs get properly terminated .</p>
<h4>Reproduction</h4>
<p>503 to 500 remapping is enabled by default. Inspect the to tags of the incoming 503 and outgoing 500 messages.</p>
<h4>Debugging Data</h4>
<p>Henning added this comment:</p>
<p>Apparently, this is the way the code works:</p>
<p>t_reply.c:<br>
if (relayed_code==503 && tm_remap_503_500){<br>
/* replace a final 503 with a 500:<br>
* generate a "FAKE" reply and a new to_tag (for easier<br>
*  debugging)*/</p>
<h3>Possible Solutions</h3>
<p>Dont change the to-tag</p>
<h3>Additional Information</h3>
<p>kamailio -v<br>
version: kamailio 5.2.3 (x86_64/linux) c36229<br>
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<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
id: c36229<br>
compiled on 10:34:54 Jun 13 2019 with gcc 4.8.5</p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<p>CentOS Linux release 7.6.1810 (Core)<br>
3.10.0-957.12.2.el7.x86_64</p>

<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/2405">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOPYG7W4HFXFNAGCUDR46YXHANCNFSM4PFKP4KQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNWTCCSVXJRUJPR4ADR46YXHA5CNFSM4PFKP4K2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4J4WV7UA.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/2405",
"url": "https://github.com/kamailio/kamailio/issues/2405",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>