org.echarts.servlet.sip.utilities
Class VXMLRequestModifier

java.lang.Object
  extended by org.echarts.servlet.sip.utilities.RequestModifier
      extended by org.echarts.servlet.sip.utilities.VXMLRequestModifier

public class VXMLRequestModifier
extends RequestModifier

RequestModifier to be used for creating dialogs with VoiceXML media servers. Supports optional NonSipPort for control events.


Field Summary
static VXMLServerType DEFAULT_SERVER_TYPE
           
 
Constructor Summary
VXMLRequestModifier(java.lang.String httpUri, java.util.Properties params, java.lang.String vxmlServer, SipFactory factory)
          Creates a VXMLRequestModifier with supplied parameters.
VXMLRequestModifier(java.lang.String httpUri, java.util.Properties params, java.lang.String vxmlServer, SipFactory factory, CallbackStrategy callbackStrategy)
          Creates a VXMLRequestModifier with supplied parameters.
VXMLRequestModifier(java.lang.String httpUri, java.util.Properties params, java.lang.String vxmlServer, SipFactory factory, VXMLServerType serverType)
          Creates a VXMLRequestModifier with supplied parameters.
VXMLRequestModifier(java.lang.String httpUri, java.util.Properties params, java.lang.String vxmlServer, SipFactory factory, VXMLServerType serverType, CallbackStrategy callbackStrategy)
          Creates a VXMLRequestModifier with supplied parameters.
 
Method Summary
protected  void appendParam(java.lang.StringBuffer uriBuffer, java.lang.String propName, java.lang.String value)
           
protected  java.lang.String buildHttpUri(java.lang.String base, SipServletRequest req)
           
 URI getModifiedRequestURI(SipServletRequest req)
          Provide a modified Request-URI to use in outgoing SipServletRequest.
 
Methods inherited from class org.echarts.servlet.sip.utilities.RequestModifier
getModifiedFromAddress, getModifiedRoutes, modify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVER_TYPE

public static VXMLServerType DEFAULT_SERVER_TYPE
Constructor Detail

VXMLRequestModifier

public VXMLRequestModifier(java.lang.String httpUri,
                           java.util.Properties params,
                           java.lang.String vxmlServer,
                           SipFactory factory,
                           VXMLServerType serverType,
                           CallbackStrategy callbackStrategy)
Creates a VXMLRequestModifier with supplied parameters. Any parameters supplied in params will be encoded into HTTP URI that specifies the script. If the incoming request supplied to this RequestModifier contains URI parameters (except app, user, and transport), these will also be supplied to the VoiceXML script, overriding any parameters supplied in props. A supplied callbackStrategy may also add parameters to effect the callback.

Parameters:
httpUri - URI that media server will use to fetch VoiceXML script
params - key-value pairs to be passed to VoiceXML script
vxmlServer - hostname of VoiceXML media server
factory - reference to SipFactory
serverType - type of VoiceXML media server
callbackStrategy - strategy for vxml-serving application to call back to this instance (can be null)

VXMLRequestModifier

public VXMLRequestModifier(java.lang.String httpUri,
                           java.util.Properties params,
                           java.lang.String vxmlServer,
                           SipFactory factory,
                           VXMLServerType serverType)
Creates a VXMLRequestModifier with supplied parameters. Any parameters supplied in params will be encoded into HTTP URI that specifies the script. If the incoming request supplied to this RequestModifier contains URI parameters (except app, user, and transport), these will also be supplied to the VoiceXML script, overriding any parameters supplied in props. No callback strategy will be employed.

Parameters:
httpUri - URI that media server will use to fetch VoiceXML script
params - key-value pairs to be passed to VoiceXML script
vxmlServer - hostname of VoiceXML media server
factory - reference to SipFactory
serverType - type of VoiceXML media server

VXMLRequestModifier

public VXMLRequestModifier(java.lang.String httpUri,
                           java.util.Properties params,
                           java.lang.String vxmlServer,
                           SipFactory factory,
                           CallbackStrategy callbackStrategy)
Creates a VXMLRequestModifier with supplied parameters. Any parameters supplied in params will be encoded into HTTP URI that specifies the script. If the incoming request supplied to this RequestModifier contains URI parameters (except app, user, and transport), these will also be supplied to the VoiceXML script, overriding any parameters supplied in props. A supplied callbackStrategy may also add parameters to effect the callback. The NETANN protocol will be used to contact the media server.

Parameters:
httpUri - URI that media server will use to fetch VoiceXML script
params - key-value pairs to be passed to VoiceXML script
vxmlServer - hostname of VoiceXML media server
factory - reference to SipFactory
callbackStrategy - strategy for vxml-serving application to call back to this instance (can be null)

VXMLRequestModifier

public VXMLRequestModifier(java.lang.String httpUri,
                           java.util.Properties params,
                           java.lang.String vxmlServer,
                           SipFactory factory)
Creates a VXMLRequestModifier with supplied parameters. Any parameters supplied in params will be encoded into HTTP URI that specifies the script. If the incoming request supplied to this RequestModifier contains URI parameters (except app, user, and transport), these will also be supplied to the VoiceXML script, overriding any parameters supplied in props. The NETANN protocol will be used to contact the media server. No callback strategy will be employed.

Parameters:
httpUri - URI that media server will use to fetch VoiceXML script
params - key-value pairs to be passed to VoiceXML script
vxmlServer - hostname of VoiceXML media server
factory - reference to SipFactory
Method Detail

getModifiedRequestURI

public URI getModifiedRequestURI(SipServletRequest req)
Description copied from class: RequestModifier
Provide a modified Request-URI to use in outgoing SipServletRequest. Base class returns null (no change).

Overrides:
getModifiedRequestURI in class RequestModifier
Parameters:
req - request on which to base modified Request-URI
Returns:
desired Request-URI, or null if no change

buildHttpUri

protected java.lang.String buildHttpUri(java.lang.String base,
                                        SipServletRequest req)
Parameters:
req -
uriBuffer -

appendParam

protected void appendParam(java.lang.StringBuffer uriBuffer,
                           java.lang.String propName,
                           java.lang.String value)