<p></p>
<p>You have to set <code>h_id_start</code> and <code>h_id_step</code> for all servers in the replication group so the generated ids do not overlap:</p>
<ul>
<li><a href="https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.p.h_id_start" rel="nofollow">https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.p.h_id_start</a></li>
</ul>
<p>Likely the issue was caused by matching a dialog with same <code>h_id</code>, which was generated by a different server and not in the state that was the corresponding dialog for the processed sip message.</p>
<p>Eventually you can also set <code>dlg_match_mode=2</code>.</p>
<p>I will also add checks for the socket str, in case of replication might be safer.</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/2757#issuecomment-853836689">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZO7VCIZN6A6VFCTYA3TQ5ZY7ANCNFSM457HRS4A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJNBZYDNXMNOFC6EKLTQ5ZY7A5CNFSM457HRS4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGLSIHEI.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/2757#issuecomment-853836689",
"url": "https://github.com/kamailio/kamailio/issues/2757#issuecomment-853836689",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>