Objective
The following sample code below shows the basic Node.js syntax of <Dial><WhatsApp>.
Procedure
This is helpful in case you need to make a WhatsApp Call from a Twilio Function:
const VoiceResponse = require('twilio').twiml.VoiceResponse;
const response = new VoiceResponse();
const dial = response.dial({
callerId: 'whatsapp:+558551234567'
});
dial.whatsApp('+15558675310');
console.log(response.toString());
Additional Information
Further details about WhatsApp Voice Call can be found in the following document: TwiML™ Voice: <WhatsApp>