What exactly is not working? If your extension class extends Extension and implements the IExtension interface, it should work fine. The easiest example to follow might be the XHTMLExtension class.
Actually the XHTMLExtension class is probably a bad example to follow, as it is not even a valid extension. There 4 things that need changed in this class to allow it to be used as an extension:
Support a default parameter-less constructor: public function XHTMLExtension(parent:XMLNode=null)
Implement a serialize and deserialize method
chandan - You should take a look at the RegisterExtension under org.jivesoftware.xiff.data.register. I used this as the starting point to implementing several extensions successfully.