1

How can we store recording in separate audio file when unique users joins a call ?

RecordingChannels : 'dual' is not helping me. Can someone please help ?

function MakeCall(to, completedCallback) {

  // Options and headers for the HTTP request
  var options = {
    host: 'api.twilio.com',
    port: 443,
    path: '/2010-04-01/Accounts/' + process.env.TWILIO_ACCOUNT_SID + '/Calls.json',
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': 'Basic ' + new Buffer(process.env.TWILIO_ACCOUNT_SID + ':' + process.env.TWILIO_AUTH_TOKEN).toString('base64')
    }
  };

  // Setup the HTTP request and our response
  var req = https.request(options, function (res) {
    res.setEncoding('utf-8');
    // Collect response data as it comes back.
    var responseString = '';
    res.on('data', function (data) {
      responseString += data;
    });
  var body = {
    To: to,
    From: process.env.TWILIO_FROM_NUMBER,
    Url: url,
    Record : true,
    RecordingChannels : 'dual'
  };
user754657
  • 388
  • 3
  • 14
  • Is this for recording a conference? If so, [only 1 channel is supported for Conference recordings](https://www.twilio.com/docs/api/twiml/conference#attributes-recording-status-callback-parameters). – philnash Sep 28 '17 at 16:09
  • It is not a conference. – user754657 Oct 02 '17 at 04:17
  • That code looks like it should work then. How can you tell it's not working? You should also [set a `RecordingStatusCallback`](https://www.twilio.com/docs/api/voice/making-calls#recordingstatuscallback-parameter) so that Twilio will call your application when the recordings are ready. – philnash Oct 02 '17 at 09:49
  • When i see the voice call logs on twill website, i can only view 1 voice file. Home / Voice / Logs / Calls - I can see only 1 voice file. Adding RecordingStatusCallback does not help. My expectation is to have voice file for each user on call. – user754657 Oct 02 '17 at 19:34
  • I will experiment with this tomorrow, I've not done a dual recording myself before. For the URL that responds when the call connects, what TwiML do you use there? Is it a `` to another number? What attributes have you set there? – philnash Oct 02 '17 at 20:34
  • It is not a Dial to another number. TwiMl just starts the recording. twiml = { Twiml: '\n' + ''+ '' }; – user754657 Oct 02 '17 at 21:12
  • Oh, but if you're just recording one side of a call why are you expecting another leg to be recorded? The `` TwiML is for recording a single leg call. – philnash Oct 03 '17 at 00:12
  • Is there a blog which you are aware of, which downloads both the legs of call. My understanding is, Twilio will call a conference number and record everyone on the call on a separate channel. – user754657 Oct 03 '17 at 02:30

2 Answers2

1

Twilio developer evangelist here.

So, I feel you've been leaving some bits out of your question. Your last comment suggests you are trying to record each channel of a conference.

As I said in my first comment, you can't record a channel for each member of the conference as that is not supported.

You can do single channel recording, which records an entire conversation or dual channel recording when you set it in the API request to make the first call. But dual channel recording will only record two channels if there are two legs to the call. If you are using <Record> to connect to a conference then it will only record that one leg.

philnash
  • 70,667
  • 10
  • 60
  • 88
-1

@Twilio evangelist

I would request you to work on dual channel recording and reply here only if you have working solution. In My opinion the solution doesn't work.

Your suggestions are of no help so far.

user754657
  • 388
  • 3
  • 14
  • I know you keep asking questions. All I can give you are the answers that I know. You cannot do dual channel recordings when one end of your call is using ``. – philnash Oct 11 '17 at 08:50