[Spce-user] Fraud Notify

Mario Contreras mario.contreras at innovasur.es
Mon Jul 16 05:32:50 EDT 2012


Hi again.

I have tested, and I can asume it works like I supposed. The fraud only 
compares de free cash you have assigned to the account, if I haven't 
make any mistake in my configuration.

Anyway, I have realized it doesn't send any email if you set "Fraud 
Lock" to none. I have modified the query I talked about in my last mail. 
The condition I changed is this:

p.fraud_interval_lock
                 OR p.fraud_interval_notify
And I have changed for it:
p.fraud_interval_lock
                 OR p.fraud_interval_notify<>''

It seems to work better now. Any improvements?

El 10/07/2012 13:32, Mario Contreras escribió:
> Thanks for the quick answer, Jon.
>
> I haveseen this query in the script:
>
> SELECT c.id, p.fraud_interval_lock, p.fraud_interval_notify,
>                b.cash_balance_interval, p.fraud_interval_limit
>           FROM contracts c, billing_profiles p, contract_balances b
>          WHERE p.id = (SELECT m.billing_profile_id
>                          FROM billing_mappings m
>                         WHERE (   m.start_date IS NULL
>                                OR m.start_date <= now())
>                           AND (   m.end_date IS NULL
>                                OR m.end_date >= now())
>                           AND m.contract_id = c.id
>                      ORDER BY m.start_date desc limit 1)
>            AND b.contract_id = c.id
>            AND b.start <= now()
>            AND b.end >= now()
>            AND c.status = 'active'
>            AND p.fraud_interval_limit > 0
>            AND (   p.fraud_interval_lock
>                 OR p.fraud_interval_notify)
>            AND b.cash_balance_interval >= p.fraud_interval_limit
>
> If I understand correctly, the value cash_balance interval depends on 
> the free cash you give to your customers every billing interval. So, 
> it doesn't work if you configure to zero the interval free cash? Maybe 
> my configuration is wrong, beacuse for all my contracts the 
> cash_balance_interal is equal to zero. However, in one of my billing 
> profiles I have selected free time, and both free_time_balance and 
> free_time_balance_interval have the correct values.
>
> Am I doing anything wrong? Thanks again!
>
>
> El 10/07/2012 12:58, Jon Bonilla escribió:
>> El Tue, 10 Jul 2012 12:36:26 +0200
>> Mario Contreras<mario.contreras at innovasur.es>  escribió:
>>
>>> Hi all,
>>>
>>> When it's called the script that check the frauds configured in the
>>> billing profiles? I have a subscriber that has exceded in 150 € the
>>> limit, but rateomat has been stopped a few hours. Anyway, I have already
>>> activated rateomat but I haven't received any notification and the
>>> subscriber can make calls (I think so, I don't know where look for if
>>> it's or not blocked).
>>>
>>> So, in summary, where can i consult if a subscriber is blocked? And, how
>>> rateomat acts to notify the fraud?
>>>
>>
>> rate-o-mat does not take care in the fraud checking. It just rates. It's a cron
>> job. You can find it in /etc/cron.d/
>>
>> The script itself is /usr/sbin/ngcp-fraud-auto-lock You can call it manually or
>> check the code.
>>
>> The status of the subscriber can be checked via soap/xmlrpc and in the
>> www-admin interface.
>>
>>
>>
>> _______________________________________________
>> Spce-user mailing list
>> Spce-user at lists.sipwise.com
>> http://lists.sipwise.com/listinfo/spce-user
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20120716/7dd7fd35/attachment-0001.html>


More information about the Spce-user mailing list