Hi<div><br></div><div>I got the following error when dealing with SIP INVITE with multi-part when the client is behind NAT:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">

<div><div>May 12 15:27:04 test /usr/sbin/kamailio[1792]: ERROR: nathelper [nathelper.c:2954]: can&#39;t extract body from the message</div></div></blockquote><div><div><br></div></div><div>The SIP INVITE message looks like:</div>

<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>INVITE <a href="mailto:sip%3Atoto@test.net">sip:toto@test.net</a> SIP/2.0</div></div><div><div>

[...]</div></div><div><div>Content-Type: multipart/mixed;boundary=gnkr</div></div><div><div>Content-Length: 659</div></div><div><div><br></div></div><div><div>--gnkr</div></div><div><div>Content-Type: application/sdp</div>

</div><div><div>Content-Length: 330</div></div><div><div><br></div></div><div><div>v=0</div></div><div><div>o=pascal 1273565967736 1273565967737 IN IP4 10.1.1.226</div></div><div>[...]</div></blockquote><div><br></div><div>

It looks the Content-length within the multi-part is not accepted.</div><div><br></div><div>I fixed it changing the source code of parser/sdp/sdp_helpr_funcs.c, in get_sdp_hdr_field() function:</div><div><br></div><div><div>

        switch(hdr-&gt;type){</div><div>                case HDR_CONTENTTYPE_T:</div><div>                case HDR_CONTENTDISPOSITION_T:</div><div>                case HDR_CONTENTLENGTH_T:</div><div> </div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">

<div>replaced with:</div></blockquote><div><div><br></div><div>        switch(hdr-&gt;type){</div><div>                case HDR_CONTENTTYPE_T:</div><div>                case HDR_CONTENTDISPOSITION_T:</div><div> </div></div>

<div>(I&#39;m using kamailio 3.0.1)</div><div><br></div><div>Cheers</div><div>Pascal</div>