SIP Servlets - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

SIP Servlets

Description:

Converged applications integration with IM, Web, Presence ... Used to package entire application into one bundle. Contains. Servlet classes ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 15
Provided by: jdro
Category:
Tags: sip | bundle | fills | servlets

less

Transcript and Presenter's Notes

Title: SIP Servlets


1
  • SIP Servlets

2
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
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
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
War File
Developer
Deployer
Web Server
5
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
Developer
SIP Server
6
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
Example SIP Servlet
public class MyServlet implements SipServlet
public void doInvite(SipServletRequest
req,

SipServletResponse res)
req.getProxy(true).proxy(sipuser_at_host
)
8
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

Class 1
Rule Match
Class 2
INVITE
Class 3
Class 4
Rule DB
9
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
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 Domain Objects
ApplicationSession
HttpSession
Unification
SipSession
SipTransaction
ServletContext
12
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

Servlet
Servlet
SIP Servlet API
SIP Servlet Container
JAIN SIP
SIP Protocol
13
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.5000jdrosen_at_dynamic
soft.com
Write a Comment
User Comments (0)
About PowerShow.com