Catch tag
Definition
- The goto attribute within this tag will execute when the defined value occurs. This goto executes immediately, interrupting the currently running script. The "Catch" tag is only available using the XML Editor, not the IVR Designer.
Value
- The contents within this tag are the tags to watch for the special catch scenario.
Attributes
-
|
|
| Attribute
| Required
| Values
| Description
|
| name
| N
| any text
| a unique name for the tag
|
| type
| Y
| hangup digit
| defines type of user input
|
| value
| Y
| 0 - 9 or *
| Required when type="digit". Not required for "hangup".
|
| goto
| Y
| any node
| any pre-defined node name
|
-
Examples
- The following example shows a "catch" of the digit "0" automatically sending it to the Operator:
|
|
<catch name="OperatorCall" type="digit" value="0" goto="OpCall">
<menu>
<play type="tts"
voice="female2">
Please enter "one" if you agree. Enter zero at any time to reach an operator.
</play>
<keypress pressed="1">
<stash varname="question1">1</stash>
</keypress>
</menu>
</catch>
<transfer name="OpCall" callerid=${call.callerid}>2135551212</transfer>
- The following occurs when the call is hung up. It takes certain information and stashes it in the Call Details Report before the IVR terminates:
|
|
<catch name="hangup" type="hangup" goto="HangupSave">
<menu name="Menu2">
<play type="tts"
voice="female2">
Please enter "one" for strongly agree
or "nine" for strongly disagree.
</play>
<keypress pressed="Default">
<stash varname="question2">${call.lastinput}</stash>
</menu>
</catch>
<stash name="HangupSave" varname=CallerInfo">${call.callerid}</stash>
Usage Scenarios
- Skip to a particular action
- Can be used when you tell users "Press zero (or any other digit you designate) at any time to reach an operator." Place all nodes for which you want the catch tag to operate within the catch tag, and use the "goto" attribute in the catch tag to transfer to your operator.
- Capture required information before hangup
- Can also be used to finish running several nodes in the event of a hangup. Create a section of nodes you want carried out (such as stash tags, setvar tags, get tags if you wish to move information to a server to be acted upon), and set the "goto" attribute to the node name for that section. If the hangup occurs within the catch tag, the goto will execute.
Also See
-
This tag supports CallFire XML Javascript