org.echarts.servlet.sip.machines
Class B2buaInviteFSM

java.lang.Object
  extended by org.echarts.Machine
      extended by org.echarts.StateMachine
          extended by org.echarts.TransitionMachine
              extended by org.echarts.servlet.sip.machines.B2buaInviteFSM
All Implemented Interfaces:
java.io.Serializable


public class B2buaInviteFSM
extends TransitionMachine

This is a fragment for acting as a B2BUA to relay an initial INVITE request.

This machine reaches terminal state when the SIP dialog is confirmed (i.e. INVITE-200 OK-ACK), or when the INVITE transaction is terminated with a non-2xx final response.

Similar to the RI/TCK sample B2BUA application (version 1.0.9), there are two protocol level race conditions:

1) CANCEL to callee and 200 OK to INVITE from callee crossed: (RFC3261 sec 15) Because the container has already sent 487 to caller, the application should send ACK then BYE to callee to terminate the callee side.

2) CANCEL from caller and 200 OK to INVITE to caller crossed: (JSR116 sec 7.2.3) In the case where container receives CANCEL before application tries to send 200 OK to INVITE to caller side, the send() will throw IllegalStateException. This exception should be caught, and the application sends ACK then BYE to callee side to terminate the callee side dialog.

Case (1) is handled by this machine. Case (2) is not currently handled.

See Also:
Serialized Form

Field Summary
static java.lang.String PENDING_REQUEST
           
 
Constructor Summary
B2buaInviteFSM(FeatureBox box, SipPort caller, SipPort callee, RequestModifier reqModifier)
          Used when this FSM is invoked by a parent FSM.
 
Method Summary
 FinalResponse getFailureResponse()
          Get received failure response to outgoing INVITE request.
 Bye getReceivedBye()
           
 SuccessResponse getSuccessResponse()
          Get received success response to outgoing INVITE request.
 
Methods inherited from class org.echarts.TransitionMachine
addMessagelessTransition, addMessageTransition, globalStateString, globalStateString, initializeMessagelessTransitions, initializeMessageTransitions, initializeRoot, localStateString, localStateString, removePort, run, run, runNoQueueing
 
Methods inherited from class org.echarts.StateMachine
setMachineDebugging, setMachineMonitor, setMachineMonitoring
 
Methods inherited from class org.echarts.Machine
getDefaultMachineDebugging, getDefaultMachineDebuggingGlobalStateOutput, getDefaultMachineMonitor, getDefaultMachineMonitorFilter, getDefaultMachineMonitoring, getMachineDebugging, getMachineDebuggingGlobalStateOutput, getMachineID, getMachineIndex, getMachineMonitor, getMachineMonitoring, getParentMachine, getRootMachine, getSystemDebugging, getSystemMonitoring, putEvent, setDebugging, setDefaultMachineDebugging, setDefaultMachineDebuggingGlobalStateOutput, setDefaultMachineMonitor, setDefaultMachineMonitorFilter, setDefaultMachineMonitoring, setMachineDebuggingGlobalStateOutput, setSystemDebugging, setSystemMonitoring, statePathString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PENDING_REQUEST

public static final java.lang.String PENDING_REQUEST
See Also:
Constant Field Values
Constructor Detail

B2buaInviteFSM

public B2buaInviteFSM(FeatureBox box,
                      SipPort caller,
                      SipPort callee,
                      RequestModifier reqModifier)
               throws java.lang.Exception
Used when this FSM is invoked by a parent FSM.

Throws:
java.lang.Exception
Method Detail

getSuccessResponse

public SuccessResponse getSuccessResponse()
Get received success response to outgoing INVITE request. May be null.


getFailureResponse

public FinalResponse getFailureResponse()
Get received failure response to outgoing INVITE request. May be null.


getReceivedBye

public Bye getReceivedBye()