The javax.servlet.sip.SipFactory interface defines several abstractions useful in SIP applications. SIP applications use the container's SipFactory instance to create :
Requests using the createRequest methods.
Address objects such as URI, SipURI, Address, and Parameterable instances.
Application sessions.
For a full description of SipFactory's methods, see the SIP Servlet 1.1 Javadocs.
Use the javax.annotations.Resource annotation to inject an instance of SipFactory in a class.
@Resource SipFactor sf;
You may also look up the container's SipFactory instance through the servlet context.
SipFactory sf = (SipFactory) getServletContext().getAttribute("javax.servlet.sip.SipFactory");