[SR-Users] Unexpected evaluation to false on a phonenumber in $avp

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 14 10:28:39 CET 2015


On 06/01/15 10:21, Daniel Tryba wrote:
> On Monday 05 January 2015 18:57:00 Victor Seva wrote:
>> Check
>> http://www.kamailio.org/docs/modules/4.1.x/modules/siputils.html#siputils.f
>> .is_e164
> Thanks for the pointer but the value doesn't necesarrily contain e164 numbers, 
> for example the value might contain the Dutch harmonized carrier voicemail 
> number (1233).
>
> My question/observation is why are "+31xxxxxxxxx" or "+49xxxxxxxxx" considered 
> true and "+41xxxxxxxxx" evaluated false?
>
If it gets over 2^31, it becomes negative and when not an explicit
logical expression, there are the rules with negative response code is
false and positive is true.

You can use 'defined' or pv_is_set() to test if an avp has a value.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list