Version

SipApplicationRouterInfo

The container invokes the SipApplicationRouter.getNextApplication() method to determine the next application to handle a SIP request. The application router returns information about the next application. The SipApplicationRouterInfo class encapsulates this information, allowing the container to process the application router's decisions and route SIP requests accordingly. This class provides details such as the next application to handle a request, the routing region, and the routing directive. By packaging this information, the SipApplicationRouterInfo class allows the container to understand and act on the application router's decisions. It ensures that SIP requests are routed correctly based on application-defined logic.

Constructor:

SipApplicationRouterInfo
SipApplicationRouterInfo(
    java.lang.String nextApplicationName,
    SipApplicationRoutingRegion routingRegion,
    java.lang.String subscriberURI,
    java.lang.String[] routes,
    SipRouteModifier mod,
    java.io.Serializable stateInfo
)

This constructor creates a SipApplicationRouterInfo object containing all the information needed for the container to make a routing decision. The parameters provide details about the next application, the routing context, and any associated state or modifications required for routing.
Parameters:
nextApplicationName: The name of the next application to handle the SIP request.
routingRegion: The routing region specified by the application router, indicating the scope or context for routing.
subscriberURI: The subscriber URI, which identifies the intended recipient or the user associated with the routing decision.
routes: An array of routes to be added to the SIP message during routing.
mod: A SipRouteModifier object specifying how the routes should be applied (e.g., ROUTE, NO_ROUTE, etc.).
stateInfo: A serializable object containing application-specific state information that needs to persist across routing operations.

This constructor encapsulates all these details into a single object, allowing the container to operate according to the application router's logic.

Methods:

getNextApplicationName
public java.lang.String getNextApplicationName()
The method retrieves the name of the next application selected by the SipApplicationRouter to handle the SIP request. This provides a simple way to identify the next application in the routing sequence. If the top route is external (not associated with an internal application), the method returns null.
Returns:
The name of the next selected SIP application. null if the top route is external.

getRoutes
public java.lang.String[] getRoutes()
The method retrieves an array of SIP routes associated with the request being processed. These routes indicate the routing path, whether internal (within the SIP container) or external (outside the SIP container). The behavior and use of these routes differ based on their type:

  • External Routes: Used by the container to route requests to external entities. The container processes these routes in reverse order, starting from the last element to the first.
  • Internal Routes: Indicate the route that directed the request to the SIP container. These are not used for routing by the container but are provided to allow the application router to potentially modify the topmost (first) internal route. Only the first internal route in the array is relevant. Additional internal routes are ignored.

Returns:
An array of SIP route headers, either internal or external. If no routes are present, an empty array is returned.

getStateInfo
public java.io.Serializable getStateInfo()
The method retrieves the state information associated with the application router for the current request. This state information is used to maintain context between requests in cases where the router must preserve continuity across a session or dialog.
Returns:
The state information associated with the router for the current request. The returned value can be any object that implements Serializable, allowing flexibility in defining what constitutes the state. If no state information exists, it may return null.

getSubscriberURI
public java.lang.String getSubscriberURI()
The method retrieves the URI of the subscriber that the next application is selected to serve. This URI represents the intended recipient of the SIP request within the application routing context. If the top route is external (i.e., the request is routed outside the SIP container), the method returns null.
Returns:
The URI of the subscriber for whom the next application is selected to handle the request. Returns null if the top route is external.

getRoutingRegion
public SipApplicationRoutingRegion getRoutingRegion()
The method retrieves the routing region where the next application has been selected to handle the SIP request. The routing region defines the scope or domain within which the request is being processed. If the top route is external (i.e., the request is routed outside the SIP container), the method returns null.
Returns:
The routing region associated with the next application selected to handle the request. Returns null if the top route is external.

getRouteModifier
public SipRouteModifier getRouteModifier()
The method retrieves the route modifier associated with the SipApplicationRouterInfo. The route modifier determines how the container should process the next set of routes or applications in the routing sequence.
Returns:
An enumerated value of type SipRouteModifier, which specifies the routing behavior.
Common values for SipRouteModifier include:

  • ROUTE: Indicates that the SIP container should route the request using the routes provided.
  • NO_ROUTE: Indicates that no routing is required, and the request should be passed directly to the selected application.
  • ROUTE_BACK: Indicates that the request should be routed back to the originating endpoint.

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