在 VoiceXML 中编写语法以匹配 # 个终止数字或 *1 或 *2
我正在编写 VoiceXML 应用程序,但遇到问题。该应用程序仅侦听 DTMF 音调。
用户输入确认号码,后跟#。他们还可以输入 *1 或 *2 与客户服务联系,或重新发送确认消息。
我在创建一个适用于此目的的语法时遇到了困难。我已经能够使用内置类型 digits?minlength=1
和 termchar=#
作为确认代码。我还能够创建一个语法,该语法本质上复制了内置的数字功能。
我无法让 *1 或 *2 功能工作!它们很特殊,因为它们没有终止字符。
有谁知道如何解决这个问题?这里掉头发了...... 谢谢大家。
I an writing a VoiceXML app and i am having a problem. The application listens for DTMF tones only.
The user enters a confirmation number followed by #. They can also enter *1 or *2 to speak to customer service, or resend the confirmation message.
I am having trouble creating a grammer that will work for this. I've been able to use the built-in type digits?minlength=1
and termchar=#
just fine for the confirmation code. I've also been able to create a grammar that essentially duplicates the built digits
functionality.
I can't get the *1, or *2 function to work! They are special as they have no termination char.
Does anyone have any clue how to approach this? Loosing hair here....
Thanks all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 SRGS 规范 中的示例。引脚示例接受 *9。
请注意,虽然规范中有此内容,但我发现一些 IVR 引擎未完全实现该规范。特别要注意 # 和 * 的内置假设。终止原因也可能有点不一致。
Take a look at this example from the SRGS specification. The pin example accepts *9.
Note, while this is in the specification, I've found some IVR engines that don't fully implement the specification. In particular, watch out for built-in assumptions for both # and *. Termination reasons can also be a bit inconsistent.