Scope

Scope

in

Scope is the boundary in which variables and expressions are associated. In VoiceXML, we generally refer to local scope and global scope when referring to IVR code. Scope is used to determine which information (i.e. variables) is available to different part of your application. For example, in the following IVR code example:

<?xml version="1.0"?> <vxml version="2.0"> <property name="inputmodes" value="dtmf"/> <property name="interdigittimeout" value="3s"/> <form id="one"> <field name="myfield" type="digits"> <prompt> You will only be able to enter digits. Enter a number on your keypad. </prompt> <filled> You entered <value expr="myfield"/>. </filled> <nomatch> You did not enter a number properly. <reprompt/> </nomatch> <noinput> You did not enter anything. <reprompt/> </noinput> </field> </form> <form id="two"> <field name="customerid" type="digits"> <property name="interdigittimeout" value="5s"/> <prompt> Please enter your customer identification number using your keypad. </prompt> </field> <field name="age" type="digits?minlength=1;maxlength=2"> <property name="interdigittimeout" value="5s"/> <prompt> Please enter your age using your keypad. </prompt> </field> <block> <prompt> Please wait while we process your information. </prompt> <return namelist="customerid age"/> </block> </form> </vxml>

the two <property>s, inputmodes and interdigittimeout, are properties that apply to the global scope of the application. This means that these properties will be used throughout the entire application (<form>s, <field>s, <menu>s) unless there is a different property specified within the local scope. For example, the <property>s in the <field> names, customerid and age, are properties that only apply within their local scope (the <field>s that they are in).

Related links

Related terms

for "Scope"

Search Glossary

Term of the Day

The maxspeechtimeout property indicates the maximum duration of users speech input.
See also: Property, Tag, VoiceXML