<p></p>
<p>I haven't encountered such situation. Is it parallel forking case or serial forking?</p>
<p>What is not clear for me is your remark: <code>new branch is created with $ru = $ru</code> -- is it done in failure route or branch route? If in branch route, what is the reason for it? In branch route it is not supposed to create new branches, only update the current outgoing branch.</p>
<p>As for troubleshooting, I would try to add some logs in the code to gather more details, maybe trying to figure out what are the cases/functions in your config when $ru may be updated (pv module, core functions, ...) and see if it is done when not expected. Also, catching the sip traffic should help to see if many messages in the same transaction are handled at the same time.</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/2708#issuecomment-886845980">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJUH4R7SZEEPXHMTCTTZWDUJANCNFSM427ZCSLA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZLENBAFXMS5WT3QYODTZWDUJA5CNFSM427ZCSLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGTODEHA.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/2708#issuecomment-886845980",
"url": "https://github.com/kamailio/kamailio/issues/2708#issuecomment-886845980",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>