twiml - Twilio call says an application error has occured -
i using command make call. hosted xml in amazon s3 , made public. call says, "sorry, application error has occurred. please help
curl -xpost https://api.twilio.com/2010-04-01/accounts/kjfwbkjfejbfgeirbgiregribg/calls.json -d "url=http://read-voice.xyz.s3-website-us-east-1.amazonaws.com/voice.xml" -d "to=%2b1234567812" -d "from=%2b1234567812" -u 'ssllsdnf wfwefklwefwefwef:wjfdbewfergergerg'
this xml
<?xml version="1.0" encoding="utf-8"?> <response> <say voice="alice">thanks trying our documentation. enjoy!</say> </response>
this error in debugger
<html> <head> <title>405 method not allowed</title> </head> <body> <h1>405 method not allowed</h1> <ul> <li>code: methodnotallowed</li> <li>message: specified method not allowed against resource.</li> <li>method: post</li> <li>resourcetype: object</li> <li>requestid: xyxafsgjsk</li> <li>hostid: xyzt8=</li> </ul> <hr/> </body>
you can check s3 served content browser.
you need make sure s3 serves xml "content-type"
of "text/xml"
, <?xml version="1.0" encoding="utf-8"?>
on first line of response.
also check twilio call logs step step debugging, should see more info faulty http request gives error, including s3's response headers , content type.
for testing purposes can use twiml bins
, can find them on left menu under "tools" > "developer center". create bin there xml , url can use instead of s3 url.
twiml bins don't need <?xml version="1.0" encoding="utf-8"?>
on first line, put xml in there.