无法使用 twilio play 播放音频 url

cant play audio url with twilio play

我试着从 twilio 打一个简单的电话 phone 播放按摩然后挂断, 但无论 url 我输入什么,当我打电话时,我都会收到关于功能错误的语音提示 这是我的代码:

let twilio = require('twilio');

var accountSid =; // Your Account SID from www.twilio.com/console
var authToken = ;   // Your Auth Token from www.twilio.com/console

var client = new twilio(accountSid, authToken);

const VoiceResponse = require('twilio').twiml.VoiceResponse;


const response = new VoiceResponse();
response.play({
    loop : 1,
},"https://scribie.com/records/7941e240b8884865872ac859e389927b78757fae_orig.mp3?fn=test2.mp3&to=FHtRpSzUlmmaVRWjl7n23mC3Ezm5nYwK");

console.log(response.toString());

client.calls
    .create({
        twiml: response.toString(),
        to: '',
        from: ''
    }).then(call => console.log(call.sid)).catch(e=>console.log(e));

此处为 Twilio 开发人员布道师。

当我将 Scribie URL 替换为“http://demo.twilio.com/docs/classic.mp3”时,我可以让您的代码正常工作。当我尝试打开您拥有的 Scribie URL 时,它会将我带到必须登录才能查看的网页。相反,我会尝试将文件上传到 Twilio Assets 或其他托管服务。