[SR-Users] Improving Kamailo configuration parser ...

Krishna Kurapati kkurapat at gmail.com
Wed Mar 7 03:05:32 CET 2012


I used

if ($var(x) != null) { ... }

in one of the routes, and tried to run Kamailio server.
The server exited with an error. I did not know why.

Once I changed it to if ($var(x) != $null) {} the error went away.
I missed $ infront null. I think it is hard to trace such problems once a
large chunk
of logic is written since many of us come from C++ and scripting background
where $null
is not a common practice.

Also if I tried to use if (!$var(x)) { ... } Kamailio tries to convert the
value of $var(x) to integer.
prints WARNINGS in the log when the $var(x) consists of a string.

Krish Kura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120306/d591f3b0/attachment.htm>


More information about the sr-users mailing list