I'm setting up a system that plays a publicly-hosted podcast over the phone through Twilio, using the code from this project. However, on any podcast that I can find, the audio is inaccessible to Twilio. For example, I can use this link to load podcast audio just fine in my browser, but when I try to play it using this function through Twilio:
exports.handler = function(context, event, callback) {
let twiml = new Twilio.twiml.VoiceResponse();
// Direct audio file URL
let audioUrl = ".mp3";
// Play the audio file
twiml.say("Playing the podcast episode now.");
twiml.play(audioUrl);
// End the call
twiml.hangup();
callback(null, twiml);
};
The application hangs for a while then abruptly hangs up, with the message: "We are sorry, an application error has occurred," as well as an HTTP 11200 error indicating that some sort of HTTP retrieval error has occurred.
What could be causing this issue and how/can it be resolved?