StateVoicesNational / Spoke

mass-contact text/SMS distribution tool
Other
463 stars 405 forks source link

Feature Request: Support scrub-bad-mobilenums service manager for Bandwidth #2211

Open crayolakat opened 2 years ago

crayolakat commented 2 years ago

Problem The scrub-bad-mobilenums service manager extension isn't compatible with Bandwidth. When trying to use the 2 together, the following error message is received: The current vendor to send text messages does not support contact lookup in Spoke. Please contact your administrator to disable this feature or enable a vendor that supports contact lookup.

Solution Make the scrub-bad-mobilenums service manager compatible with Bandwidth.

Context

image
bchrobot commented 6 months ago

Is anyone working on this? If not, I plan on working on it

engelhartrueben commented 6 months ago

Hi Ben!

I do not believe anyone is working on this, so go for it!

However, we are in the midst of big node 20 upgrade (new-node-20-branch), but still have a lot of testing to do. I only mention this because we did remove the deprecated @bandwidth/messaging dependency for bandwidth-sdk.

May be worth waiting for the this version update to start working on this (hopefully out by the end of the month!). Up to you (:

bchrobot commented 6 months ago

Thanks for the heads up! I don't believe Bandwidth's phone number lookup feature is included in any of their Node SDKs. My plan is to just use node-fetch, which is compatible with Node 20 as far as I can tell.

Bandwidth's lookup service is asynchronous (versus Twilio) and works by creating a lookup request order with 1-100 phone numbers. This returns an order ID which then must be checked periodically until it completes. There are two ways to approach this in Spoke:

  1. Create lookup orders with just 1 phone number to be consistent with the current Twilio implementation
  2. Perform lookups in batches of 100. This does not dramatically increase complexity as polling for order completeness has to happen either way. It does decrease the per-phone number lookup overhead, however, which could make a big difference in task runtime.

I lean towards 2 personally but would love to hear from maintainers if you all have a preference.

crayolakat commented 6 months ago

@bchrobot I am also leaning towards 2- it seems more efficient than the current Twilio implementation.

mau11 commented 2 months ago

hi @bchrobot, are you still interested in working on this ticket?

bchrobot commented 2 months ago

hi @bchrobot, are you still interested in working on this ticket?

@mau11 I do not have capacity to work on this at the moment, sorry.

mau11 commented 2 months ago

@mau11 I do not have capacity to work on this at the moment, sorry.

@bchrobot, no problem at all! We appreciate all the contributions you've made. We're currently reviewing all outstanding issues.