Fraud Detection Module:check_fraud - problem with profile_id

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fraud Detection Module:check_fraud - problem with profile_id

Adrian Fretwell
Hello,
I have been using the Fraud detection module for two years now with no issues, but I only used one profile and call the check_fraud function as follows:

check_fraud("$var(t_fd_user)", "$rU", "1");

Now I have the need for two profiles and wanted to call check_fraud using a PV as the profile_id parameter like so:

$var(t_fd_p) = "1";
check_fraud("$var(t_fd_user)", "$rU", "$var(t_fd_p)");

But I always get a CORE PV error and the function fails. Is what I want to do possible? What am I doing wrong?


Kind regards,
Adrian Fretwell

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fraud Detection Module:check_fraud - problem with profile_id

Liviu Chircu

Hi Adrian,

Pretty annoying, indeed.  The idea is that the "profile ID" parameter must be integer or a pseudo-var holding an integer (only).  So you'd fix your code as follows:

$var(t_fd_p) = 1; # notice I removed the quotes!
check_fraud("$var(t_fd_user)", "$rU", "$var(t_fd_p)");

Best regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 01.11.2018 22:27, Adrian Fretwell wrote:
Hello,
I have been using the Fraud detection module for two years now with no issues, but I only used one profile and call the check_fraud function as follows:

check_fraud("$var(t_fd_user)", "$rU", "1");

Now I have the need for two profiles and wanted to call check_fraud using a PV as the profile_id parameter like so:

$var(t_fd_p) = "1";
check_fraud("$var(t_fd_user)", "$rU", "$var(t_fd_p)");

But I always get a CORE PV error and the function fails. Is what I want to do possible? What am I doing wrong?


Kind regards,
Adrian Fretwell

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fraud Detection Module:check_fraud - problem with profile_id

Adrian Fretwell
Hi Liviu,
Thankyou for the information.

I'm actually pulling the profile id from a char column in the Db so I just need to make sure I perform and integer conversion on it.

Many thanks,
Adrian.

On Fri, 2018-11-02 at 11:02 +0200, Liviu Chircu wrote:

Hi Adrian,

Pretty annoying, indeed.  The idea is that the "profile ID" parameter must be integer or a pseudo-var holding an integer (only).  So you'd fix your code as follows:

$var(t_fd_p) = 1; # notice I removed the quotes!
check_fraud("$var(t_fd_user)", "$rU", "$var(t_fd_p)");

Best regards,
On 01.11.2018 22:27, Adrian Fretwell wrote:
Hello,
I have been using the Fraud detection module for two years now with no issues, but I only used one profile and call the check_fraud function as follows:

check_fraud("$var(t_fd_user)", "$rU", "1");

Now I have the need for two profiles and wanted to call check_fraud using a PV as the profile_id parameter like so:

$var(t_fd_p) = "1";
check_fraud("$var(t_fd_user)", "$rU", "$var(t_fd_p)");

But I always get a CORE PV error and the function fails. Is what I want to do possible? What am I doing wrong?


Kind regards,
Adrian Fretwell

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users