<p>Indeed, this needs a bit more explanation.</p>
<p>Check out this function flow:</p>
<pre><code>dlg_onreply() -> dlg_run_event_route() -> dlg_lookup() -> if (dlg0 == 0)

</code></pre>
<p>When dlg_run_event_route() fails (returns -1) then dlg_onreply() just returns.</p>
<p>Now, in the same dlg_onreply() at line 571, the statistics are updated in case of new_state==DLG_STATE_DELETED. However, because of the above, this code is not called if dlg_run_event_route() fails.</p>
<p>Most probably I should update this pull request to increment also the failed dialogs, as done in dlg_onreply() at line 585.</p>
<p>Let me know if this clarifies your questions.</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/pull/2243?email_source=notifications&email_token=ABO7UZM52NYCBFRQASLK33DRGYSIZA5CNFSM4LE25RXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOLCZ7A#issuecomment-597044476">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNCFOWR3YO27BSWCGLRGYSIZANCNFSM4LE25RXA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZOSAQDWZPVWZPQKN23RGYSIZA5CNFSM4LE25RXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOLCZ7A.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/pull/2243?email_source=notifications\u0026email_token=ABO7UZM52NYCBFRQASLK33DRGYSIZA5CNFSM4LE25RXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOLCZ7A#issuecomment-597044476",
"url": "https://github.com/kamailio/kamailio/pull/2243?email_source=notifications\u0026email_token=ABO7UZM52NYCBFRQASLK33DRGYSIZA5CNFSM4LE25RXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOLCZ7A#issuecomment-597044476",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>