twilio-node icon indicating copy to clipboard operation
twilio-node copied to clipboard

Feature request: Passing TwiML instances to the twiml property

Open dkundel opened this issue 5 years ago • 1 comments

As of recently the Voice API now supports passing a twiml argument to various functions such as client.calls.create. Right now this argument has to be a string but it would be great if you could pass a VoiceResponse instance directly without having to call toString(). Example:

const twilio = require('twilio');
const client = twilio();

const from = '...';
const to = '...';
const twiml = new twilio.twiml.VoiceResponse();
twiml.say('This is awesome');

client.calls.create({
  from, to, twiml
});

dkundel avatar Feb 28 '20 23:02 dkundel

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog (ref: DI-2440).

childish-sambino avatar Mar 02 '20 20:03 childish-sambino