[OpenSIPS-Users] Fraud_module

John Quick john.quick at smartvox.co.uk
Wed Mar 16 11:10:59 CET 2016


Hi Denis

I am also testing the Fraud Detection module in v2.1.2. I posted some
questions last week, but not had any responses yet.
I have not had any problems with crashing after reload.
My tests have produced code -2 when the critical threshold is reached. My
code snippet is like this:
    if (!check_fraud("$avp(userid)", "$rU", "1")) {
        switch ($retcode) {
          case -1:
            xlog("L_WARN", "    Route[4]: FRAUD WARNING for call to $rU by
User ID $avp(userid)  Call-ID=$ci\n");
            break;
          case -2:
            xlog("L_WARN", "    Route[4]: FRAUD ALERT Blocking call to $rU
by User ID $avp(userid)  Call-ID=$ci\n");
            sl_send_reply("403","Fraud Detect Blocked");
            exit;
        }
    }

I have found that some tests work (like call per minute) whereas others do
not (like sequential calls).
Hope this helps.

John Quick
Smartvox Limited


Date: Wed, 16 Mar 2016 10:35:20 +0300
From: Denis <denis7979 at mail.ru>
Subject: [OpenSIPS-Users] Fraud_module
To: users at lists.opensips.org
Message-ID: <1241249825.20160316103520 at ptl.ru>
Content-Type: text/plain; charset="windows-1251"

Hello!

I am testing Fraud_detection on Opensips 2.1

1) I noticed an Opensips crash after fifo fraud_relaod. GDB from core in
attachment. 
2) In the log file i can see such messages "CRITICAL:core:sig_alarm_abort:
BUG - shutdown timeout triggered, dying..."
3) Fraud detection doesn`t work because it shows "code 1" of check_fraud
function during every call, although the function exports event
"E_FRD_CRITICAL".

| ruleid | profileid | prefix | start_hour | end_hour | daysoftheweek | 
| cpm_warning | cpm_critical | call_duration_warning | 
| call_duration_critical | total_calls_warning | total_calls_critical | 
| concurrent_calls_warning | concurrent_calls_critical | 
| sequential_calls_warning | sequential_calls_critical |
+--------+-----------+--------+------------+----------+---------------+-----
--------+--------------+-----------------------+------------------------+---
------------------+----------------------+--------------------------+-------
--------------------+--------------------------+---------------------------+
|      1 |         1 | 8812   | 00:00      | 23:59    | Mon-Fri       |
2 |           30 |                     1 |                      2 |
3 |                    5 |                        1 |
2 |                        3 |                         4 |

I made more than 5 calls but there is no "code -2" detected.

Thank you for any help.

mailto:denis7979 at mail.ru




More information about the Users mailing list