<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><tt>Hi Cindy!<br>
        <br>
        for TCP: the error seems to occur while reading the message. Are
        you sure the error route is not called for this type?<br>
        for UDP: Are you passing any flags to the sipmsg_validate()
        function? Have you tried using the 's' flag [1]?<br>
        <br>
        [1] </tt><a
href="http://www.opensips.org/html/docs/modules/1.9.x/sipmsgops.html#id293070">http://www.opensips.org/html/docs/modules/1.9.x/sipmsgops.html#id293070</a><br>
      <br>
      Best regards,<br>
      <pre class="moz-signature" cols="72">Razvan Crainea
OpenSIPS Core Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
      On 03/22/2013 02:30 AM, Cindy Leung wrote:<br>
    </div>
    <blockquote
      cite="mid:D3BEFA1C-81E3-419A-9248-B0BFA42CE4E5@gmail.com"
      type="cite">Hi all,
      <div><br>
      </div>
      <div>So we encountered a malformed SIP message one day that looks
        like this...</div>
      <div><br>
      </div>
      <div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">INVITE <a moz-do-not-send="true"
              href="sip:2345@my.opensips.server.IP:5060">sip:2345@my.opensips.server.IP:5060</a>
            SIP/2.0</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">Via: SIP/2.0/UDP
            127.0.1.1:5060;branch=z9hG4bK-15598-12-0</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">From: sipp &lt;<a moz-do-not-send="true"
              href="sip:1234@127.0.1.1">sip:1234@127.0.1.1</a>&gt;;tag=12</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">To: &lt;<a moz-do-not-send="true" href="sip:2345@">sip:2345@</a></font><span
            class="Apple-style-span" style="font-family: 'Courier New';
            ">my.opensips.server.IP</span><font class="Apple-style-span"
            face="'Courier New'">:5060&gt;</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:12-15598@127.0.1.1">12-15598@127.0.1.1</a></font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">CSeq: 1 INVITE</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">Contact: "1234" &lt;<a moz-do-not-send="true"
              href="sip:1234@127.0.1.1:5060;transport=udp">sip:1234@127.0.1.1:5060;transport=udp</a>&gt;</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">User-Agent: SIPp</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">Max-Forwards: 70</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">Content-Type: application/sdp</font></div>
        <div style="margin-top: 0px; margin-right: 0px; margin-bottom:
          0px; margin-left: 0px; font: normal normal normal 12px/normal
          Helvetica; "><font class="Apple-style-span" face="'Courier
            New'">Content-Lenght: 0</font></div>
      </div>
      <div><br>
      </div>
      <div>Typo in Content-Length.</div>
      <div><br>
      </div>
      <div>This message successfully passed through error_route
        and sipmsg_validate() and continue through the rest of the
        config.  Interesting enough, I get different errors when I send
        it over different protocol.</div>
      <div><br>
      </div>
      <div>TCP:</div>
      <div>/usr/local/sbin/opensips[18814]: ERROR:core:tcp_read_req: bad
        request, state=4, error=4 buf: &lt;SIP message here&gt;</div>
      <div><br>
      </div>
      <div>UDP:</div>
      <div>
        <div>/usr/local/sbin/opensips[18804]: ERROR:core:clen_builder:
          no message body found (missing crlf?)</div>
        <div>/usr/local/sbin/opensips[18804]:
          ERROR:core:build_req_buf_from_sip_req: failed to adjust
          Content-Length</div>
        <div>/usr/local/sbin/opensips[18804]:
          ERROR:tm:print_uac_request: no more shm_mem</div>
        <div>/usr/local/sbin/opensips[18804]: ERROR:tm:t_forward_nonack:
          failure to add branches</div>
      </div>
      <div><br>
      </div>
      <div>Can you let me know if I have missed anything please?
         Thanks!</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Cindy</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>