<p>In <a href="https://github.com/OpenSIPS/opensips/pull/728#discussion_r48743615">modules/ratelimit/ratelimit.c</a>:</p>
<pre style='color:#555'>&gt; +        /* Window ELement*/
&gt; +        #define WEL(__el__) pipe-&gt;rwin.__el__
&gt; +        #define U2MILI(__usec__) (__usec__/1000)
&gt; +        #define S2MILI(__sec__)  (__sec__ *1000)
&gt; +        int i;
&gt; +        int count;
&gt; +        int first_good_index;
&gt; +        int rl_win_ms = rl_window_size * 1000;
&gt; +
&gt; +
&gt; +        unsigned long long now_total, start_total;
&gt; +
&gt; +        struct timeval tv;
&gt; +
&gt; +        /* first get values from our beloved replicated friends */
&gt; +        count = rl_get_all_hist_counters(pipe);
</pre>
<p>You should use the <code>counter</code> field of the pipe.</p>

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