- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试完成一项有趣的任务。在使用 VoiceXML 时,我想让主叫者调用一个号码,然后转接到号码 #1。如果调用者未接通(无应答),则目标号码将更改,然后尝试将调用者连接到第二个号码。
支持技术人员向我提供了一些信息,内容如下:
The best option would be define a list of numbers in JavaScript, if the transfer is unsuccessful, pop the next of the list, and repeat the transfer (which means the 'dest' for the transfer would be a variable).
但我不知道如何解决这个问题,到目前为止,我无法找到任何引用点可用于此目的。这可以通过使用 PHP 来实现吗?
如何将 JavaScript 添加到 VoiceXML,以允许我在转接标记上设置超时变量,然后在调用者未连接时循环显示号码?
最佳答案
假设您使用 VoiceXML 2.1 兼容平台,则必须使用类似 <transfer type="consultation" destexpr="myDestinationVariable" connecttimeout="20s" />
的内容。 。
但是,connecttimeout
属性不能是 JavaScript 表达式,它必须是时间文字。因此,如果超时不是一个常量,您需要动态生成 VoiceXML(使用 PHP 或其他东西)。
如果你可以有一个恒定的超时,你可以做类似的事情(未测试):
<?xml version="1.0" encoding="utf-8"?>
<vxml version="2.1" xml:lang="en-US" xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<var name="destinations" expr="['5555551111', '5555551112', '5555551113']" />
<var name="currentDestination" expr="destinations.shift()" />
<form id="myForm">
<transfer name="transferResult" type="consultation" cond="currentDestination!=undefined" destexpr="currentDestination"
connecttimeout="20s">
<filled>
<if cond="transferResult=='noanswer'">
<assign name="currentDestination" expr="destinations.shift()" />
<clear />
</if>
</filled>
<catch event="connection.disconnect.transfer">
<!-- transfer OK -->
</catch>
</transfer>
<block>
<!-- No more numbers to try -->
</block>
</form>
</vxml>
关于javascript - 在 JavaScript 和 vxml 中使用多个转接号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28834457/
来自关于咨询的 VXML 2.1 文档 Consultation_Transfer 以及来自 VXML 2.0 桥接传输的文档 Briged transfer 我理解的唯一区别是这个 >即使在桥接转接
有人联系我说有机会做 VoiceXML——我没有任何经验,但显然这可能没问题。但是,我对该技术进行了一些初步研究,它看起来很旧,从未获得太多关注等。但我无法弄清楚是什么技术(y,ies)取代了它。 V
我正在寻找一种在桌面/网络浏览器中模拟 vxml 应用程序的解决方案。 挑战 在每个新的 vxml 应用程序开发中,我都有数百个单元测试用例。 不可能总是进行测试调用来测试我拥有的每个单元测试用例。如
我正在尝试做一个应用程序来监听一个名字和两个成绩,制作成绩的媒体,然后将其保存在 mysql 数据库中。我无法使应用程序识别十进制成绩(葡萄牙语)。这是我的实际代码:
很抱歉,这可能是一个非常基本的问题,但我才刚刚开始编程。基本上我需要在 VXML 中增加一个计数器。 我已将计数器声明为: 在 IF 语句中,我通过这样做递增:第二个赋值标记递增计数器。 T
有谁知道有什么工具可以让我直观地运行和调试 VXML 应用程序?有大量的 VXML 开发工具,但它们都要求您在其中构建应用程序。 我有一个使用 JSP 生成 VXML 的现有应用程序,我正在寻找一种方
是否允许嵌套的“if”语句? 前任: One is in fact equal to one and Two is in fact equal to two On
我需要在我的 VXML 应用程序根文档中定义的变量(其他文档会修改这些变量)可供 JSP/EL 页面使用。这里的想法是,根据这些变量的值,我可以向 JSP 添加逻辑,以将不同的 VXML block
我正在尝试完成一项有趣的任务。在使用 VoiceXML 时,我想让主叫者调用一个号码,然后转接到号码 #1。如果调用者未接通(无应答),则目标号码将更改,然后尝试将调用者连接到第二个号码。 支持技术人
我遇到以下情况的问题:我的 vxml 有以下片段: myscript.es: function temp(){ var delay = new String("abc pqr"); r
我正在寻找 VXML 2.1 帮助。我知道 vxml 可以在tellme.com 服务器上进行测试。但我正在搜索,是否有任何方法可以在 Google Chrome 中测试 vxml。也就是谷歌浏览器可
如何在vxml中使用javascript发出http请求?(通常 src 包含数据元素的任何 xml 文件的链接。但在我的情况下,它不一定是 xml 文件。所以我认为我不能在这里使用数据元素。) 最佳
我必须编写能够访问数据库的 VXML 应用程序。 VXML 标准让外部 url 带有参数,但作为响应,我必须返回生成的 VXML 文档,其中包含从数据库和其他 VXML 标记中获取的数据。 你能告诉我
希望你一切顺利。我们一直在 Ubuntu(16.04.2 LTS) 上使用带有 asterisk 13 的 Voximal(最新)。 我正在尝试调用返回 PCM 8000 流的 java Web 服务
我是一名优秀的程序员,十分优秀!