Use $var when you want to manipulate values inside a route block, for example, when you want to store a value that will live only in the scope of that route block. When the route block exits, it will be automatically deallocated.
Use $avp when you want to store a value that you want to read anywhere. It will live as long as the SIP transaction lives. - $var is stored in private memory, it is per process. This means that only the process that created it can read it. - $avp is stored in shared memory. It can be accessed from any process in kamailio's process list (childs) - $var has local route block scope. - $avp has SIP transaction scope. - Both $avp and $var are automatically freed. On Fri, Apr 19, 2013 at 10:50 AM, Victor V. Kustov <coy...@bks.tv> wrote: > В Fri, 19 Apr 2013 10:56:26 +0200 > "Olle E. Johansson" <o...@edvina.net> пишет: > > > - $avp is stored in transactions (in shared memory), so if you set > > them while processing a request you have them when processing > > responses and failures. > > is memory freeing automatically or i need to do it myself? > > -- > SY, > Victor > JID: coy...@bks.tv > JID: coy...@bryansktel.ru > I use FREE operation system: 3.8.4-calculate GNU/Linux > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > -- Carlos http://caruizdiaz.com +595981146623
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users