I have a twilio account and am able to make calls. I am also able to use twiML Bins to do some text-to-voice. I however would like to call people hand play the recording stored on my amazon server, my java code is as follows:
callParams.put("To", "#number");
callParams.put("From", "#number");
callParams.put("Url", "https://myserveraddress/play.xml");
The xml code is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<Play>https://myserveraddress/jazz.mp3</Play>
</Response>
My mp3 is stored in the same location as my xml. But when I try make a call the twilio debugger tells me:
Error - 11200. HTTP retrieval failure.
Any Help will be appreciated.
Twilio evangelist here.
By default Twilio is going to make a POST request to the Url, and I'm guessing your web server can't serve a .xml from a POST request. You can send the Method param to tell Twilio to make a GET request instead:
callParams.put("To", "#number");
callParams.put("From", "#number");
callParams.put("Url", "https://myserveraddress/play.xml");
callParams.put("Method", "GET");
Here is a longer sample: http://twilio.com/docs/api/rest/making-calls#example-5
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With