twilio-node
twilio-node copied to clipboard
Allow setting a default connection override
Issue Summary
We would like to use https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides in all our code. We keep accidentally forgetting it. It would be great if we could set a default connection override and if we use the redirect twiml verb that it would automatically append it.
Code Snippet
Instead of writing
const response = new VoiceResponse();
response.redirect({
method: 'POST'
}, 'https://example.com/foo?query=123#rc=2&ct=1000');
we would like to write
const response = new VoiceResponse({ connectionOverride: 'rc=2&ct=1000' });
response.redirect({
method: 'POST'
}, 'https://example.com/foo?query=123');
The connection override should also be appended for other things like statusCallbacks in <Gather />
aswell.
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.
@thomaschaaf you are welcome to submit a PR with the desired changes if you like.
@thomaschaaf https://github.com/twilio/twilio-node/pull/874 Here is the pull request for the configuration object.
Can you specify more about the gather or ping shwetha about it as I think gather might require a codegeneration tool I do not have.
Update: Internal backlog reference (DI-2544)