[SR-Users] shtinc throws readonly error

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 8 14:51:24 CEST 2016


Hello,

this is a special variable -- that's why they were called
pseudo-variables in the first place.

It does an atomic increment when evaluated in a expression. The
interpreter doesn't trigger evaluation if the variable is not in the
right side of an assignment (or parameter for functions).

If you use xlog, be aware that the variable is evaluated only if the log
message is printed (e.g, if you use xdbg and debug=1, then the xdbg is
not evaluated).

Cheers,
Daniel


On 08/07/16 14:43, Sebastian Damm wrote:
> Hi,
>
> is there a reason to not allow it as a simple operation on a separate
> line without a left and right side? After all, it's just an
> incrementation of a value, so why do I have to assign it to a variable
> (which I don't need at this point) or use it somewhere else? I now
> included it into an xlog line as shown in the docs, but the
> readability for sure would be a lot better if it was a separate
> command.
>
> Best Regards,
> Sebastian
>
> _______________________________________________
> 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

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list