質問

How can the bargein property for a prompt be set dynamically in VoiceXML?

Depending on the results of a prompt early in the flow, we want to later allow or disallow barging in. We're hosting at Voxeo if that makes a difference.

This works:

<prompt bargein="false">

This does not work:

<assign name="allowBarge" expr="false" />
...
<prompt bargein="allowBarge" >
役に立ちましたか?

解決

You could use the cond expression in the prompt and replicate the prompt, once with bargein on and one with it off. Something like this.

<assign name="allowBarge" expr="false"/>
...
<prompt cond="allowBarge == true" bargein="true" >
Say something
</prompt>

<prompt cond="allowBarge == false" bargein="false" >
Say something
</prompt>

In this example bargein would be turned off because allowBarge is set to false.

This would be one method for handling static VoiceXML. Another alternative is to dynamically create the VoiceXML and set bargein based on a parameter passed in the query string.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top