[OpenSIPS-Users] sipmsg_validate return -5 but content length seems correct.

Alain Bieuzent alain.bieuzent at free.fr
Mon Dec 6 16:25:44 EST 2021


Hi Bogdan, 

 

For me Yes at pcap level, SDP length is 364, find attach the trace.

 

Thanks

 

De : Bogdan-Andrei Iancu <bogdan at opensips.org>
Date : lundi 6 décembre 2021 à 17:17
À : OpenSIPS users mailling list <users at lists.opensips.org>, Alain Bieuzent <alain.bieuzent at free.fr>
Objet : Re: [OpenSIPS-Users] sipmsg_validate return -5 but content length seems correct.

 

Hi Alain,

OpenSIPS complains that the actual SDP is 366, while only 364 are advertised in Content-len hdr - can you confirm this at the pcap level ?

Regards,

Bogdan-Andrei Iancu
 
OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021 
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/
On 12/6/21 2:55 PM, Alain Bieuzent wrote:

Hi,

 

I have a case where sipmsg_validate find an issue in SDP length, opensips find two characters more than the Content-Length and what i found in tcpdump trace.

 

INVITE sip:33648642792 at 185.101.180.124:5060 SIP/2.0

Via: SIP/2.0/UDP 35.246.200.233:9077;rport;branch=z9hG4bK4b24d98a7dd82e427f5e14c93ae2dba7

Via: SIP/2.0/UDP 13.38.77.105:5080;rport;branch=z9hG4bKH012Hr73SycDg

Max-Forwards: 64

From: "33613630817" <sip:33613630817 at 13.38.77.105>;tag=2ZB6X8jjtaH8e

To: <sip:33648642792 at 185.101.180.124:5060>

Call-ID: c9a92f54-d124-123a-1693-0625bc81f114

CSeq: 44840040 INVITE

Contact: <sip:mod_sofia at 13.38.77.105:5080>

User-Agent: FS16

Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY

Supported: timer, path, replaces

Allow-Events: talk, hold, conference, refer

Privacy: none

Content-Type: application/sdp

Content-Disposition: session

Content-Length: 364

X-FS-Support: update_display,send_info

P-Asserted-Identity: "33613630817" <sip:33613630817 at 13.38.77.105>

Record-Route: <sip:35.246.200.233:9077;lr>

 

v=0

o=FreeSWITCH 1638764203 1638764204 IN IP4 13.38.77.105

s=FreeSWITCH

c=IN IP4 13.38.77.105

t=0 0

m=audio 23462 RTP/AVP 8 0 18 101

a=rtpmap:8 PCMA/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=rtcp-mux

a=rtcp:23462 IN IP4 13.38.77.105

a=silenceSupp:off - - - -

a=ptime:20

 

opensips logs :

 

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:get_hdr_field: content_length=364

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:get_hdr_field: found end of header

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:receive_msg: After parse_msg...

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:receive_msg: preparing to run routing scripts...

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:parse_headers: flags=8

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:parse_headers: flags=ffffffffffffffff

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:parse_headers: flags=ffffffffffffffff

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:sipmsgops:w_sip_validate: message does not comply with SIP RFC3261 : (invalid body - content length 364 different than actual body 366#012)

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: DBG:core:comp_scriptvar: str 29 : 35.246.200.233

Dec  6 11:47:45 lbsip-rtpe-test opensips[2756]: Dropping mal formed Messages Retcode : -5 IP:35.246.200.233 callID: c9a92f54-d124-123a-1693-0625bc81f114 ,Reason : Invalid Content-Length---

 

On Wireshark, the SDP part length is also 364 bytes.

 

I can send the pcap if needed

 

Thanks for your help.

 

Alain

 



_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20211206/b061e5f8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump.pcap
Type: application/octet-stream
Size: 2465 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20211206/b061e5f8/attachment.obj>


More information about the Users mailing list