How can I extract SIP messages in text format using tshark and raw_sip field?
I've tried "c:\Program Files\Wireshark\tshark.exe" -r capture-file.pcap -Y sip -T fields -e raw_sip
, the output is a wall of lines containing a literal raw_sip
. If I add -e sip.Call-ID
, I get the Call-ID values in front of the raw_sip
.
I understand that the contents of the raw_sip
field is a multi-line text, but is there a way I haven't discovered to get the values printed by tshark or should I file a bug? Especially given that the contents of sip.msg_hdr
is also a multi-line text and tshark prints it out happily.
Do you have a small capture file you can share? Also, which version of Wireshark are you using?
Sure, but I have no Cloudshark account. Any capture file with SIP in it will do, like e.g. this one.
In the meantime I've found an ugly workaround consisting in listing all the aggregate fields available and a separator which can be later substituted by a newline:
-T fields -E separator="°" -e frame.time_epoch -e sip.Request-Line -e sip.Status-Line -e sip.msg_hdr -e sip.msg_body
But if you think it deserves filing a bug, I'll file it.
Version 2.6.3 (v2.6.3-0-ga62e6c27)