在 VoiceXML 中编写语法以匹配 # 个终止数字或 *1 或 *2

发布于 2024-08-21 05:13:01 字数 326 浏览 3 评论 0原文

我正在编写 VoiceXML 应用程序,但遇到问题。该应用程序仅侦听 DTMF 音调。

用户输入确认号码,后跟#。他们还可以输入 *1 或 *2 与客户服务联系,或重新发送确认消息。

我在创建一个适用于此目的的语法时遇到了困难。我已经能够使用内置类型 digits?minlength=1termchar=# 作为确认代码。我还能够创建一个语法,该语法本质上复制了内置的数字功能。

我无法让 *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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月依秋水 2024-08-28 05:13:01

查看 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文