[OpenSIPS-Users] Migrating form 1.11.5 to 1.11.9

Alain Bieuzent alain.bieuzent at free.fr
Wed Nov 9 16:46:55 CET 2016


Hi Răzvan, 

 

I will test that, many thanks

 

Regards

 

De : <users-bounces at lists.opensips.org> au nom de Răzvan Crainea <razvan at opensips.org>
Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
Date : mercredi 9 novembre 2016 à 16:39
À : <users at lists.opensips.org>
Objet : Re: [OpenSIPS-Users] Migrating form 1.11.5 to 1.11.9

 

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

_______________________________________________ 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/a4da15db/attachment-0001.htm>


More information about the Users mailing list