org.echarts.servlet.sip.machines
Class CallFSM

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.CallFSM
All Implemented Interfaces:
java.io.Serializable


public class CallFSM
extends TransitionMachine

Places a new call on a fresh port. This machine acts as user agent client (UAC) and sends an INVITE request. If a success final response (2xx) is received, this machine sends ACK and transitions to SUCCESS state. If a failure final response (>=300) is received, this machine transitions to FAILURE state.

See Also:
Serialized Form

Field Summary
static java.lang.String EARLY_MEDIA_RESPONSE
           
static java.lang.String FINAL_RESPONSE
           
 
Constructor Summary
CallFSM(SipPort p)
          Place call with INVITE already created on p
CallFSM(SipPort p, Address fromAddress, Address toAddress, java.lang.Object sdp, java.util.Properties headers)
          Place call from fromAdress to toAddress on port p with specified sdp, setting headers.
CallFSM(SipPort p, SipServletRequest origInvite, URI ruri)
          Continue call with savedInvite updated to go to ruri
CallFSM(SipPort p, URI fromuri, URI ruri, java.lang.Object sdp)
          Place call from fromuri to ruri on port p with specified sdp.
CallFSM(SipPort p, URI fromuri, URI ruri, java.lang.Object sdp, java.util.Properties headers)
          Place call from fromuri to ruri on port p with specified sdp, setting headers.
 
Method Summary
 ProvisionalResponse getEarlyMediaResponse()
          Get early media response received (if any).
 FinalResponse getFinalResponse()
          Get received final response.
 
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

EARLY_MEDIA_RESPONSE

public static final java.lang.String EARLY_MEDIA_RESPONSE
See Also:
Constant Field Values

FINAL_RESPONSE

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

CallFSM

public CallFSM(SipPort p,
               URI fromuri,
               URI ruri,
               java.lang.Object sdp,
               java.util.Properties headers)
        throws java.lang.Exception
Place call from fromuri to ruri on port p with specified sdp, setting headers. If sdp is null, INVITE has no message content.

Throws:
java.lang.Exception

CallFSM

public CallFSM(SipPort p,
               Address fromAddress,
               Address toAddress,
               java.lang.Object sdp,
               java.util.Properties headers)
        throws java.lang.Exception
Place call from fromAdress to toAddress on port p with specified sdp, setting headers. If sdp is null, INVITE has no message content.

Throws:
java.lang.Exception

CallFSM

public CallFSM(SipPort p,
               URI fromuri,
               URI ruri,
               java.lang.Object sdp)
        throws java.lang.Exception
Place call from fromuri to ruri on port p with specified sdp. If sdp is null, INVITE has no message content.

Throws:
java.lang.Exception

CallFSM

public CallFSM(SipPort p,
               SipServletRequest origInvite,
               URI ruri)
        throws java.lang.Exception
Continue call with savedInvite updated to go to ruri

Throws:
java.lang.Exception

CallFSM

public CallFSM(SipPort p)
        throws java.lang.Exception
Place call with INVITE already created on p

Throws:
java.lang.Exception
Method Detail

getFinalResponse

public FinalResponse getFinalResponse()
Get received final response.


getEarlyMediaResponse

public ProvisionalResponse getEarlyMediaResponse()
Get early media response received (if any). May return null.