twilio / twilio/twilio-node

Allow setting a default connection override

Open
#691 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: help wanted type: community enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
564
Avg merge
14h 2m
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the VoiceResponse constructor and the redirect and Gather statusCallback entry points named in the issue. Define how a default connection override is carried and appended, then verify the shown examples and the other Gather statusCallbacks cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.