Page 1 of 1
say-as not working
Posted: Wed May 14, 2008 3:36 pm
by peterdunn
I get an error when trying to use this code. I want to read back the digits I take in. How do I use say as to read back a number just taken in from a promot?
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="id" type="digits">
<prompt>
Please say or enter your customer identification number.
</prompt>
<filled>
You entered <say-as type="acronym"> <value expr="id"/> </say-as>
<!-- transfer to premium support -->
</filled>
</field>
</form>
</vxml>
This is the error
Posted: Wed May 14, 2008 3:53 pm
by peterdunn
This document is not valid VoiceXML!
Element say-as is not declared in filled list of possible children in Entity, line: 12
IVR code to work with <say-as> tag
Posted: Wed May 14, 2008 5:21 pm
by support
Hi,
The reason you are getting this IVR error is because the
<say-as> tag is not a child IVR tag of the
<filled>tag.
The parent IVR tags for the <say-as> tag are:
<audio>,
<emphasis>,
<enumerate>,
<foreach>,
<p>,
<paragraph>,
<prompt>,
<prosody>,
<s>,
<sentence>,
<speak>,
<voice>
You would have have to place your <say-as> tag within one of these parent tags to not get this IVR error.
The following IVR code should work with the <say-as> tag:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<prompt>
Acronym is spelled:
<say-as type="acronym">
acronym
</say-as>
</prompt>
</block>
</form>
</vxml>
Hope this helps.
Regards,
Plum Support
slight modification of IVR code to fix <say-as> tag
Posted: Thu May 15, 2008 8:36 am
by support
Hi Peter,
We've slightly modified your IVR tag,
<say-as>, in your IVR code and have tested it successfully:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="id" type="digits">
<prompt>
Please say or enter your customer identification number.
</prompt>
<filled>
You entered <prompt> <say-as type="acronym"> <value expr="id"/> </say-as> </prompt>
<!-- transfer to premium support -->
</filled>
</field>
</form>
</vxml>
Regards,
Plum Support
thanks
Posted: Thu May 15, 2008 2:50 pm
by peterdunn
thanks! Moving it out of the field tag fixed it!