[OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Mon Apr 18 23:07:07 CEST 2016

Hi Liviu.

When I use "modparam("usrloc", "db_mode", 1)" the following query works fine and gives me the right result:

avp_db_query("select attr from location where contact like '$(ct.fields(uri){s.select,0,;})%' and username = '$fU'", "$avp(caller)");

When I use "modparam("usrloc", "db_mode", 0)" the above query doesn't give me the right value.

It is true because the query seems to acts only over the database, not over data from cached memory. And in this case the data from database obviously is not equal to that from cached memory. As you told me: ""db_mode" of the usrloc module has nothing to do with "avp_db_query""

So, in this case, how to execute queries over data from cached memory?

Any hint will be very helpful!

Best regards.

Inatel Competence Center
Ph: +55 35 3471 9200 RAMAL 979

De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Liviu Chircu <liviu at opensips.org>
Enviado: segunda-feira, 18 de abril de 2016 10:50
Para: users at lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?

Yes you can, "db_mode" of the usrloc module has nothing to do with "avp_db_query" from the avpops module! :)

Liviu Chircu
OpenSIPS Developer


Home - OpenSIPS Solutions<http://www.opensips-solutions.com/>
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.

On 18.04.2016 15:10, Rodrigo Pimenta Carvalho wrote:

Hi Liviu.

Thank you very much!

So, I'm comfortable with OpenSIPS.

In my OpenSIPS config file I have:

loadmodule "usrloc.so"
modparam("usrloc", "db_mode",   2)

Can I change db_mode to zero and still have every avp_db_query working well?

That is,  with db_mode=0 I will avoid using Sqlite and every SQL operation over user location will apply just over data in memory cache. Am I correct?

Any hint will be very helpful!

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

More information about the Users mailing list