我尝试从 twilio 做一个简单的电话,播放按摩并挂断,但无论我输入什么网址,当我拨打电话时,我会收到关于功能错误的语音按摩,这是我的代码:
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));