无法使用Twilio Client快速入门启动应用程序进行出站呼叫

时间:2017-05-18 17:19:22

标签: javascript twilio

我按照Twilio Client JS快速入门并设置了入门应用的本地实例,但无法使用我的试用号成功拨打出站电话。在拨打经过验证的号码后,我会在通话结束前听到来自客户端的演示消息和一个响铃,我的经过验证的号码从不显示来电。浏览器客户端说调用成功,但我的浏览器控制台没有显示错误,Twilio控制台调试器只显示模式验证警告(12200)。我启用了Twilio.Device的调试设置 - 日志显示为:

```[Device] Setting up PStream
[WSTransport] Opening socket
[WSTransport] attempting to connect
[WSTransport] Socket opened
[PStream] Setting token and publishing listen
[Device] Stream is ready
Calling +17869735640...
[Twilio.PeerConnection] signalingState is "have-local-offer"
[Twilio.PeerConnection] signalingState is "stable"
[Twilio.PeerConnection] iceConnectionState is "checking"
[Twilio.PeerConnection] iceConnectionState is "completed"
[Connection] Received HANGUP from gateway
[Connection] Disconnecting...
[Twilio.PeerConnection] iceConnectionState is "closed"
[Twilio.PeerConnection] signalingState is "closed"```

文档建议我应该可以使用我的试用帐户进行此调用 - 试用功能限制是否已更改?

1 个答案:

答案 0 :(得分:1)

Twilio开发者传道者在这里。

您在评论中添加的TwiML确实不正确。 number上没有<Dial>属性。您应该将该号码添加为<Dial>的内容或嵌入<Number>。像这样:

<Response>
  <Dial callerId="+1987654321">+1234567890</Dial>
<Response>