[Kamailio-Users] Comparing AVPs to user variables

Alex Balashov abalashov at evaristesys.com
Tue Sep 22 18:43:19 CEST 2009


Is there a known bug in Kamailio 1.4.1 that causes comparisons like 
this to be inaccurate?

    get_profile_size("people", "$avp(s:person_id)", "$var(u_call_count)");

    ...

    if($var(u_call_count) >= $avp(s:call_limit))

In this case, $var(u_call_count) was 3 and $avp(s:call_limit) was 26 - 
I printed both values beforehand.  Yet, the comparison was evaluated 
as true.

I worked around the problem by storing the profile size in an AVP as 
well and comparing them instead, and it seems to have solved the problem:

    if($avp(s:u_call_count) >= $avp(s:call_limit))

However, I was wondering if this is a known problem in 1.4.1 and 
possibly 1.4.x.

Thanks!

-- 
Alex Balashov - Principal
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671




More information about the sr-users mailing list