<p>Consider the simple basic dialog scenario:</p>

<pre><code>                        Messages
INVITE ---------->      1
407 <----------         1
ACK ---------->         1
INVITE ---------->      1
100 <----------         1
180 <----------         1
183 <----------         0
200 <----------         1     
ACK ---------->         1
Pause [   7000ms]       1
BYE ---------->         1             
200 <----------         1
</code></pre>

<p>In the current implementation, running <em>kamctl fifo get_statistics tmx:</em> on a fresh kamailio prints:</p>

<pre><code>...
tmx:local_replies = 1
tmx:received_replies = 2
tmx:relayed_replies = 1
</code></pre>

<p>After this patch:</p>

<pre><code>...
tmx:local_replies = 1
tmx:received_replies = 2
tmx:relayed_replies = 3 (2 x 200 + 1 x 180)
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/420#issuecomment-160104670">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZeR0-D1uoOc3uiYSMlVicEaKHPZmks5pKCPngaJpZM4GqZRZ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/420#issuecomment-160104670"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>