The SIP Servlet Tutorial

Using the @SipApplicationKey Annotation

The javax.servlet.sip.annotation.SipApplicatonKey method-level annotation associates an incoming request with a particular SIpApplicationSession instance.

The method annotated by @SipApplicationKey must:

The returned String is the key used to associate the request with a SipApplicationSession instance.

Example 1–3 Example of @SipApplicationKey

package com.example.sip;
public class MySipApplication {
	public static String sessionKey (SipServletRequest req) {
		return hash(req.getRequestURI() + getDomain(req.getFrom());

Only one @SipApplicationKey method should be defined for a particular SIP application.

Table 1–6 @SipApplicationKey Elements




Explicitly associates the SIP application key with a particular SIP application. This element is optional.