[OpenSIPS-Users] $var variable scope

Chris Warr chris.warr at dubber.net
Fri Feb 23 08:21:14 UTC 2024


Hi, I see in the documentation for $var below.  Regarding point 3.  Does a
single opensips process handle a single message at a time?  Or are they
multi-threaded processing many messages at one time?  My concern being if
I'm using $var for message processing, will my messages corrupt each
other's variables?

Naming: **$var(name)**
Hints:
1. if you want to start using a script variable in a route, better
initialize it with same value (or reset it), otherwise you may inherit a
value from a previous route that was executed by the same process.
2. script variables are faster than AVPs, as they directly reference a
memory location.
3. the value of script variables persists over a OpenSIPS process.

Thanks,
Chris.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240223/8b575279/attachment.html>


More information about the Users mailing list