<div dir="ltr">Also,  the INIT_VARS route is the very first thing that executes within the main routing block.  <div><br></div><div>The case that i am interested in that results in one statement returning false and the other true is for an INVITE.  </div><div><br></div><div>I tried printing the uri variable but was unsuccessful in doing so.  Maybe if that's the next best step, i can pursue that with some advice on how to print that variable.</div><div><br></div><div>Thanks,</div><div><br></div><div>Karthik </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 19, 2018 at 12:09 PM, Karthik Srinivasan <span dir="ltr"><<a href="mailto:ksriniva2002@gmail.com" target="_blank">ksriniva2002@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, they are used at the very same place. here is a code snippet of where i added it for testing purposes:<div><br></div><div><br></div><div><div><div>route[INIT_VARS] {</div></div><div><br></div><div>$var(myself) = uri =~ "<regex string to match>" || uri == myself;<br></div><div>//if i print $var(myself) it prints 0 </div><div>$var(myself) = uri =~ "<regex string to match>" || is_myself("$ru");<br></div><div>//if i print $var(myself) it prints 1 </div><div><br></div><div>// in both cases above the regex part isn't supposed to match and hence correctly returns false.</div><div>...</div><div><br></div><div>}</div><div><br></div><div>route{</div><div><br></div><div>   route(INIT_VARS);</div><div><br></div></div><div>...</div><div>}</div><div><br></div><div>Thanks,</div><div><br></div><div>Karthik</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 19, 2018 at 11:46 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
<br>
On 19.07.18 18:32, Karthik Srinivasan wrote:<br>
> Hello,<br>
><br>
> Can someone explain to me why statement A returns True and statement B<br>
> returns False.<br>
><br>
> Statement A:<br>
> is_myself("$ru")<br>
><br>
> Statement B:<br>
> uri == myself<br>
><br>
><br>
> Isn't uri and $ru referencing the same data?   <br>
><br>
> With my current config i am expecting the is_myself to return True;  i<br>
> was expecting the same for Statement B but unfortunately it is<br>
> returning False.<br>
><br>
they are supposed to be the same in this case.<br>
<br>
Are they used at the same place in config? Note that $ru can be changed<br>
by different functions such as those from registrar, dispatcher, lcr, ...<br>
<br>
Cheers,<br>
Daniel<span class="HOEnZb"><font color="#888888"><br>
<span class="m_-7962222815949004533HOEnZb"><font color="#888888"><br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a><br>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a><br>
Kamailio World Conference -- <a href="http://www.kamailioworld.com" rel="noreferrer" target="_blank">www.kamailioworld.com</a><br>
<br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div><br></div>