public interface LegManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CALLINGPARTY_NAME
Leg name used for the original Calling Party for this Sentinel SIP service instance.
|
static java.lang.String |
COMPONENT_NAME_KEY
Leg Manager component name key, used in
FailedInstruction . |
static java.lang.String |
COMPONENT_TYPE_NAME
Leg Manager component type value, used in
FailedInstruction . |
Modifier and Type | Method and Description |
---|---|
Leg |
createLeg(OutgoingSipRequest initialRequest,
java.lang.String legName)
Immediately create a leg and queue the initialRequest request in the MessagesToSend queue of the leg.
|
void |
detachFromAllLegs()
Immediately detach from all legs.
|
void |
detachFromLeg(Leg leg)
Immediately remove the Leg from the leg manager.
|
void |
disableSessionReplication()
Permanently disables replication for the current session.
|
void |
enableSessionReplication()
Enables replication for the current session.
|
void |
endSession()
Immediately clear all pending requests on all legs.
|
void |
endSession(int endSessionCause)
Behaves the same as
endSession() except that it uses the endSessionCause when ending all leg sessions. |
java.lang.String |
getCallingParty()
Return the leg name associated with 'CallingParty' for this Sentinel SIP service instance.
|
Leg |
getCallingPartyLeg()
Return the calling party leg for this Sentinel SIP service instance.
|
Leg |
getLeg(javax.slee.ActivityContextInterface aci)
Determine the leg associated with the specified aci.
|
Leg |
getLeg(SipSession session)
Determine the leg associated with the specified session.
|
Leg |
getLeg(java.lang.String legName)
Return the leg with name legName
The following well known leg names are used:
callingParty
|
int |
getLegCount()
Get the number of legs for the Sentinel SIP service instance.
|
java.util.Collection<Leg> |
getLegs()
Return a Collection of legs for the Sentinel SIP service instance.
|
Leg |
importAsNewLeg(javax.slee.ActivityContextInterface aci,
java.lang.String legName,
InitialLegPhase legPhase)
Immediately create a new leg in the indicated phase (
InitialLegPhase.CallSetup or
InitialLegPhase.MidSession ). |
Leg |
importAsNewLeg(SipSession session,
java.lang.String legName,
InitialLegPhase legPhase)
Immediately create a new leg in the indicated phase (
InitialLegPhase.CallSetup or
InitialLegPhase.MidSession ). |
Leg |
importHandoverLeg(IncomingSipRequest handoverRequest,
java.lang.String legName)
Imports a SIP session for a handover request into a new leg in the call-setup phase with the given leg name.
|
boolean |
isLegEnding(Leg leg)
Determines whether the given leg is ending, i.e. it has been detached or released, or the
session is ending.
|
boolean |
isLegInviteSessionEnding(Leg leg)
Determines whether the given leg has an INVITE session which is ending, i.e. the leg has been
detached or released, or the session is ending.
|
boolean |
isSessionEnding()
Get whether end session has been invoked
|
boolean |
isSessionReplicationDisabled()
Get whether replication has been permanently disabled for this session.
|
boolean |
isSessionReplicationEnabled()
Get whether replication has been enabled for this session.
|
void |
proxySessionAndDoNotRecordRoute(Leg leg)
Proxy the initial request received on the leg using the URI received in the initial request.
|
void |
proxySessionAndDoNotRecordRoute(Leg leg,
URI newRequestUri)
Proxy the initial request received on the leg using a different request URI.
|
void |
proxySessionAndDoNotRecordRoute(Leg leg,
URI[] newRequestUris)
Proxy the session to continue using different request URIs and remove Sentinel
from the route.
|
ProxyResult |
proxySessionInternal(Leg leg,
URI newRequestUri)
Proxy the initial request received on the leg using a different request URI.
|
void |
releaseLeg(Leg leg)
Immediately unlinks the leg if it is linked, clears any pending instructions and adds the releaseLeg
instruction.
|
void |
setCallingParty(java.lang.String legName)
Set the leg name associated with 'CallingParty' for this Sentinel SIP service instance.
|
static final java.lang.String CALLINGPARTY_NAME
static final java.lang.String COMPONENT_TYPE_NAME
FailedInstruction
.static final java.lang.String COMPONENT_NAME_KEY
FailedInstruction
.Leg createLeg(OutgoingSipRequest initialRequest, java.lang.String legName) throws DuplicateLegException
initialRequest
- OutgoingSipRequest
to be sent.legName
- the legName must be unique for this Sentinel SIP service instance.
The recommended format for the name is DuplicateLegException
- If leg already exists with the supplied name.Leg importAsNewLeg(javax.slee.ActivityContextInterface aci, java.lang.String legName, InitialLegPhase legPhase) throws DuplicateLegException
InitialLegPhase.CallSetup
or
InitialLegPhase.MidSession
). Associate the new leg with the provided ACI. Attach the Sentinel SIP
Service SBB to the ACI.aci
- ACI of new Leg. The ACI must have an activity of type SipSession. The created Leg is accessed in
the next feature invocation using the legName.legName
- the legName must be unique for this Sentinel SIP service instance.
The recommended format for the legName is legPhase
- InitialLegPhase
of Leg.DuplicateLegException
- If leg already exists with the supplied name.Leg importAsNewLeg(SipSession session, java.lang.String legName, InitialLegPhase legPhase) throws DuplicateLegException
InitialLegPhase.CallSetup
or
InitialLegPhase.MidSession
). Associate the new leg with the provided SipSession activity. Attach the SBB
to the ACI associated with the SipSession activity.session
- SipSession activity to be associated with the new Leg.legName
- the legName must be unique for this Sentinel SIP service instance.
The recommended format for the legName is legPhase
- InitialLegPhase
of Leg.DuplicateLegException
- If a leg already exists with the supplied legName.Leg importHandoverLeg(IncomingSipRequest handoverRequest, java.lang.String legName) throws DuplicateLegException
handoverRequest
- The handover request from the session to import.legName
- the legName must be unique for this Sentinel SIP service instance.
The recommended format for the legName is DuplicateLegException
- If a leg already exists with the supplied legName.void releaseLeg(Leg leg)
The action taken when processing the releaseLeg instruction can be:
The appropriate action will depend on the current state of the leg. If there is a terminating message in the MessagesToSend queue of the leg, this will be used where possible.
In the CANCEL-200 OK crossover case, the core will send ACK + BYE.
When the LegManager has sent the Error, BYE, CANCEL or NOTIFY on processing the releaseLeg instruction it will immediately remove the leg from the LegManager registry, although it may still be attached to the corresponding activity in the SLEE sense. I.e. using 'releaseLeg' features will get the impression that the leg has already gone, although the core might still wait for response events on it. Only when the core is certain that the leg release has been managed to completion will it actually detach from the activity in the SLEE sense.
Features which need a more fine-grained control over the release process should use a combination
of Leg#sendMessage(org.jainslee.resources.sip.SipMessage)
, Leg.sendCancel()
,
detachFromLeg(Leg leg)
.
leg
- Leg to release.void detachFromLeg(Leg leg)
leg
- Leg to detach.void detachFromAllLegs()
detachFromLeg(Leg)
.
Formerly known as terminateProcessing
.boolean isLegEnding(Leg leg)
leg
- The leg to check.boolean isLegInviteSessionEnding(Leg leg)
leg
- The leg to check.void proxySessionAndDoNotRecordRoute(Leg leg)
Note: If the leg is linked, the linked leg will be unlinked and detached.
leg
- the leg that received the initial request.void proxySessionAndDoNotRecordRoute(Leg leg, URI newRequestUri)
Note: If the leg is linked, the linked leg will be unlinked and detached.
leg
- the leg that received the initial request.newRequestUri
- the initial request will be proxied to this addressvoid proxySessionAndDoNotRecordRoute(Leg leg, URI[] newRequestUris)
Note: If the leg is linked (B2BUA feature) calling this method unlink the linked leg and detach it.
leg
- the leg that received the initial request.newRequestUris
- the initial request will be proxied to these destinationsProxyResult proxySessionInternal(Leg leg, URI newRequestUri)
Note: If the leg is linked, the linked leg will be unlinked and detached.
leg
- the leg that received the initial request.newRequestUri
- the initial request will be proxied to this addressLeg getLeg(java.lang.String legName)
The following well known leg names are used:
legName
- Unique name of the Leg.Leg getLeg(javax.slee.ActivityContextInterface aci)
aci
- ACILeg getLeg(SipSession session)
session
- SipSessionjava.util.Collection<Leg> getLegs()
int getLegCount()
void setCallingParty(java.lang.String legName)
legName
- LegName of Calling party.java.lang.String getCallingParty()
Leg getCallingPartyLeg()
void endSession()
During instruction processing end session will be performed on each leg.
void endSession(int endSessionCause)
endSession()
except that it uses the endSessionCause when ending all leg sessions.endSessionCause
- The reason (response code) to use for session termination.boolean isSessionEnding()
boolean isSessionReplicationEnabled()
boolean isSessionReplicationDisabled()
void enableSessionReplication()
void disableSessionReplication()
Copyright © OpenCloud. All Rights Reserved.