CDR logs and PAI - p-asserted-identity

Hi
I am having some issues and i want to log all inbound sip call headers including the PAI as sometimes I seems to receive erroneous CID.
can anyone suggests how to do that?
Erez

sip set debug on

wireshark

or

tcpdump