To access the Genesys API function RouteRequest, use the VoiceXML <object> element as described here.
This Genesys API function is accessed by using the VoiceXML <object> element to call an intermediate Java application supplied with Blueworx Voice Response Version 7.
Some Genesys properties have to be configured before using this API function:
Property | Optional | Usage |
---|---|---|
setGCTIActionToInvoke | No | The Genesys API function to invoke: RouteRequest |
setGCTIUData | Yes | User data to be set on the Genesys API call and subsequently stored in the Genesys Framework. |
setGCTIUDataSeparatorCharacter | Yes | Valid separator characters for use in the user
data specified by setGCTIUData are: : ; , . | ! ^ * + - ~ #The default value is a colon (:). The separator character defined by setGCTIUDataSeparatorCharacter overrides any optional AAI separator character specified using the AAIKVPSeparator keyword in VRBE configuration file default.cff. See Secondary keywords. |
The user data is specified in a key value pair, the key and value are delimited by the equals. Multiple key value pairs can be specified, and these must be delimited by one valid separator character defined by the setGCTIUDataSeparatorCharacter property. The default is a colon. For example:
key1=value1:key2=value2:key3=value3
The RouteRequest is used to make the Genesys URS route the call. It is used to signal that the call has finished being processed by Blueworx Voice Response and should now be routed.
Each value in the VoiceXML definition is mapped across to an object property as shown in the following table:
Property | VoiceXML Value | Optional |
---|---|---|
setGCTIRouteDN | RouteDN | No |
setGCTIRouteCED | CED | Yes |
The number to route to is returned in the variable routeNumber in the VoiceXML object. For example, if the VoiceXML object name is gcti, the number to route to is assigned to the gcti.routeNumber variable.
The RouteRequest function returns a completion code which is stored in the VoiceXML object. The variable is completionCode and can either be 0 for success or another number for failure. For example, if the VoiceXML object is gcti, the completion code is assigned to the gcti.completionCode variable.
<form id="gcti_routerequest">}} <object name="gcti" classid="method://com.ibm.wvr.vxml2.NativeAppSupport/invokeGCTI" type="javacode-ext"> <param name="setGCTIActionToInvoke" value="RouteRequest"/> <param name="setGCTIRouteDN" value="3000"/> <param name="setGCTIRouteCED" value="1234567890"/> <filled> <log>Number is: <value expr="gcti.routeNumber"/></log> </filled> </object> <block> <log>Completion code is: <value expr="gcti.completionCode"/></log>}} </block> </form>
This example sets up the following key value pairs of data:
<form id="gcti_routerequest"> <object name="gcti" classid="method://com.ibm.wvr.vxml2.NativeAppSupport/invokeGCTI" type="javacode-ext"> <param name="setGCTIActionToInvoke" value="RouteRequest"/> <param name="setGCTIUData" value="First=John:Last=Smith:Service=Gas"/> <param name="setGCTIRouteDN" value="3000"/> <param name="setGCTIRouteCED" value="1234567890"/> <filled> <log>Number is: <value expr="gcti.routeNumber"/></log> </filled> </object> <block> <log>Completion code is: <value expr="gcti.completionCode"/></log> </block> </form>
<form id="gcti_routerequest"> <object name="gcti" classid="method://com.ibm.wvr.vxml2.NativeAppSupport/invokeGCTI" type="javacode-ext"> <param name="setGCTIActionToInvoke" value="RouteRequest"/> <param name="setGCTIUData" value="First=John;Last=Smith;Service=Gas"/> <param name="setGCTIUDataSeparatorCharaCharacter" value="';'"/> <param name="setGCTIRouteDN" value="3000"/> <param name="setGCTIRouteCED" value="1234567890"/> <filled> <log>Number is: <value expr="gcti.routeNumber"/></log> </filled> </object> <block> <log>Completion code is: <value expr="gcti.completionCode"/></log> </block> </form>