I am using Twilio Client (VoIP) with nodejs for making a call from my device to a phone. I want a recording functionality also with this but I don't see this API supports it.I see rest API which supports this but then it not supports VOIP. can someone please provide a sample code or any help for this. very sorry for a silly question but I am new to programming. Thanks in advance.
1 Answers
The JavaScript Client is actually not making the recording but the TwiML does. You setup your device and establish a connection to Twilio. Audio from your device's microphone is sent to Twilio, and Twilio plays audio through your device's speakers, like on a normal phone call. This is analogous to the way Twilio handles incoming calls from a real phone. All the same TwiML verbs and nouns that are available for handling Twilio Voice calls are also available for handling Twilio Client connections.
So assuming that you are calling a customer's number and want to record the call, you will need to pass this instruction in the TwiML, i.e:
<Response><Dial record=true>[Number to call]</Dial></Response>
Or in node.js:
resp.dial({
record:'true'
});
After the recording is complete, it gets assigned a recording SID just like recordings created via the verb, and you can fetch it via the REST API as documented here: https://www.twilio.com/docs/api/rest/recording#list

- 3,745
- 1
- 15
- 25
-
Thanks for the reply, but the example you have given is device calling to a phone and then it calls to another phone(with the click-to-call Rest API), but I need a device to phone call i.e: Twilio Client (VoIP) and recording functionality in it!. – moni sogani Jan 10 '17 at 06:43