We have seen three different ways of using it in this file:
assign(digit $return) ]]> return ("zero")Essentially,
is used to define what should be done as a result of this item. In
the first case, we assign the value returned from the called rule to a variable. In the
second case, we assign the value of the variable to a field in the VXML file. We enclose
it in CDATA as we have < and > in the value. The last case is used in rules that are
called from other rules. In this case, we return the value zero. Returning values like
this allows us to keep the assignment to the VXML field in a single place; and calling
another rule from the main rule allows us to keep things modular and flexible.
Keep a Watch on Your Syntax
Make sure you make your VXML and grXML files in correct syntax.
Wrong syntax is the cause of major development problems in voice
applications. As a test, you can open the XML file with a web browser and
verify that all tags are nested correctly.
If you still have problems, check the messages in the Log Viewer.
??? ??? ???
Chapter 9
[ 167 ]
The code segment is executed once the grammar is processed and our
option field is populated.
Pages:
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223