sofia allows you to enable siptrace from the clihttp://wiki.freeswitch.org/wiki/Sofia#Debugging_Sofia-SIPOr external tools like tcpdump/ngrep etc can be used http://wiki.freeswitch.org/wiki/Packet_Capture