shadow_variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

shadow_variables [2019/03/07 13:03]
admin
shadow_variables [2020/01/09 16:04]
Line 1: Line 1:
-====== Shadow Variables ====== 
  
-VoiceXML uses standard variable systems. This means that Fuse+ does too, because it is built on VoiceXML. Standard variable systems allow users to create their own variables and manipulate them directly. ​ 
- 
- 
- 
----- 
-==== Global Shadow Variables ==== 
- 
-Fuse+ allow access to global session variables that contains information about the current call. The //session// variable is a complex object that contains properties. Sometimes those properties have properties of their own.  
- 
-Because these variables are global variables, there will be no need to use the '​$'​ notation to access them. 
- 
- 
-\\ In Fuse, users might want to access the following session properties: ​ 
-\\  
-\\  
-{{tablelayout?​colwidth="​260px"​}} 
-^ Global Variable ^ Explanation ^ 
-| session.connection.ani | Caller'​s number |  
-| session.connection.dnis | Dialed number for this call. This is useful for applications that have multiple number deployments and would like to identify which number the caller has dialed. |  
-| session.connection.callee_type | Only for outbound calls, see [[outbound#​callee-type-detection|Callee Type Detection]] |  
-| session.id | Unique ID for this call |  
-| session.connection.protocol.sip.headers | only for SIP-in calls |  
-| session.name | Name of the current active Fuse+ application |  
- 
- 
----- 
-==== Last Result Shadow Variables ==== 
- 
-When collecting input or interacting with a REST web service, oftentimes information exists in addition to the “response” data that users may want to access. Shadow variables allow users to access this additional data. 
- 
-Adding a ‘$’ symbol to the end of a variable, automatically creates a shadow variable for that variable. The shadow variable will contain different member variables depending on the type of input or web service it is being used with. For example, with an input "​credit_card"​ you can determine the confidence of the grammar engine match by accessing "​credit_card$.confidence"​. 
- 
- 
-This variable is filled in the case of both a match or a nomatch. Lastresult$ allows users to get the list of all possible matches, not just the best match. In the event that speech input exists for the variable in use, lastresult$ can also provide a recording of the utterance spoken by the user (for speech input). 
- 
-Having access to this data, even in the "​nomatch"​ case, allows users to send DTMF input off without requiring a match, or to send the utterance recording somewhere (perhaps to transcription). 
- 
-Users can also access the "​n-best"​ results if there were multiple matches by accessing "​$lastresult[i]"​ where "​i"​ represents the position in the list of matches (0 is the best match, 1 is second best, etc.). 
- 
-The common lastresult$ properties are (https://​www.w3.org/​TR/​voicexml20/#​dml5.1.5):​ 
-\\ 
-\\ 
-  * lastresult$.confidence 
-  * lastresult$.utterance 
-  * lastresult$.inputmode 
-  * lastresult$.interpretation 
-  * lastresult$.recording (only for speech input) 
-  * lastresult$.length 
-  * lastresult$[i].confidence 
-  * lastresult$[i].utterance 
-  * lastresult$[i].inputmode 
-  * lastresult$[i].interpretation 
- 
- 
----- 
-==== Module Specific Shadow Variables ==== 
- 
- 
-Some modules in Fuse have specific shadow variable associated with them. \\ "​name"​ below refers to the actual name of the module. 
- 
- 
----- 
-=== Call-Flow Modules === 
- 
-The [[modules:​transfer|Transfer module]] provides a shadow variable (https://​www.w3.org/​TR/​voicexml20/#​dml2.3.7) 
-\\ 
-\\ 
-  * name$.duration 
- 
----- 
-=== Input Modules === 
- 
-For [[modules#​input1|input modules]], a standard set of shadow variables exist (https://​www.w3.org/​TR/​voicexml20/#​dml2.3.1):​ 
-\\ 
-\\ 
-  * name$.utterance 
-  * name$.inputmode 
-  * name$.interpretation 
-  * name$.confidence 
- 
- 
-\\ For the [[modules:​record|Record]] ( {{:​record.svg?​nolink&​16x16|}} ) module, a slightly different set of shadow variables exist (https://​www.w3.org/​TR/​voicexml20/#​dml2.3.6):​ 
-\\ 
-\\ 
-  * name$.duration 
-  * name$.size 
-  * name$.termchar 
-  * name$.maxtime 
- 
----- 
-=== Data Modules === 
- 
-The [[modules:​rest|REST]] ( {{:​rest.svg?​nolink&​16x16|}} ) web service module provides some custom shadow variables: 
-\\ 
-\\ 
-  * name$.http_code 
-  * name$.headers (object indexed by header name) 
-  * name$.raw_headers (0-indexed array containing all header strings) 
-  * name$.error (only in the event of an error) 
shadow_variables.txt · Last modified: 2020/01/09 16:04 (external edit)