I used <div> </div><div>if ($var(x) != null) { ... } </div><div><br></div><div>in one of the routes, and tried to run Kamailio server.</div><div><div>The server exited with an error. I did not know why. </div><div><br></div>
<div>Once I changed it to if ($var(x) != $null) {} the error went away. </div><div>I missed $ infront null. I think it is hard to trace such problems once a large chunk </div><div>of logic is written since many of us come from C++ and scripting background where $null </div>
<div>is not a common practice.</div><div><br></div><div>Also if I tried to use if (!$var(x)) { ... } Kamailio tries to convert the value of $var(x) to integer.</div><div>prints WARNINGS in the log when the $var(x) consists of a string.</div>
<div><br></div><div>Krish Kura</div><div><br></div></div><div><br></div>