If you use PacketExtension
to send custom stanzas, as this thread explained: https://stackoverflow.com/a/6390037/474002
Then, you could use smack api Packet.getExtensions
as the document: http://www.igniterealtime.org/builds/smack/docs/latest/javadoc/org/jivesoftware/smack/packet/Packet.html#getExtensions()
Hope this will help ~