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

Allow setting a default connection override

Open thomaschaaf opened this issue 3 years ago • 3 comments

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.

thomaschaaf avatar Aug 26 '21 13:08 thomaschaaf

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.

shwetha-manvinkurke avatar Aug 27 '21 21:08 shwetha-manvinkurke

@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.

mariomui avatar Jan 06 '23 11:01 mariomui

Update: Internal backlog reference (DI-2544)

claudiachua avatar Jan 13 '23 21:01 claudiachua