<p>Consider the simple timeout scenario:</p>

<pre><code>                     Messages
INVITE ---------->      1             
407 <----------         1   
ACK ---------->         1              
INVITE ---------->      1           
100 <----------         1      
180 <----------         0    
183 <----------         0       
408 <----------         1
ACK ---------->         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 = 2
tmx:received_replies = 1
tmx:relayed_replies = 18446744073709551615
</code></pre>

<p>After this patch:</p>

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

<p>Fix the above by counting the relayed_total and substracting the relayed_local.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/420'>https://github.com/kamailio/kamailio/pull/420</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>tmx: Fix relayed_replies counter</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/420/files#diff-0">modules/tm/t_reply.c</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/420/files#diff-1">modules/tm/t_stats.c</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/420/files#diff-2">modules/tm/t_stats.h</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/420/files#diff-3">modules/tmx/tmx_mod.c</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/420.patch'>https://github.com/kamailio/kamailio/pull/420.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/420.diff'>https://github.com/kamailio/kamailio/pull/420.diff</a></li>
</ul>

<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">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZSvPvzVbTeb9mk1tiv_auqVhGmdNks5pKCPJgaJpZM4GqZRZ.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"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>