Using Blueworx Voice Response call tags

You can incorporate information associated with Blueworx Voice Response call tags, which convey information from a signaling process, to a VoiceXML document. The tags map to Blueworx Voice Response system variable SV542, which contains information about an incoming call such as calling party data or the service to which they wish to be connected.

Each call tag has a number of attributes but the tags and attributes that are available depends on the telephony signaling protocol being used and the current connection state.

For full details of Blueworx Voice Response call tags and how to use them with state tables, refer to Call Tag variables in the Blueworx Voice Response for AIX: Application Development using State Tables information. Information on how to use call tags with VoiceXML is provided here.

The specification for VoiceXML defines some protocol-independent connection-related variables that can be used to return related connection data. Blueworx Voice Response for AIX Version 7 supports such session variables for the SIP protocol. The settings for the protocol independent connection variables defined by VoiceXML are listed in Table 1:

Table 1. VoiceXML protocol independent connection variables
Connection Variable Possible Value
session.connection.aai Set based on the protocol, as follows:
SIP
The setting of the value associated with the aai or uui keyword in the incoming REQ_HDR (see below for a full explanation)
session.connection.protocol.name "sip"
session.connection.protocol.version 0

The settings for the generic protocol specific variables defined by VoiceXML are listed in Table 2:

Table 2. VoiceXML generic protocol specific variables
Variable Possible Value
session.connection.protocol.PROTOCOL.protocol.value

So for SIP:

session.connection.protocol.sip.protocol.value
"sip"
session.connection.protocol.PROTOCOL.protocol.variant

So for SIP:

session.connection.protocol.sip.protocol.variant
RFC3261
session.connection.protocol.PROTOCOL.protocol.num

So for SIP:

session.connection.protocol.sip.protocol.num
33

All protocol specific call tags and attributes supported by Blueworx Voice Response are also available as independent VoiceXML variables (in lower case), if the tag data is present in the call. Tags are returned as a key where the key is the tag name. To read a tag value use key.value, to read an attribute use key.attribute_name. All key and attribute_names are in lower case. The tag and attribute values returned have their case preserved.

Using call information in VoiceXML

In SIP, the TO_HDR tag contains header data. The corresponding VoiceXML variables are:

session.connection.protocol.sip.to_hdr
session.connection.protocol.sip.to_hdr.value

To check if this variable is currently in use, you can use the approach in the following SIP example:

<if cond="session.connection.protocol.sip.to_hdr != undefined">
   <log>;session.connection.protocol.sip.to_hdr.value:
      <value expr="session.connection.protocol.sip.to_hdr.value"/>
   </log>
</if>

Using the SIP REQ_HDR call tag information in VoiceXML is more complicated because any key value pairs after the first terminator (";" or "&") on the REQ_HDR call tag are returned as variables. For example, the following REQ_HDR:

<'REQ_HDR'='sip:1001@kroner.hursley.blueworx.com;uui=uui1;aai=aai1;
            voicexml=Weather.vxml;maxage=3600;maxstale=0'>

resolves to the following independent VoiceXML session.* variables shown in the following VoiceXML example:

<log>session.connection.protocol.sip.req_hdr.value:
     <value expr="session.connection.protocol.sip.req_hdr.value"/></log>
<log>session.connection.protocol.sip.req_hdr.aai:
     <value expr="session.connection.protocol.sip.req_hdr.aai"/></log>
<log>session.connection.protocol.sip.req_hdr.uui:
     <value expr="session.connection.protocol.sip.req_hdr.uui"/></log>
<log>session.connection.protocol.sip.req_hdr.voicexml:
     <value expr="session.connection.protocol.sip.req_hdr.voicexml"/></log>
<log>session.connection.protocol.sip.req_hdr.maxage:
     <value expr="session.connection.protocol.sip.req_hdr.maxage"/></log>
<log>session.connection.protocol.sip.req_hdr.maxstale:
     <value expr="session.connection.protocol.sip.req_hdr.maxstale"/></log>

The last key of aai in the REQ_HDR tag is also mapped into the session.connection.aai session variable. If no aai keys are present, the last uui key is mapped. If no aai or uui keys are present, the session.connection.aai session variable is empty.

Note: The Blueworx Voice Response SIP stack:
  • Converts all items following the terminator character in the REQ_HDR call tag to lowercase.
  • Only supports ";" not "&" as a terminator character on the SIP REQ_HDR call tag.

Using SIP CALLID_HDR and CALLINFO_HDR tags

For an incoming call, the SIP CALLID_HDR and CALLINFO_HDR tags can be used in a similar way if these have been configured for processing in configuration file /usr/lpp/dirTalk/db/sys_dir/voip/siphdrtags.cfg. See How Blueworx Voice Response processes incoming SIP Invites for more information.

To access CALLID_HDR and CALLINFO_HDR in VoiceXML, use the connection variables shown in the following table:

Table 3. Accessing SIP CALLID_HDR and CALLINFO_HDR headers
Variable Content
session.connection.protocol.sip.callid_hdr.value Call-ID
session.connection.protocol.sip.callinfo_hdr.value Full Call-Info
session.connection.protocol.sip.callinfo_hdr.count The number of Call-Info headers present
session.connection.protocol.sip.callinfo_hdr.infoN.uri The URI for Call-InfoN
session.connection.protocol.sip.callinfo_hdr.infoN.purpose The purpose for Call-InfoN (if present in the header)
session.connection.protocol.sip.callinfo_hdr.infoN.infoparam The infoparam for Call-InfoN (if present in the header), where infoparam is the name of an information parameter present in the information, for example, icon or card.
In this example, the source Call-Info header contains the following:
<http://www.code.com/my-picture.jpg>;purpose=icon
<http://www.example.com/alice/>;purpose=info
<http://www.google.com>;purpose=info;username=access;single
session.connection.protocol.sip.callinfo_hdr.value:
	<http://www.code.com/my-picture.jpg>;purpose=icon,
	<http://www.example.com/alice/>;purpose=info,
	<http://www.google.com>;purpose=info;username=access;single=
session.connection.protocol.sip.callinfo_hdr.count: 3
session.connection.protocol.sip.callinfo_hdr.info1.uri: http://www.code.com/my-picture.jpg
session.connection.protocol.sip.callinfo_hdr.info1.purpose: icon
session.connection.protocol.sip.callinfo_hdr.info2.uri: http://www.example.com/alice/
session.connection.protocol.sip.callinfo_hdr.info2.purpose: info
session.connection.protocol.sip.callinfo_hdr.info3.uri: http://www.google.com
session.connection.protocol.sip.callinfo_hdr.info3.purpose: info
session.connection.protocol.sip.callinfo_hdr.info3.username: access
session.connection.protocol.sip.callinfo_hdr.info3.single:

Using other SIP header tags

For an incoming call, other, non-standard SIP header tags can be used in a similar way if these have been configured for processing in configuration file /usr/lpp/dirTalk/db/sys_dir/voip/siphdrtags.cfg. See How Blueworx Voice Response processes incoming SIP Invites for more information.

To access other SIP header information in VoiceXML, use the connection variables as in the following generic example:

<if cond="session.connection.protocol.sip.header name != undefined">
   <log>session.connection.protocol.sip.header name.value:
      <value expr="session.connection.protocol.sip.header name.value"/>
   </log>
<else/>
   <log>session.connection.protocol.sip.header name.value: undefined</log>
</if>

Examples

A SIP header with the name supported:

<if cond="session.connection.protocol.sip.supported != undefined">
   <log>session.connection.protocol.sip.supported.value:
      <value expr="session.connection.protocol.sip.supported.value"/>
   </log>
<else/>
   <log>session.connection.protocol.sip.supported.value: undefined</log>
</if>

A SIP header with a name that includes a special character, such as ‘-’, user-to-user:

<if cond="session.connection.protocol.sip['user-to-user'] != undefined">
   <log>session.connection.protocol.sip['user-to-user'].value:
      <value expr="session.connection.protocol.sip['user-to-user'].value"/>
   </log>
<else/>
   <log>session.connection.protocol.sip['user-to-user'].value: undefined</log>
</if>

A SIP header with the name allow:

<if cond="session.connection.protocol.sip.allow != undefined">
   <log>session.connection.protocol.sip.allow.value:
      <value expr="session.connection.protocol.sip.allow.value"/></log>
<else/>
   <log>session.connection.protocol.sip.allow.value: undefined</log>
</if>

Using arbitrary SIP headers with outgoing calls

For details of how to use arbitrary SIP headers with outgoing calls, see Using outbound arbitrary SIP headers in Voice XML and Call Control XML.