Your Rhino SIP Servlet installation comes with example applications, in the examples/ directory. Each subdirectory under examples/ holds a self-contained SIP Servlet application, with source code and Ant deployment scripts.

Running ant inside an example application’s directory executes the default deploy build target, which builds the application and deploys it into the SLEE.

Once deployed, the application can be tested using your preferred SIP testing tools, such as SIPp or sipsak, or SIP softphones such as Twinkle, Linphone or X-Lite.

Warning You must deploy a Rhino SIP Servlet RA entity before attempting to install the example applications.

Below are descriptions of the sample applications: sipservlet-services, proxy-hybrid and http-example.

sipservlet-services

What it does

Implements some typical SIP services:

  • Registrar

  • Back-to-back user agent (B2BUA) & Proxy

  • Presence.

How to configure

  • Only one of the B2BUA or Proxy servlets should be enabled at a time.

  • The B2BUA servlet is enabled by default.

  • To enable the Proxy servlet, uncomment the <servlet-mapping> element for proxy-servlet in the deployment descriptor, and comment out the corresponding b2b-proxy-servlet element.

  • Use the env-entry “localDomains” to specify a comma-separated list of domain names that the proxy and B2BUA consider to be local.

If these servlets receive a request with a Request-URI containing a SIP identity (a.k.a. address of record) that is within one of these domains, the servlets lookup the SIP identity in the registration database to find a registered contact address. If no entry is found, an error response is returned to the caller. The registration database is populated by the Registrar servlet when SIP clients send REGISTER requests to register their current contact address.

The application’s deployment descriptor can be found at resources/WEB-INF/sip.xml.

Database it uses

An embedded (in-process) Derby database to store SIP registrations; created automatically during deployment.

proxy-hybrid

Note This is an example hybrid application — a SLEE service that uses the SIP Servlet 1.1 RA Type, and uses the SIP Servlet Proxy interface to implement a simple proxy.

What it does

Implements a very simple proxy; does not attempt to lookup registered SIP identities, so it can only forward requests to their next hop.

How to configure

Edit the service’s SBB deployment descriptor: resources/META-INF/sbb-jar.xml.

The environment entries proxyRecordRoute and proxySupervised are applied to the Proxy instances that are created when processing initial requests.

http-example

Note This is an example of a servlet application using a SLEE Resource Adaptor to communicate using another protocol, in this case HTTP.

What it does

A simple proxy that also uses the HTTP RA to make an HTTP request. Also processes incoming HTTP requests as initial events.

How to configure

No configuration required.

Previous page