[SR-Users] var vs avp...
Carlos Ruiz Díaz
carlos.ruizdiaz at gmail.com
Fri Apr 19 17:00:25 CEST 2013
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 <coyote at bks.tv> wrote:
> В Fri, 19 Apr 2013 10:56:26 +0200
> "Olle E. Johansson" <oej at 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: coyote at bks.tv
> JID: coyote at 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 at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
--
Carlos
http://caruizdiaz.com
+595981146623
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130419/84dbd6a8/attachment-0001.htm>
More information about the sr-users
mailing list