2

我正在关注http://www.twilio.com/docs/quickstart/client/browser-to-browser-calls从浏览器进行调用以进行浏览。

根据文档打开两个浏览器:

http://127.0.0.1/client.php?client=test1和 127.0.0.1/client.php?client=test2

当我使用沙盒 APP ID 时:

The both browser couldn't able to connect but it a call connect to the the sandbox number.

当我使用我的应用 ID 时:它向我显示以下错误:

Component: TwiML errors
httpResponse: 502
ErrorCode: 11200
url: http://127.0.0.1/demo.php



Request: What Twilio sent your server
         HTTP Method:   GET
         HTTP URL:  http://127.0.0.1/demo.php
         HTTP BODY: Key Value
         AccountSid xxxxxxxxxxxxxxxxxxxxxxxxx
         ApplicationSid dddddddddddddddddddddddddd
         Caller client:jenny
         CallStatus ringing
         Called 
         To 
         PhoneNumber    tommy
         CallSid    cccccccccccccccccccccccccccc
         From   client:jenny
         Direction  inbound
         ApiVersion 2010-04-01

Response: What your web application responded with to Twilio
         HTTP Headers:  Key Value
         Date   Thu, 25 Aug 2011 11:36:22 GMT
         Content-Length 137
         Connection close
         Content-Type   text/html
         Server TwilioProxy/0.7

with <html><head><title>502 Bad Gateway</title></head>
<body><h1>Bad Gateway</h1>An upstream server returned an invalid response.</body></html>
4

1 回答 1

0

分配给您的应用程序的 VoiceURL 必须是可公开访问的 URL,以便 Twilio 服务器可以访问它。如果它仅运行 127.0.0.1 只能从您的本地计算机访问,而我们无法访问它。

您可能对 localtunnel.com 或 ngrok 之类的东西感兴趣,它们可以您将本地服务器公开给公众。

于 2011-08-25T22:40:48.763 回答