[OpenSER-Users] Check for empy string with avp_check()

Victor Gamov vit at lipetsk.ru
Mon Aug 20 18:06:08 CEST 2007


Jens Carl wrote:
> Hello List,
> 
> is it possible to check with avp_check() if a string is empty or not?
> 
> I have tried to used something like that:
> 
> 	avp_check( "$avp(s:test)", "eq//g" );
> 
> but this allways generates error when I start openser. $avp(s:test) is
> filled via a DB select with avp_db_select() and can be a empty string or
> not.

Try

if ( $avp(s:test) == "" ) {
   #empty string
}

-- 
CU,
Victor Gamov




More information about the Users mailing list