目前我可以使用 REST API 录制实时通话。但是我想在呼叫者点击录音按钮时播放音频(“说正在录音”),显然呼叫者和被呼叫者都能够听到那个音频。录制实时通话代码
const client = require('twilio')(accountSid, authToken, { accountSid: subaccountSid });
client.calls(callSid)
.recordings
.create()
.then(function(recording){
callback(null, recording);
});
并打电话
const response = new VoiceResponse();
const dial = response.dial({
callerId: fromNumber,
});
dial.number(to);