Hi
I got the following error when dealing with SIP INVITE with multi-part when the client is behind NAT:
May 12 15:27:04 test /usr/sbin/kamailio[1792]: ERROR: nathelper [nathelper.c:2954]: can't extract body from the message
The SIP INVITE message looks like:
INVITE sip:toto@test.net sip%3Atoto@test.net SIP/2.0 [...] Content-Type: multipart/mixed;boundary=gnkr Content-Length: 659
--gnkr Content-Type: application/sdp Content-Length: 330
v=0 o=pascal 1273565967736 1273565967737 IN IP4 10.1.1.226 [...]
It looks the Content-length within the multi-part is not accepted.
I fixed it changing the source code of parser/sdp/sdp_helpr_funcs.c, in get_sdp_hdr_field() function:
switch(hdr->type){ case HDR_CONTENTTYPE_T: case HDR_CONTENTDISPOSITION_T: case HDR_CONTENTLENGTH_T:
replaced with:
switch(hdr->type){ case HDR_CONTENTTYPE_T: case HDR_CONTENTDISPOSITION_T:
(I'm using kamailio 3.0.1)
Cheers Pascal