We currently give in our voiceXML a prompt after the message to press any key to replay the messages. The listener currently has the option to replay the message 2 times, in other words, the message can be played 3 times in total.
At the moment, each replay is hard-coded in the voiceXML, with the goto tag to jump to the next replay.
Below is an example of what we currently do.
My question is, is there any other way of doing this so that the replays are not hard-coded? So in the future if the business wants more replay options, we only need to make a small change instead of adding more hard-coded voiceXML?
Code: Select all
<vxml version="2.0">
<property name="inputmodes" value="dtmf"/>
<property name="termtimeout" value="6s"/>
<property name="timeout" value="6s"/>
<property name="termmaxdigits" value="true"/>
<property name="voicename" value="Ray"/>
<form id="form1">
<block>
<prompt>Hello my friend, welcome to our service.</prompt>
</block>
<field name="play1" type="digits?length=1">
<prompt bargein="true">Press any key to replay the message.</prompt>
<filled>
<goto next="#form2"/>
</filled>
<noinput>
<prompt>Goodbye</prompt>
<exit/>
</noinput>
</field>
</form>
<form id="form2">
<block>
<prompt>Hello my friend, welcome to our service.</prompt>
</block>
<field name="play2" type="digits?length=1">
<prompt bargein="true">Press any key to replay the message.</prompt>
<filled>
<goto next="#form3"/>
</filled>
<noinput>
<prompt>Goodbye</prompt>
<exit/>
</noinput>
</field>
</form>
<form id="form3">
<block>
<prompt>Hello my friend, welcome to our service.</prompt>
</block>
</form>
</vxml>
Werner