Spoke: Check for wrong numbers

Created on 9 Oct 2017  路  8Comments  路  Source: MoveOnOrg/Spoke

Check for wrong numbers before sending messages - When it's a wrong number, it causes the following error in Twilio:

(Error: 30005) Unknown destination handset. The destination number you are trying to reach is unknown and may no longer exist.

A-server-side (nodejs) A-twilio C-enhancement S-needs planning

All 8 comments

I believe we can use this twilio look up api - wonder if it would make sense to implement a check after uploading contacts and then we could see how many numbers were removed from the list (currently it reports how many contacts were removed based on the opt_out table)

https://www.twilio.com/blog/2016/06/how-to-validate-phone-numbers-in-nodejavascript-with-the-twilio-lookup-api.html

Also after a SMS is attempted, if the service (e.g. twilio) comes back with an unreachable or landline error code, then we should mark it in the system, so we don't try again.

We've discussed this recently in the form of something like these incoming message handlers: #1317 except for filtering down lists within the contact importing step

Is it possible to add a message handler that checks whether a phone number connected to an outgoing text has previously been flagged as a landline or wrong number by twilio/messaging service? @lperson

This error code is already logged in the campaign_contact record -- I think the tricky thing with logging specifically 'wrong number' to a phone number e.g. globally (rather than to a person/contact) is that it's NOT a wrong number for someone else -- so this in-particular may need to depend on an outside CRM to make business decisions about how to handle this scenario.

I think perhaps this issue might be more relevant if we shift the conversation over from wrong numbers, and towards phone numbers that show up as landlines or phone numbers that are not currently deliverable?

maybe then worth thinking about whether to connect this to the upcoming table in https://github.com/MoveOnOrg/Spoke/pull/1917 for phone numbers independent of a particular campaign -- maybe there would be a status column e.g.

Was this page helpful?
0 / 5 - 0 ratings