sngrep
sngrep copied to clipboard
Add support for not fully RFC compliant SIP messages
Hi @yezongming
I have been debugging the attached captured. Thanks for the testing data. It seems your SIP messages are a bit strange, not sure what tool you've been used for creating the pcap, but as far as I know, each header should end with CRLF (0x0D0A) but yours end just with 0x0A.
That avoids matching the parser regexps and detects the payload as not SIP.
You can check that with wireshark or even ngrep: ngrep -pqtx -n1 -I large\ sip\ mesage.pcap
Regards!
Hi @Kaian,
What would you think about having a less-strict parsing mode where messages not fully SIP compliant are still shown in the display (using maybe another color).
Thanks for such a great tool!
Umm, sorry for the lack of feedback on this one.
I could change the regexp to be less strict yes, but I think I will leave that for a future release. Right now we don't understand SIP, we only parse SIP but we don't know if it's correct or incorrect. We could add a bit more logic that checks if headers are malformed or URIs are well formatted, but I consider that extra info so I'll leave it for now.
Thanks for the feedback and suggestions!!