<p>Looks like this is caused by a bad check against req_routeid. Following patch fixes the issue.</p>

<p>diff --git a/modules/b2b_entities/dlg.c b/modules/b2b_entities/dlg.c<br>
index 67ae93d..5d916e2 100644<br>
--- a/modules/b2b_entities/dlg.c<br>
+++ b/modules/b2b_entities/dlg.c<br>
@@ -795,7 +795,7 @@ search_dialog:<br>
 logic_notify:<br>
    etype = (table==server_htable?B2B_SERVER:B2B_CLIENT);</p>

<ul>
<li>  if(req_routeid)</li>
<li>  if(req_routeid &gt; 0)
{
    lock_release(&amp;table[hash_index].lock);
    run_top_route(rlist[req_routeid].a, msg);</li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href='https://github.com/OpenSIPS/opensips/issues/162#issuecomment-34006420'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/5479561__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNjk5ODE5OSwiZGF0YSI6eyJpZCI6MjQ0NTIxMzZ9fQ==--2bbf5bfdcc6620426e703b4c125ee70f0a4bb210.gif' height='1' width='1'></p>