PAssertedIdentityHeader h = (PAssertedIdentityHeader)sipRequest.getHeader(PAssertedIdentityHeader.NAME);
System.out.println( h.getClass() );
System.out.println( h instanceof ExtensionHeader );
System.out.println( h instanceof PAssertedIdentityHeader );
PPreferredIdentityHeader h2 = (PPreferredIdentityHeader) sipRequest.getHeader(PPreferredIdentityHeader.NAME);
System.out.println( h2.getClass() );
System.out.println( h2 instanceof ExtensionHeader );
System.out.println( h2 instanceof PPreferredIdentityHeader );
System.out.println("Parsed SIPRequest is :\n" + sipRequest.toString());