Sms Confirmation Does Not Work for Non-US Numbers

Created on 18 August 2017, over 7 years ago
Updated 10 December 2024, 4 months ago

I'm using sms_user to send a confirmation code. We have non-US users, with numbers like +4745678901.

When sms_user_send_confirmation is called with a number like that, it calls sms_formatter($number), which strips the leading + from the number. The SMS Gateway (We use sms_twilio) reads that number as (474) 567-8901, and tries to send the message to a number in Saskatchewan.

I've poked at this from a few different angles, and without touching any third-party modules, cannot fix it. Is this perhaps an error in the sms_twilio module? If so, then in order to fix it and submit a patch there, I would still need to have a few questions answered:

What does the data that I should expect in the sms_user table look like? Should the international prefix be part of the sms_user.number column, and with or without the leading + sign? If the country information is only supposed to like in the gateway field of that table, what happens if I change SMS gateways somewhere down the road?

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

SMS User

Created by

🇳🇴Norway ennorehling

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024