[OpenSIPS-Users] global variables

Vlad Paiu vladpaiu at opensips.org
Tue Mar 20 18:21:02 CET 2012


Hello,

If you want to accomplish this, you can use the localcache module. In 
startup_route, initialize all of your needed 'constants' and store them 
with no expiry time ( cache_store ), and when you want to use them later 
on, just make a call to cache_fetch.

Regards

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com


On 03/20/2012 05:38 PM, Jan D. wrote:
> Another day, another question:
>
> I like to declare some variables at the beginning of my script and use this
> at several places, the variables must be known till restart.
>
> something like ie:
>
> $my_eth0_interface = "89.1.2.3";
> $my_eth1_interface = "10.0.1.2";
> $my_default_timeout = 100;
> etc etc.
>
> I was looking at cache_store() but don't know what to use best in this case.
>
> Any advise how to accomplish this?
>
> Gr.
>
> Jan
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/global-variables-tp7389514p7389514.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list