Presentation is loading. Please wait.

Presentation is loading. Please wait.

SIP Servlets. SIP Summit 2001 5.01.01 SIP Servlets Problem Statement Want to enable construction of a wide variety of IP telephony.

Similar presentations

Presentation on theme: "SIP Servlets. SIP Summit 2001 5.01.01 SIP Servlets Problem Statement Want to enable construction of a wide variety of IP telephony."— Presentation transcript:

1 SIP Servlets

2 SIP Summit 2001 5.01.01 SIP Servlets Problem Statement Want to enable construction of a wide variety of IP telephony applications Traditional voice features IN features Converged applications – integration with IM, Web, Presence Generic call model based APIs not sufficient! Dont expose features of SIP needed for converged services Call model not central – other events drive apps! API should appeal to a wide developer community Want to support hosting model Developer is not the deployer Carrier grade applications

3 SIP Summit 2001 5.01.01 SIP Servlets Appealing to the Web Development Community Number of web developers to telecom developers is on order of :1 Most CS graduates today know servlets, CGI, XML, and web development servers Goal is to create lots of services by appealing to the masses Great ideas will come from two hackers in a garage Therefore, Want a SIP services API that is familiar to web developers Leverage the HTTP servlet model

4 SIP Summit 2001 5.01.01 SIP Servlets HTTP Servlets HTTP Java Servlets Widely Used in Web Application Development Applications Consist of Sets of HTTP Servlets, Each of Which Processes a Single Web Request in the Application HTTP Servlets Return Web Pages to Display HTTP Servlets Can Create Session Data e.g., shopping cart, that spans multiple requests Container Manages HTTP Servlet Lifecycles, Fault Tolerance, Session State HTTP Servlets Collected into a War File – Web Archive HTTP Servlets Web Server Developer Deployer War File

5 SIP Summit 2001 5.01.01 SIP Servlets SIP Servlets Direct Application of HTTP Servlet Model to SIP Java-based API Telecommunications application is a set of SIP (and HTTP!) servlets SIP servlets process a particular SIP request or response Lifecycle managed by container SIP servlets can create and access session data, call data, transaction data SIP servlet container provides same functions as http container CAR file equivalent of WAR file SIP Servlets Car File SIP Server Developer

6 SIP Summit 2001 5.01.01 SIP Servlets What is a SIP Servlet? Java interface Defines methods that are callbacks when certain events occur doInvte() doBYE() doResponse() Application writer implements servlet class, fills in methods with own code Servlets dont store state – domain objects are used (later) Servlet can instruction container to Proxy a request Initiate a new request Forward a response Generate a response Servlet engine handles the messy details of SIP Call-Ids, tags, retransmissions, record-routes, vias… Servlet has access to important fields of SIP messages To, From, Request-URI, Contact, body

7 SIP Summit 2001 5.01.01 SIP Servlets Example SIP Servlet public class MyServlet implements SipServlet { public void doInvite(SipServletRequest req, SipServletResponse res) { req.getProxy(true).proxy(sip:user@host) ; }

8 SIP Summit 2001 5.01.01 SIP Servlets Definition of Servlet Mappings Single server supports many applications When a SIP INVITE arrives, which one (or ones) process the request?? Servlet mappings are rules that create bindings from SIP messages to servlet classes Based on expression matching in fields of message Servlet mappings can be Set up by application deployer Set by application writer Rule Match Class 1 Class 2 Class 3 Class 4 Rule DB INVITE

9 SIP Summit 2001 5.01.01 SIP Servlets Deployment Descriptors Third party model requires information to be conveyed from writer to deployer beyond just code Deployment descriptor fills this need Descriptive names and usage of classes Name and usage of entire application Servlet mappings Context parameters References to resources needed by applications EJB Homes JNDI contexts Session timeouts Converged Archive (CAR) File JAR file with specific structure Used to package entire application into one bundle Contains Servlet classes Deployment descriptor Static content HTTP Servlets use WAR file (Web Archive) CAR file is superset of WAR

10 SIP Summit 2001 5.01.01 SIP Servlets Storing application state In most applications, state is distributed throughout the objects it uses Troublesome for fault tolerance The data must be replicated Data might need to be distributed across a set of homogeneous servers The data might need to be stored on reliable media to ensure recovery If data is distributed, container has no easy way to store and manage it for the application Result: application needs to handle its own data management. Bad. Alternative: container provides domain objects in which application can place all state All state in one place Container can easily manage fault tolerance, reliability, etc. In HTTP Servlets, the domain objects are Session and ServletContext Session are things like shopping carts, span multiple HTTP requests

11 SIP Summit 2001 5.01.01 SIP Servlets ApplicationSession SIP Domain Objects ServletContext HttpSession Unification SipSession SipTransaction

12 SIP Summit 2001 5.01.01 SIP Servlets Relationship to JAIN SIP JAIN SIP is a generic, low-level interface for accessing SIP services Can be used in Clients Servers Gateways Focuses purely on the protocol Complete access to SIP capabilities Supports transactions only SIP Servlet Container is a particular application of JAIN SIP SIP Protocol SIP Servlet Container Servlet JAIN SIP SIP Servlet API Servlet

13 SIP Summit 2001 5.01.01 SIP Servlets Relationship to JAIN SIP Servlets focus on high volume carrier grade servers Add significant, non-SIP protocol functions Lifecycle management Domain objects Context and configuration Deployment descriptors Archive files Synchronization primitives Security Add significant SIP protocol functions Construction of requests and responses from domain objects Hide many parts of JAIN SIP Direct access to many headers is not provided Write access to most everything is often restricted Servlets should be defined to allow a SIP container to be built using JAIN SIP SIP Objects in Servlet API defined with interfaces that match JAIN SIP signatures Cannot directly expose JAIN SIP objects, though

14 Information Resource Jonathan Rosenberg +1.973.952.5000

Download ppt "SIP Servlets. SIP Summit 2001 5.01.01 SIP Servlets Problem Statement Want to enable construction of a wide variety of IP telephony."

Similar presentations

Ads by Google