I'm trying to record and download a phone conversation on twilio.
I've set it up with:
const voiceResponse = new twiml.VoiceResponse();
voiceResponse.dial({
callerId: callerNumber,
record: "record-from-answer",
recordingStatusCallback: `https://${request.headers.host}/recording`,
recordingStatusCallbackMethod: "POST",
recordingTrack: "both",
method: "POST",
ringTone: "au",
});
dial.number(to);
However, the audio I get back from the callback appears to only contain one track / side of the conversation? I thought recordingTrack: "both"
would mix both sides of the conversation into one audio file but that doesn't seem to be the case? Also note when I download the file from the callback url I append .mp3
to the URL to receive it in the format I need (I'm not sure if this makes a difference?).
I may have missed it in the twilio docs but how can I get a recording file with both legs of the conversation?
Any help is appreciated.
Thanks!