<reprompt/>tag, to play custom messages for the specific occurrence of an exception event, to execute script code, or to abandon the effort altogether by moving on to a new form using <goto>.
<catch>elements and finds the highest count value that is less than or equal to the current count.
<catch>event handler. You may have noticed above that we defined the same event for the third occurrence of both the noinput and nomatch events. We could consolidate the above example to use the same actions for both nomatch and noinput events as such:
<catch>tag, rather than simply repeating the same prompts to the user, we can offer increasingly detailed prompt messages by using the prompt “count” attribute.
C: Enter your customer identification number. <prompt counter = 1> H: <enters 1 2 3> C: Your input was not valid. Enter your seven digit customer identification number. <prompt counter = 2> H: <enters 1 4 5> C: Your input was not valid. Your customer identification number can be found on the front of your membership card. Enter your seven digit customer identification number. <prompt counter = 3> H: <enters 1 2 3 4 5 6> C: It seems you are having difficulty with your identification number, we will transfer you to customer service. <transfer user to customer service>
<value expr/>expression converts the contents of “id” into a string for playback and the application states what the user entered for their “id”. If the user did not enter 7 digits, the if conditional would be false and go to the else conditional. The application would say to the user, “Invalid ID number. Please check the number and try again.” The “id” variable would be cleared with the
<clear>tag and the application would re-prompt the user for their customer identification number.
<goto>tag. The next example demonstrates how we can use the
<goto>tag to navigate our way through an application:
<goto>tag to bring you to any one of these forms, as long as you specify the “id” for that form.
<menu>tag is a convenient way for you to create a single anonymous field in your application that prompts the user to make a choice and then transitions to a different place in your application based on the user's choice. Let's look at an example that navigates through the application using the
<goto>tag points to “mainmenu”, which is specified as the “id” of the
<menu>tag. Inside this
<menu>tag, there are 3
<choice>tags that bring the user to their specified choice based on their input of 1, 2, or 3. Notice that these
<choice>tags also use the “next” attribute to point to an “id” of a
<form>. So, if the user enters DTMF-1, the application will go to the
<form>block with an “id” of “sales”. If the user enters DTMF-2, the application will go to the
<form>block with an “id” of “support”. If the user enters DTMF-3, the application will go to the
<form>block with an “id” of “directory”.
<goto>tag to navigate within your document, you can also use it to navigate through multiple VoiceXML documents.
goto>tag to transition to the VoiceXML document, “nextdocument.vxml”. In “nextdocument.vxml”, the application says “Goodbye World!” and then the application ends. Keep in mind that when you use the <goto> tag to transition to another VoiceXML document, data that was collected in your original document is lost when the new document is executed.
<data>tag. The interaction between the platform and application server is a series of HTTP GETs or HTTP POSTs where the application server processes these requests and returns valid VoiceXML.
<submit>tag, it completes a GET or POST that will trigger a page transition. Once the GET or POST is complete, the new document will be parsed and executed and the previous VoiceXML document will be discarded. For example, you can collect information through document level variables and send those variables through the
<submit>tag to your application server script.
<subdialog>tag to exchange data between Plum DEV and application server. The
<subdialog>tag is similar to a function call executed by a GET or POST. It allows you to execute a new VoiceXML document in a new context, but once the
<subdialog>is complete, control will be returned to the parent document at the same location that the subdialog was called.
<subdialog>tag to transition to “collectinfo.vxml” Once we're in “collectinfo.vxml”, we collect the “customerid” and “age” from the user and return these field variables back to “subdialog.vxml” by using the
<return>tag. Once we're back in “subdialog.vxml”, we can refer to “customerid” and “age” by simply adding a “.” and then the name of the variable following “info”. So, the customer identification number would be referred as “info.customerid” and age would be referred as “info.age” in the original document.
<data>tag, it differs from the <subdialog> tag in that it does not execute a remote VoiceXML document, but instead expects the remote application to return an XML result. This XML file is then mapped directly into an ECMAScript DOM object for Plum DEV to reference as a variable.
<data>tag. So, in this case, to reference “Mister Bond” from “verification.xml”, you would refer to it as “verification.documentElement.firstChild.toString()” in “collectinfo.vxml”.
<record>tag is an input item that collects a recording from the user. A reference to the recorded audio is stored in the input item variable, which can be played back (using the expr attribute for the
<value>tag) or submitted to a server (using the
<record>tag that can help you adjust recording settings for the user. For example, to adjust the maximum duration of time for the user, you would use the attribute, “maxtime”. This maximum duration has a limit of 1 hour. To adjust the amount of time the user has before the recording stops, you would use the attribute, “finalsilence”. The maximum “finalsilence” time is 5 minutes. If you want the user to be able to terminate the recording by pressing any DTMF key, you could use the attribute, “dtmfterm”.
<record>tag, the recording is not stored on our servers. The recording can only be played back by means of the “expr” attribute of the
<value>tag or submitted to your server to be stored by means of the
<property>element sets a property value. Properties are used to set values that affect platform behavior, such as the recognition process, timeouts, caching policy, etc.
<vxml>level, for a particular dialog at the
<menu>level, or for a particular form item. Properties apply to their parent element and all the descendants of the parent. A property at a lower level overrides a property at a higher level. When different values for a property are specified at the same level, the last one in document order applies.
C: You will only be able to enter digits. H: Twelve. C: (ignores spoken input) Enter a number on your keypad. H: (enters DTMF-1 DTMF-2) C: You entered twelve.
C: You must… H: One two. C: …listen to this message. C: Say any number of… H: One two. C: You said one two.