[OpenSIPS-Users] Migrating form 1.11.5 to 1.11.9

Răzvan Crainea razvan at opensips.org
Wed Nov 9 16:39:20 CET 2016


Hi, Alain!

Somewhere between 1.11.5 and 1.11.9 we figured out a problem related to 
mysql queries: if your database entry is NULL, we can't just simply set 
a NULL value to an AVP, because that just deletes the previous value. So 
you end up in a very inconsistent state. That's why we decided to set 
the value "<null>" to all the fields that are NULL in the database (this 
token is used in serveral other scenarios, that's why we picked this name).

Therefore, in order to properly test if a column is provisioned NULL in 
the database is:
if ($avp(redirect) != "<null>") {
}

Let us know how this goes.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 11/09/2016 05:06 PM, Alain Bieuzent wrote:
>
> Hi All,
>
> I’m trying to migrate form 1.11.5 to 1.11.9 and i have a problem to 
> test the value of a mysql query when the reseult is null.
>
> In 1.11.5 this test « if (!$avp(redirect) == NULL) » works, but 
> doesn’t work in 1.11.9.
>
> Is there a change in code ?
>
> What is the corect way to test a null value from avp ?
>
> Regards
>
> Alain.
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161109/88ee8786/attachment.htm>


More information about the Users mailing list