[OpenSIPS-Devel] [opensips] fix calls per minute for fraud_detection module (#665)

Ionut Ionita notifications at github.com
Tue Oct 6 17:21:04 CEST 2015


Now the calls per minute parameter is build as consisting of an initial
time(t0) and a 60 seconds window(as was before). Each window slot holds the
calls received in that second(as before). The difference is that now
these parameters are updated based on three conditions:
* we receive the call between [t0; t0 + WINDOW_SIZE(60s)] - we only update
the number of calls for that slot(t0 + current time) and the calls per minute
parameter
* we receive the call in the interval of [t0+WINDOW_SIZE; t0+2*WINDOW_SIZE] -
we do the following: move t0 in current call time - WINDOW_SIZE, invalidate
all the calls we knew of from t0 to current t0 (current call time - WINDOW_SIZE)
* we receive a call after 2 * WINDOW_SIZE(60 seconds) + t0 - this invalidates
all the calls we knew of since the window is not does not contains calls newer
than the last 60 seconds;
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSIPS/opensips/pull/665

-- Commit Summary --

  * fix calls per minute for fraud_detection module

-- File Changes --

    M modules/fraud_detection/fraud_detection.c (29)

-- Patch Links --

https://github.com/OpenSIPS/opensips/pull/665.patch
https://github.com/OpenSIPS/opensips/pull/665.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/665
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20151006/eb6b184f/attachment.htm>


More information about the Devel mailing list