Accessing SIP and Call Transfer tags from your voice application

This section describes how to access SIP tags (and how to control call transfer operations) by using the SV54x System Variables, and how to set and get these System Variables from State Table SIP applications and other types of SIP application.

Using state tables, the only way to access SIP tags (and to control call transfer operations) is by using the SV54x System Variables, and the only way to set and get these System Variables from State Tables is using the SetTag and GetTag options of the AssignData state table actions.

If your SIP application is coded in State Tables, the SV54x System Variables can be accessed directly from your application.

If your SIP application is coded in the Voice Response Beans Environment (VRBE ), the SV54x system variables must be accessed using an intermediate State Table called using a VRBE Compatibility Bean.

If your SIP application is coded in VoiceXML, the SV542 system variable can be accessed using protocol-independent connection-related variables. For more information, see Using Blueworx Voice Response call tags. The SV541 and SV542 system variables must be accessed using an intermediate State Table called using the VoiceXML Object Tag.

The SV541 and SV542 system variables can be accessed using protocol-independent connection-related variables in CCXML applications. For more information, see Using Blueworx Voice Response call tags.

Using an intermediate State Table to access tags

Although it is possible to create a single state table that sets a number of tags at the same time or to use a single state table to decode a parameter and to set one of a number of SIP tags accordingly, the simplest approach is to have a number of separate state tables to do individual things like “Set To Header”, “Set From Header” and so on.

The following is the ASCII source for a simple state table that sets the To_Header prior to doing a Call Transfer operation. Note that this state table has one entry point (Start) and is called with a single parameter (to_header):

DESCRIPTION ("Sets SIP To Header for transfer");
ENTRY_POINT (Start,Start);
INPUT STRING to_header;
Start: "Set SV541 to sip to header"
AssignData (SV541, "PUT_TAG", "TO_HDR", to_header);
ExitStateTable (0);

Calling a State Table from VoiceXML

The VoiceXML Object Tag is used as shown in the following example to call a State Table. This calls the State Table SetToHdr at entry point Start with a single parameter sip:4444@9.20.114.23 (which is passed into the State Table as the to_header Input String).

<object name="sipTransfer" codetype="javacode-ext"
  classid="method://com.ibm.wvr.vxml2.NativeAppSupport/invokeStateTable">
    <param name="setName" value="SetToHdr"/>
    <param name="setEntryPoint" value="Start"/>
    <param name="setEncoding" value="UTF-8" />
    <param name="setParms" expr="new Array('sip:4444@9.20.114.23')"/>
</object>

For additional details on the use of the object tag to call a Blueworx Voice Response State Table, seeInvoking a State Table using Voice XML.