[OpenSIPS-Users] string comparison

Ivailo Dobrev ivailod at telera.eu
Thu Apr 23 14:05:53 EST 2020


Hi Volga,

xlog  md5 of both vars before if statement. I'm pretty sure they will be 
different. Maybe not printable character ?

On 4/23/20 4:43 PM, volga629 via Users wrote:
> Hello John,
>
> I tested var to var
>
> and test still failing
>
> Tried
>
>  if($var(tls-frompbx)=="$var(usr_check_tls)")
>
> or this
>
>  if($var(tls-frompbx)==$var(usr_check_tls))
>
> volga629
>
>
> On 4/23/20 9:41 AM, John Quick wrote:
>> Hi Volga
>>
>> Please could you always format your emails to the users group as 
>> plain text,
>> not HTML.
>> I had to copy and paste then save and re-open just to read your 
>> question.
>>
>> I would think the most likely explanation for the string comparison 
>> failing
>> is that you are comparing an $avp with a $var
>> They are different - in particular, an AVP can hold several values, 
>> somewhat
>> like an array type in other languages.
>> Can you try the same test but with a var for both sides of the 
>> comparison.
>>
>> John Quick
>> Smartvox Limited
>>
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list