1

here is the code to make a call

function dialCall(num)
{
    params = {"phoneNumber": num, "record":"record-on-answer", "callStatus":"call", "callerId": "<?php echo $call_id; ?>", "tenantId":"<?php echo $pusher_channel; ?>"};
    Twilio.Device.connect(params);
}

The calls are being connected successfully and the conversations are normal. My problem is it wont record the outgoing phone calls. Anyone here who uses Twilio.Device.connectto make phonecalls? Can you please help me make the record work? What am I doing wrong here?

Thanks

below is a screen shot of the twilio console showing that the calls are successfully made.

screenshot

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Beldion
  • 321
  • 8
  • 19

1 Answers1

2

Twilio evangelist here.

Can you post the TwiML that you're giving to Twilio with we request your TwiML Application URL?

To record both legs of your call you need to make sure that you are including the record attribute in the <Dial> verb in that TwiML:

<Response>
    <Dial callerId="+15556666666" record="record-from-answer">
        <Number>+15555555555</Number>
    </Dial>
</Response>

Hope that helps.

Megan Speir
  • 3,745
  • 1
  • 15
  • 25
Devin Rader
  • 10,260
  • 1
  • 20
  • 32
  • I am using the Javascript SDK https://www.twilio.com/docs/api/client/device#connect to make phone calls... – Beldion Sep 09 '16 at 05:57
  • The answer still applies. There is no way from the JS SDK to tell Twilio to record the call. That happens by specifying the attribute as shown above. – Devin Rader Sep 09 '16 at 12:06