<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Dragomir,<br>
    <br>
    Just tried your piece of script with 1.8.2 and trunk (latest SVN)
    and it works....<br>
    <br>
    Maybe you are not using the proper script ?<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <br>
    On 12/18/2012 05:27 PM, Dragomir Haralambiev wrote:
    <blockquote
cite="mid:CADzurOKFhZ29ARrSHBXHdrOhQ_KPy-xokz9RMrkKSU-4-tw+Zw@mail.gmail.com"
      type="cite">
      <div>Hi Bogdan,</div>
      <div>Here is script and debug 6:</div>
      <div>&nbsp;</div>
      <div>route{<br>
        &nbsp;xlog("L_ERR",&nbsp;"+++++++++++++++++++++++++++++++++++++++++++$rm
        $fU from $si:$sp\n");<br>
        &nbsp;if (!mf_process_maxfwd_header("10")) {<br>
        &nbsp;&nbsp;sl_send_reply("483","Too Many Hops");<br>
        &nbsp;&nbsp;exit;<br>
        &nbsp;};<br>
        &nbsp;if (msg:len &gt;=&nbsp; 2048 ) {<br>
        &nbsp;&nbsp;xlog("L_ERR",&nbsp;"Message too big from $si:$sp\n");<br>
        &nbsp;&nbsp;sl_send_reply("513", "Message too big");&nbsp;&nbsp; <br>
        &nbsp;&nbsp;exit;&nbsp; <br>
        &nbsp;};</div>
      <div>&nbsp;if (!sipmsg_validate("sh")) {<br>
        &nbsp;&nbsp;send_reply("400", "Bad Request/Body");<br>
        &nbsp;&nbsp;exit;<br>
        &nbsp;};</div>
      <div>&nbsp;#####################################&nbsp; MESSAGE&nbsp;
        ##########################################<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (is_method('MESSAGE')) {<br>
        &nbsp;&nbsp;xlog("L_ERR", "MESSAGE from $si:$sp&nbsp; \n");<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("200", "ok");<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( $rm == "MESSAGE" ) {<br>
        &nbsp;&nbsp;xlog("L_ERR", "$rm from $si:$sp&nbsp; \n");<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("200", "ok");<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</div>
      <div>
        &nbsp;if(has_body("")) { xlog("L_ERR",&nbsp;"BODY yes"); }</div>
      <div>Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        +++++++++++++++++++++++++++++++++++++++++++MESSAGE 344447741656
        from <a moz-do-not-send="true" href="http://88.87.3.168:23729">88.87.3.168:23729</a><br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:maxfwd:is_maxfwd_present: value = 70<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:parse_headers: flags=ffffffffffffffff<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:parse_to: end of header reached, state=10<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:parse_to: display={}, ruri={<a moz-do-not-send="true"
          href="mailto:sip%3A5555@82.87.10.164">sip:5555@82.87.10.164</a>}<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:get_hdr_field: &lt;To&gt; [24]; uri=[<a
          moz-do-not-send="true" href="mailto:sip%3A5555@82.87.10.164">sip:5555@82.87.10.164</a>]<br>
        &nbsp;]&nbsp; 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:get_hdr_field: to body [&lt;<a moz-do-not-send="true"
          href="mailto:sip%3A5555@82.87.10.164">sip:5555@82.87.10.164</a>&gt;<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;11163&gt;
        &lt;MESSAGE&gt;<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:get_hdr_field: content_length=4<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:get_hdr_field: found end of header<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:decode_mime_type: Decoding MIME type for:[text/plain]<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:decode_mime_type: Decoding MIME type for:[text/plain,
        application/im-iscomposing+xml]<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:decode_mime_type: Decoding MIME type for:[
        application/im-iscomposing+xml]<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:parse_headers: flags=ffffffffffffffff<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]:
        DBG:core:parse_headers: flags=ffffffffffffffff<br>
        Dec 18 15:24:09 sbc /usr/local/sbin/opensips[18250]: BODY yes<br>
        <br>
      </div>
      <div class="gmail_quote">2012/12/18 Bogdan-Andrei Iancu <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span><br>
        <blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex;
          border-left: 1px solid rgb(204, 204, 204);"
          class="gmail_quote">
          <div text="#000000" bgcolor="#ffffff"> <tt>Hi,<br>
              <br>
              Are you 100% sure your script execution gets to that "if"
              ? place an xlog before the "if" to double check it.<br>
              <br>
              Regards,<br>
            </tt>
            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
            <div>
              <div class="h5"> <br>
                On 12/18/2012 04:45 PM, Dragomir Haralambiev wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">
                  <div>Hello,</div>
                  <div>&nbsp;</div>
                  <div>I try receive&nbsp;SIP MESSAGE in opensips
                    1.8.2(revision 9536). </div>
                  <div>The follow do not wotk:<br>
                  </div>
                  <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (is_method("MESSAGE")) {<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "MESSAGE from $si:$sp&nbsp;
                    \n");<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</div>
                  <div>&nbsp;</div>
                  <div>Here is debug 6:<br>
                    DBG:core:parse_headers: flags=ffffffffffffffff<br>
                    DBG:core:parse_to: end of header reached, state=10<br>
                    DBG:core:parse_to: display={}, ruri={<a
                      moz-do-not-send="true"
                      href="mailto:sip%3A5555555@82.87.10.164"
                      target="_blank">sip:5555555@82.87.10.164</a>}<br>
                    DBG:core:get_hdr_field: &lt;To&gt; [27]; uri=[<a
                      moz-do-not-send="true"
                      href="mailto:sip%3A5555555@82.87.10.164"
                      target="_blank">sip:5555555@82.87.10.164</a>]<br>
                    DBG:core:get_hdr_field: to body [&lt;<a
                      moz-do-not-send="true"
                      href="mailto:sip%3A5555555@82.87.10.164"
                      target="_blank">sip:5555555@82.87.10.164</a>&gt;<br>
                    DBG:core:get_hdr_field: cseq &lt;CSeq&gt;:
                    &lt;49480&gt; &lt;MESSAGE&gt;<br>
                    DDBG:core:get_hdr_field: content_length=6<br>
                    DBG:core:get_hdr_field: found end of header<br>
                    DBG:core:decode_mime_type: Decoding MIME type
                    for:[text/plain]<br>
                    DBG:core:decode_mime_type: Decoding MIME type
                    for:[text/plain, application/im-iscomposing+xml]<br>
                    DBG:core:decode_mime_type: Decoding MIME type for:[
                    application/im-iscomposing+xml]<br>
                    DBG:core:parse_headers: flags=ffffffffffffffff</div>
                  <div>&nbsp;</div>
                  <div>Where is problem?</div>
                  <div>&nbsp;</div>
                  <div>&nbsp;</div>
                </div>
              </div>
              <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
  </body>
</html>