Hi,
Firstly, you will never be able to utilize the shadow varaible for an input field within a <nomatch> or <noinput> tag. Reason being, if a nomatch or noinput event occurs, the field was never populated, as the grammar was not matched. That explains the error you ere hearing and you should have seen in your logs something similar to:
Code: Select all
TypeError: fld_test$ has no properties line 1
errno: 1 exception Caught failure while attempting to evaluate an embedded value
This is essentially saying what I explained above, that the variable has no properties and therefore has no .utterance property as well, which is the cause of the ecmascript error.
One additional thing to note is that you can utilize the shadow variables by variable names. For example, you could log the utterance in your script like such:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form id="frm_test">
<field name="fld_test" type="digits?length=3">
<prompt> Enter 3 digit code </prompt>
<filled>
<log>value::: <value expr="fld_test$.utterance" /></log>
<value expr="fld_test" />
<disconnect />
</filled>
<catch event="nomatch noinput">
<reprompt/>
</catch>
</field>
</form>
</vxml>
This will log the utterance spoken by the caller, when a match is supplied.
Hopefully that helps, please let us know if you have any additional questions.
Regards,
Plum Support