2011-08-25 86 views
2

我跟隨http://www.twilio.com/docs/quickstart/client/browser-to-browser-calls撥打瀏覽器來瀏覽。twilio bhrowser瀏覽器調用問題?

根據文檔打開兩個瀏覽器:

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

當我使用沙盒應用程序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> 

回答

0

分配給您的應用程序的VoiceURL必須是可公開訪問的URL,以便Twilio服務器可以訪問它。如果它只運行只能從本地機器訪問的127.0.0.1,並且我們無法訪問它。

您可能會對localtunnel.comngrok這樣的東西感興趣,它會讓您將本地服務器公開給公衆。

+0

我明白了。歡呼:) –