- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在开发 Twilio 客户端应用程序,但我很难发送 DTMF 音调。这是我到目前为止的代码:
<script type="text/javascript">
$.each(['0','1','2','3','4','5','6','7','8','9','star','pound'], function(index, value) {
$('#button' + value).click(function(){
if(connection) {
if (value=='star')
connection.sendDigits('*')
else if (value=='pound')
connection.sendDigits('#')
else
connection.sendDigits(value)
return false;
}
});
});
</script>
<div id="dialpad">
<table>
<tr>
<td><input type="button" value="1" id="button1"></td>
<td><input type="button" value="2" id="button2"></td>
<td><input type="button" value="3" id="button3"></td>
</tr>
<tr>
<td><input type="button" value="4" id="button4"></td>
<td><input type="button" value="5" id="button5"></td>
<td><input type="button" value="6" id="button6"></td>
</tr>
<tr>
<td><input type="button" value="7" id="button7"></td>
<td><input type="button" value="8" id="button8"></td>
<td><input type="button" value="9" id="button9"></td>
</tr>
<tr>
<td><input type="button" value="*" id="buttonstar"></td>
<td><input type="button" value="0" id="button0"></td>
<td><input type="button" value="#" id="buttonpound"></td>
</tr>
</table>
</div>
当我调用我的测试号码并按下拨号盘上的按钮时,它没有发送值。非常感谢您对此提供任何帮助?
最佳答案
在您的脚本 block 中,您需要有可用的连接对象。所以在你的功能之上,你需要像这样的东西:
var connection = null;
Twilio.Device.setup('your token');
params = { "number" : "5559871234", "outbound" : "true" };
connection = Twilio.Device.connect(params);
本质上,这个函数只需要“看到”连接变量。如果您的 javascript 文件位于不同的位置并且您无法合并它们,您可以将连接对象设置为全局(不理想)至少看看您是否可以让它工作。
connection = null;
(前面没有“var”)
关于php - Twilio 客户端 DTMF 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11285740/
我正在创建一个使用twilio的网络应用程序,但我似乎遇到了问题。 该系统由3个参与者组成: 实际客户 物理服务器 我们的网络应用程序 每当客户通过表单创建新的“作业”时,所有作业详细信息都将以文本形
有a good pitch from Twilio here . 我只是不明白他们如何通过网站做到这一点。如何使用网络浏览器控制固定电话? 最佳答案 简短的回答:神奇的蝴蝶。 更长的答案:Twilio
我一直在与 Twilio 合作 program SMS functionality在我的应用程序上,似乎 Twilio 对美国号码效果最好,而对国际号码效果不佳。我做了一些研究,并了解到 8 月 16
我需要将用户添加为出站调用者 ID。通过使用以下代码 const accountSid = 'ACeae3abf5038c91052c27aa2a04969457'; const authToken
在 Twilio - 飞行模式同时响铃中断。 由于连接的第一个调用将取消所有其他尝试,如果有线路处于飞行模式,它将立即接听并将用户带到语音信箱。 解决方法是仅在调用成功连接而不是 PICKED-UP
我有一个用于发送短信的 twilio 帐户。但是,我需要有关如何通过调用其 API 查看我的帐户电话号码列表的指导。我试图浏览 API 中的不同菜单,但我没有看到任何选项来获取我的帐户电话号码列表。预
我正在尝试使用 Twilio Video,我需要从我的应用服务器获取访问 token (jwt)。 下面是生成访问 token 的 NodeJS 应用服务器代码。在下面的凭证中,API_KEY_SEC
创建 Twilio 功能 token 是否需要向 Twilio 服务器发出请求? 如果我理解正确的话,创建 Twilio 功能 token 涉及某种仅在我自己的服务器上发生的加密过程。当我调用库来创建
我最近一直在阅读 Twilio 文档,对“Twilio Client”和“Twilio Video”感到困惑。 我注意到“Twilio Client”的教程涉及注册电话号码,而测试版“Twilio V
我找不到任何关于在主讲人发生变化时更改构图布局的文档。我想要做的是在视频的更大区域中拥有比非主导演讲者更大的主导演讲者,并且该演讲者可以/将在某个时间间隔发生变化。这可能使用 Compositions
设置 我已经使用两个基于美国的号码(+1 国家代码)成功测试了我的 Twilio 应用程序一段时间。验证 token 已通过 SMS 成功发送,验证检查状态返回“已批准”。生活很好! 😎 问题 今天
有什么方法可以在我的两个用户之间进行通话?我的意思是......我有一个带有注册号码的 twilio 帐户,我必须调用我的客户“Bill”,所以当他回答时,电话应该被重定向到 Bill 选择的另一个客
我想要一个流程,我可以在其中给用户发短信,并且该用户可以发回短信以触发事件。我可以在任何时候向用户发送多条未完成的消息 - 无论如何,在收到短信时,我是否可以弄清楚它正在回复哪条消息,而无需在短信正文
关闭。这个问题需要更多 focused .它目前不接受答案。 想改进这个问题?更新问题,使其仅关注一个问题 editing this post . 去年关闭。 Improve this questio
无论如何,我可以关闭默认的 twilio 哔声以开始录制。我想使用我们自己的客户提示音。 基本上我们希望在 MP3 播放完毕时发出一声哔哔声。之后我们想要 20 秒空白,一旦 20 秒完成,我们会发出
我是 Twilio 的新手,在设计出站拨号器当前预览拨号时遇到了一个问题。如果工作人员拒绝一项任务,则不应再次向该工作人员提供相同的任务。 我如何处理这个案子? 最佳答案 通常,如果工作人员拒绝任务,
我正在使用 Twilio PHP 库,但问题实际上与语言无关。我尝试执行以下操作: $client = new Services_Twilio('MyAccountSID', 'My auth tok
我们已经构建了一个网络应用程序。该应用程序的核心是在网络上安排 session / session 。因此,用户 A( session 协调员)将安排 session / session ,所有其
我正在使用 JavaScript SDK 创建一个 Twilio 应用程序。 我想实现调用保持功能,但我在实现它时遇到了麻烦。 当调用由软电话发起时,保持调用的过程是什么? 还有,软电话接听的过程是怎
三月份,我开设了一个网站,为人们提供用于接收短信验证等的临时号码。 我刚刚登录到该帐户并意识到我收到了大量的出站短信费用。 每当我的任何号码收到短信时,它们似乎都是默认的自动响应。 我没有启用此功能(
我是一名优秀的程序员,十分优秀!