SipApplicationRoutingRegion
The SipApplicationRoutingRegion class represents an application routing region in SIP Servlet applications. It extends java.lang.Object and implements the java.io.Serializable interface, making it suitable for serialization in distributed environments.
This class uses predefined regions defined in the SipApplicationRoutingRegionType enum. Additionally, it allows you to create custom regions for specific use cases, especially in non-telephony domains where traditional caller and callee concepts may not be applicable. These custom regions provide flexibility for applications that require unique routing contexts beyond standard telephony-based routing. By encapsulating routing region information, the SipApplicationRoutingRegion class enables applications and the container to make more granular routing decisions based on the specific needs of the application.
Fields:
ORIGINATING_REGION
public static final SipApplicationRoutingRegion ORIGINATING_REGION
The field represents a constant in the SipApplicationRoutingRegion class that identifies the ORIGINATING region. This region includes applications that service the caller in a SIP request.
The originating region is associated with the source of the SIP request, such as the calling party in an INVITE transaction. Applications in this region handle tasks specific to the caller, such as authentication, billing, or feature provisioning for outgoing requests.
TERMINATING_REGION
public static final SipApplicationRoutingRegion TERMINATING_REGION
The field is a constant in the SipApplicationRoutingRegion class that identifies the TERMINATING region. This region includes applications that service the callee in a SIP request.
The terminating region is associated with the destination of the SIP request, such as the called party in an INVITE transaction. Applications in this region handle tasks specific to the callee, such as call delivery, feature activation, or context-specific routing for incoming requests.
NEUTRAL_REGION
public static final SipApplicationRoutingRegion NEUTRAL_REGION
The field is a constant in the SipApplicationRoutingRegion class that identifies the NEUTRAL region. This region includes applications that are not tied to servicing a specific subscriber, such as the caller or callee.
The neutral region is used for applications that handle generic or system-wide tasks, rather than being tied to the originating or terminating parties. Examples include network-level services, logging, or applications that manage non-subscriber-specific tasks like call distribution.
Constructor:
SipApplicationRoutingRegion
public SipApplicationRoutingRegion(java.lang.String label, SipApplicationRoutingRegionType type)
This constructor creates a new SipApplicationRoutingRegion object, allowing you to define a custom routing region for their application. The label parameter specifies the name or identifier of the region, and the type parameter determines the region type using the predefined values in the SipApplicationRoutingRegionType enum.
If a custom routing region is being defined and does not fit into the predefined region types, the type parameter can be set to null. This flexibility makes the constructor suitable for use in non-standard scenarios, such as applications outside of traditional telephony domains.
Parameters:
label: A String representing the name or identifier for the routing region. This provides a human-readable or logical identifier for the region.
type: A SipApplicationRoutingRegionType object representing the predefined type of the routing region. This can be null when defining a custom region.
This constructor helps you to create routing regions customized to specific application needs, whether they align with predefined types or require entirely new contexts.
Methods:
getLabel
public java.lang.String getLabel()
The method retrieves the label associated with a specific SipApplicationRoutingRegion. Each routing region (ORIGINATING_REGION, TERMINATING_REGION, NEUTRAL_REGION) has a unique label that provides a string representation of the region.
Returns:
The label of the routing region, which uniquely identifies the region in a human-readable format.
getType
public final SipApplicationRoutingRegionType getType()
The method retrieves the type of the routing region. The type indicates whether the region is one of the predefined constants (ORIGINATING, TERMINATING, or NEUTRAL) or a custom region.
Returns:
The type of the routing region.
Possible values:
- ORIGINATING: Indicates the region services the caller.
- TERMINATING: Indicates the region services the callee.
- NEUTRAL: Indicates the region handles non-subscriber-specific tasks.
Returns null if the region is a custom region not defined by the standard constants.
toString
public java.lang.String toString()
The method provides a string representation of the SipApplicationRoutingRegion object. It overrides the default toString implementation in the java.lang.Object class to return a meaningful and human-readable description of the routing region.
Returns:
A string representation of the routing region. Typically includes the label or other identifying information about the region.
Methods inherited from class java.lang.Object:
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait.
These methods are not overridden in this implementation.
Start innovating with Mobius
What's next? Let's talk!