SIP Servlet Engine© Documentations
 
  Top >   System Management >   Development Tools >   PresenceServlet
 
 

PresenceServlet

Overview

The SIP servlet that handles a SUBSCRIBE and NOTIFY messages from a user agent (UA).

PresenceServlet is an SIP servlet that implements the presence server function conformed to the SIP basic concept (RFC3261), the SIP-specific event notification framework (RFC 3265), and a presence event package for the SIP (draft-ietf-simple-presence-10). Note that the current version of this SIP proxy servlet does not fully conform to these specifications.

PresenceServlet provides the followings as the main functions.

  • The function that receives a SUBSCRIBE method to notify information about another subscribers who watches the UA.
  • The function that receives a NOTIFY method to notify another subscribers who watches the UA of information.

PresenceServlet does not support a clustered environment.

Initialization Parameters

The following table lists the initialization parameters you can set in PresenceServlet.

Parameter name Default value Description
realm None Specifies the default realm used in authentication of the registered user.
qop auth Specifies the qop value used in authentication of the registered user.
enableAuth true Specifies whether authentication of the registered user should be performed or not.
nonceTimeout 60 Specifies the nOnce timeout period (in seconds).
nonceMaxTimes 3 Specifies the number of valid times of nOnce.
dataSource None Specifies the name of the data source.
dbServer None Specifies the product name of the database.

External Interfaces

PresenceServlet uses the following SPI:

  • User Management Interface
  • Location Management Interface

PresenceServlet stores information about the UA's presence received as application-specific information in a database. For information about the database schema, see this page.

Related Files

The PresenceServlet setting should be defined in the sip.xml.

The database used by PresenceServlet should be created in advance.

The data source used by PresenceServlet should be set on your application server in advance.

EventSubscriptionBean should be registered to work as a driven bean based on JMS.

Example

Here is an example of the sip.xml.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE sip-app
   PUBLIC "-//Java Community Process//DTD SIP Application 1.0//EN"
   "http://www.jcp.org/dtd/sip-app_1_0.dtd">

<sip-app>
  <display-name>SIP Servlet Presence Application</display-name>
  <listener>
    <listener-class>com.oki.sip.apps.presence.PresenceServlet</listener-class>
  </listener>

  <servlet>
    <servlet-name>presence</servlet-name>
    <servlet-class>com.oki.sip.apps.presence.PresenceServlet</servlet-class>

   <init-param>
     <param-name>realm</param-name>
     <param-value>eoa.telcom.oki.co.jp</param-value>
   </init-param>

   <init-param>
     <param-name>qop</param-name>
     <param-value>auth</param-value>
   </init-param>

   <init-param>
     <param-name>enableAuth</param-name>
     <param-value>true</param-value>
   </init-param>

   <init-param>
     <param-name>nonceTimeout</param-name>
     <param-value>60</param-value>
   </init-param>

   <init-param>
     <param-name>nonceMaxTimes</param-name>
     <param-value>3</param-value>
   </init-param>

   <init-param>
     <param-name>dataSource</param-name>
     <param-value>java:/locationServer.dataSource</param-value>
   </init-param>

   <init-param>
     <param-name>dbServer</param-name>
     <param-value>PostgreSQL</param-value>
   </init-param>
    <load-on-startup/>
  </servlet>

  <servlet-mapping>
    <servlet-name>presence</servlet-name>
    <pattern>
        <equal>
          <var>request.method</var>
          <value>NOTIFY</value>
        </equal>
        <equal>
          <var>request.method</var>
          <value>SUBSCRIBE</value>
        </equal>
    </pattern>
  </servlet-mapping>

  <session-config>
    <session-timeout>1</session-timeout>
  </session-config>
</sip-app>

Reference

draft-ietf-simple-presence-10
A presence event package for the Session Initiation Protocol (SIP)
RFC 3261
The document that defines the SIP: Session Initiation Protocol
RFC 3265
The document that describes the basic functions about the SIP-specific event notification

Last Modified:Tue Dec 28 14:13:17 JST 2004