Ankit Malhotra
Abstract
A Presence Server processes Session Initiation Protocol (SIP) Presence messages on behalf of presentities. The Server stores status information of each of its users and sends presence updates to users who subscribe to this presence information. Thus, user agents need only worry about their own presence information and the Server would forward this information to all the user’s watchers. Similarly, the user agents need only authorize subscriptions while the Server would authenticate the watchers, create subscriptions, remove expired subscriptions and send presence updates. This server supports only the ‘presence’ event package but its extensible nature allows new event packages to be added dynamically.
System Requirements
Installation Instructions
java -classpath jain-sip-api-1.2.jar;jain-sip-ri-1.2.jar;log4j-1.2.8.jar;mysql-connector-java-5.1.5-bin.jar;server.jar subsnotify.Server
Program Operation
After the server is started, it instantiates the SIP stack
and listens for incoming message events on both its
Clients used
Extensibility Framework
The Server allows support for event packages apart from the ‘presence’ event package already implemented. This is achieved by the means of dynamic class loading. The Eventloader table maintains a matching between the event type and the corresponding class to load for that particular event.
The EventParser interface allows an implementer to define behaviors for a particular event which would differ across Events. EventParser gives a list of these methods. An implementer has to perform the following steps to define behavior for a particular event:
An example loading operation:
Class c=Class.forName(classname);
EventParser eventParser=(EventParser)c.newInstance();
All EventParser instances are stored in a hashtable (eventClasses) indexed by the ‘event type’ when the Server is started and looked up whenever required. To call a method for the ‘foo’ event package, the following syntax has been used:
EventParser eParser=eventClasses.get(“foo”);
eParser.method1();
Possible Enhancements
Acknowledgements
I would like to thank NIST’s team that worked on JAIN SIP Stack that forms the underlying base of the project with excellent documentation and manuals for developers. I would also like to thank Jong-Yul Kim for his great inputs, encouragement and guidance throughout this project. I would also like to thank Prof. Henning Schulzrinne for his vision and guidance without which this project would not have been possible.