<html><head></head><body><div class="ydpf491c6f3yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
<div>Hi Bogdan,<br></div><div><br></div><div>I'll try to get that done. I'm seeing this on a production server. I'll try to get the info you requested.<br></div>
</div><div id="yahoo_quoted_2755897076" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Monday, 19 November 2018, 7:41:54 PM GMT+5:30, Bogdan-Andrei Iancu <bogdan@opensips.org> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv0317722018"><div>
<tt>Hi Pasan,<br clear="none">
<br clear="none">
That is really weird I would say. Could you "pack" the minimal
script to get this error (plus the pcap of the REGISTER) ? you can
send them off list to me.<br clear="none">
<br clear="none">
Regards,<br clear="none">
</tt>
<pre class="yiv0317722018moz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="yiv0317722018yqt5800845716" id="yiv0317722018yqt59675"><div class="yiv0317722018moz-cite-prefix">On 11/16/2018 07:20 AM, Pasan Meemaduma
wrote:<br clear="none">
</div>
<blockquote type="cite">
<div class="yiv0317722018ydp73616616yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div>Hi Bogdan,</div>
<div><br clear="none">
</div>
<div>I tried scrip_trace function and it also indicate same
behavior, I can see the value of $tu but it still gives the
error. Interesting thing is, it evaluates to true and invokes
the remove() function as well.<br clear="none">
</div>
<div><br clear="none">
</div>
<div><span>Nov 16 16:06:46 /usr/sbin/opensips[16582]: [Script
Trace][/etc/opensips/opensips.cfg:814][reg-debug][core if]
-> (REGISTER from Y.Y.Y.Y F=<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXX@x.x.x.x</a>,
T=<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXX@x.x.x.x</a> <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-abbreviated" ymailto="mailto:ID=cd7921be-54514c80@v.v.v.v#012" target="_blank" href="mailto:ID=cd7921be-54514c80@v.v.v.v#012">ID=cd7921be-54514c80@v.v.v.v#012</a>)<br clear="none">
Nov 16 16:06:46 /usr/sbin/opensips[16582]:
ERROR:core:comp_scriptvar: cannot get left var value<br clear="none">
Nov 16 16:06:46 /usr/sbin/opensips[16582]:
WARNING:core:do_action: error in expression at
/etc/opensips/opensips.cfg:814<br clear="none">
<span>Nov 16 16:06:52 /usr/sbin/opensips[16582]: [Script
Trace][/etc/opensips/opensips.cfg:815][reg-debug][module
remove] -> (REGISTER from Y.Y.Y.Y F=<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXX@x.x.x.x</a>,
T=<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXX@x.x.x.x</a> <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-abbreviated" ymailto="mailto:ID=4afba829-fef90105@v.v.v.v#012" target="_blank" href="mailto:ID=4afba829-fef90105@v.v.v.v#012">ID=4afba829-fef90105@v.v.v.v#012</a>)<br clear="none">
<br clear="none">
</span><span><span> /etc/opensips/opensips.cfg:814</span></span><br clear="none">
<span> if ( $tu != NULL ) {<br clear="none">
remove("location","$tu");<br clear="none">
}<br clear="none">
<br clear="none">
</span><br clear="none">
</span> <br clear="none">
</div>
<div><br clear="none">
</div>
</div>
<div class="yiv0317722018yahoo_quoted" id="yiv0317722018yahoo_quoted_3078722934">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div> On Thursday, 15 November 2018, 5:25:54 PM GMT+5:30,
Bogdan-Andrei Iancu <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-rfc2396E" ymailto="mailto:bogdan@opensips.org" target="_blank" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a> wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv0317722018">
<div> <tt>Hi Pasan,<br clear="none">
<br clear="none">
Indeed, the logs show that the TO hdr is successfully
parsed - are you 100% sure about the reported line ?
maybe it is not the $tu related ? try to activate the
script_trace() [<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-4#toc42">http://www.opensips.org/Documentation/Script-CoreFunctions-2-4#toc42</a>]
function to see when exactly the error is generated.
Maybe you can actually print $tu before, to see what
you get.<br clear="none">
<br clear="none">
Regards,<br clear="none">
</tt>
<pre class="yiv0317722018moz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="yiv0317722018yqt2782136675" id="yiv0317722018yqt55121">
<div class="yiv0317722018moz-cite-prefix">On
11/15/2018 10:04 AM, Pasan Meemaduma wrote:<br clear="none">
</div>
<blockquote type="cite">
<div class="yiv0317722018ydp537a978cyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div>Hi Bogdan,</div>
<div><br clear="none">
</div>
<div>I'm not seeing any other related error msg
prior to this. I'm calling this test in request
route for a REGISTER request. Before the error
pops up I could see the received msg
successfully parse by opensips and can see value
of To uri</div>
<div><br clear="none">
</div>
<span>Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_msg: SIP Request:<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_msg: method: <REGISTER><br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_msg: uri: <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-rfc2396E"><sip:xx.xx.xx.xx></a><br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_msg: version: <SIP/2.0><br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: flags=2<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_via_param: found param type 232,
<branch> = <z9hG4bK-24790813>;
state=16<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_via: end of header reached,
state=5<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: via found, flags=2<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: this is the first via<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:receive_msg: After parse_msg...<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:receive_msg: preparing to run routing
scripts...<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: flags=100<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:_parse_to: end of header reached,
state=10<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:_parse_to: display={XXXXXXXXXX}, ruri={<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXXXXXXXXX@xx.xx.xx.x</a>}<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:get_hdr_field: <To> [48]; uri=[<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXXXXXXXXX@x.x.x.x</a>]<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:get_hdr_field: to body [XXXXXXXXXX <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-rfc2396E"><sip:XXXXXXXXXX@x.x.x.x></a>#015#012]<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:get_hdr_field: cseq <CSeq>:
<79474> <REGISTER><br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:maxfwd:is_maxfwd_present: value = 70<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_to_param: tag=46474fbe5728f700o0<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:_parse_to: end of header reached,
state=29<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:_parse_to: display={XXXXXXXXXX}, ruri={<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext">sip:XXXXXXXXXX@x.x.x.x</a>}<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: flags=200<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:get_hdr_field: content_length=0<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:get_hdr_field: found end of header<br clear="none">
<br clear="none">
</span>
<div>and following are the line that I get before
the error If I set log level to 6</div>
<div><br clear="none">
</div>
<div><span>Nov 15 18:19:19
/usr/sbin/opensips[21608]:
DBG:core:parse_headers: flags=ffffffffffffffff<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: flags=ffffffffffffffff<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
DBG:core:parse_headers: flags=ffffffffffffffff<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
ERROR:core:comp_scriptvar: cannot get left var
value<br clear="none">
Nov 15 18:19:19 /usr/sbin/opensips[21608]:
WARNING:core:do_action: error in expression at
/etc/opensips/opensips.cfg:807<br clear="none">
<br clear="none">
</span><br clear="none">
<span></span></div>
<span></span>
<div> <br clear="none">
</div>
<div><br clear="none">
</div>
</div>
<div class="yiv0317722018yahoo_quoted" id="yiv0317722018yahoo_quoted_2792727600">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div> On Wednesday, 14 November 2018, 7:19:44 PM
GMT+5:30, Bogdan-Andrei Iancu <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-rfc2396E" ymailto="mailto:bogdan@opensips.org" target="_blank" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a>
wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv0317722018">
<div> <tt>Hi Pasan,<br clear="none">
<br clear="none">
It should be fine if $tu would translate
to NULL. The script handles this case.
But I'm afraid you have something else
there, like another deeper error that
prevents the $tu variable to be
evaluated.<br clear="none">
<br clear="none">
Do you see any other errors before the
mentioned ones ? what is the type of
route where you do the test ?<br clear="none">
<br clear="none">
Regards,<br clear="none">
</tt>
<pre class="yiv0317722018moz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="yiv0317722018yqt7013559868" id="yiv0317722018yqtfd58933">
<div class="yiv0317722018moz-cite-prefix">On
11/13/2018 10:56 AM, Pasan Meemaduma
via Users wrote:<br clear="none">
</div>
<blockquote type="cite">
<div class="yiv0317722018ydp1ea07ddayahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div>Hey,</div>
<div><br clear="none">
</div>
<div>Anyone have a suggestion for
this?<br clear="none">
</div>
<div><br clear="none">
</div>
</div>
<div class="yiv0317722018yahoo_quoted" id="yiv0317722018yahoo_quoted_2106585655">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div> On Thursday, 8 November
2018, 8:09:50 AM GMT+5:30, Pasan
Meemaduma <a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-rfc2396E" ymailto="mailto:pasandev@ymail.com" target="_blank" href="mailto:pasandev@ymail.com"><pasandev@ymail.com></a>
wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv0317722018">
<div>
<div class="yiv0317722018ydp12152f82yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Hi
Guys,</div>
<div class="yiv0317722018ydp12152f82yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br clear="none">
</div>
<div class="yiv0317722018ydp12152f82yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">I
have a check for NULL for
$tu var in the script, But
when the value is missing
I'm getting the following
error.</div>
<div class="yiv0317722018ydp12152f82yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br clear="none">
</div>
<div class="yiv0317722018ydp12152f82yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><span>ERROR:core:comp_scriptvar:
cannot get left var
value<br clear="none">
<br clear="none">
</span>
<div><span>WARNING:core:do_action:
error in expression at
/etc/opensips/opensips.cfg:806</span></div>
<div><span><br clear="none">
</span></div>
<div><span>and line 806
contains following.</span></div>
<div><span><br clear="none">
</span></div>
<div><span><span> if (
$tu != NULL ) {<br clear="none">
remove("location","$tu");<br clear="none">
}<br clear="none">
<br clear="none">
</span></span>
<div><span>any
suggestion on how to
test for NULL values
without getting
above error. I'm
using opensips 2.3.5</span></div>
<div><span><br clear="none">
</span></div>
<div><span></span><br clear="none">
</div>
<div><br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br clear="none">
<fieldset class="yiv0317722018mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a rel="nofollow" shape="rect" class="yiv0317722018moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</blockquote></div>
<br clear="none">
</div></div></div>
</div>
</div></body></html>