Version

SipSessionsUtil

The SipSessionsUtil interface provides utility methods to support converged SIP and HTTP applications, as well as Java EE and SIP applications. It enables interaction between SIP and other application components, making it easier to manage sessions and retrieve context-specific data.
Applications can access an instance of this utility through the ServletContext parameter named javax.servlet.sip.SipSessionsUtil, or via dependency injection using the @Resource annotation.

Methods:

getApplicationSessionById

SipApplicationSession getApplicationSessionById(java.lang.String applicationSessionId)

Retrieves the SipApplicationSession associated with the given applicationSessionId. This ID corresponds to the value obtained using SipApplicationSession.getId(). The session is returned only if it belongs to the application invoking this method.
The method returns null if no matching session is found or if the session belongs to a different application.
Can be used in Java EE components, like a Message Driven Bean (MDB) within the same application archive (.war).
Parameters:
applicationSessionId: The ID of the SipApplicationSession.
Returns:
The SipApplicationSession object, or null if not found.
Throws:
NullPointerException: If applicationSessionId is null.

getApplicationSessionByKey

SipApplicationSession getApplicationSessionByKey(java.lang.String applicationSessionKey,
                                                 boolean create)

Retrieves the SipApplicationSession associated with the given applicationSessionKey. If no matching session is found, the method can create a new session depending on the create parameter.
Parameters:
applicationSessionKey: The key of the SipApplicationSession, typically the same as supplied to SipFactory.createApplicationSessionByKey.
create: Whether to create a new session if none is found.
Returns:
The SipApplicationSession object, or null if not found and create is false.
Throws:
NullPointerException: If applicationSessionKey is null.

getCorrespondingSipSession

SipSession getCorrespondingSipSession(SipSession session,
                                      java.lang.String headerName)

Finds and returns a related SipSession based on the provided session and header name. This is used when session join or replacement, as described in RFC 3911 (Join) and RFC 3891 (Replaces).
The method uses the container’s implicit implementation to establish associations.
For example, when passing a session with the "Join" header, the joined session is returned.
Parameters:
session: One of the related SIP sessions (e.g., the joining or replacing session).
headerName: The header name indicating the relationship (e.g., "Join" for RFC 3911, "Replaces" for RFC 3891).
Returns:
The related SipSession, or null if no related session is found.

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com