Write a new program to use a library to manipulate phone numbers

The regexes and commands we use to manipulate phone numbers have bugs when dealing with numbers in different countries and odd phone numbers. Clearly phone numbers are more complicated than our regexes. We should use an existing library for manipulating phone numbers.

See discussion here: https://lists.sr.ht/~mil/sxmo-devel/patches/22646#%3C87zgwwncb6.fsf@momi.ca%3E

Assigned to
2 years ago
2 years ago
bug ready

~noneofyourbusiness 2 years ago*

I suggest using this program https://github.com/Orange-OpenSource/pn (validation + format)

tested using variable length phone numbers - it considers correctly formatted ones in range 7:13 valid (minus the +x country code), resolving #249

~proycon 2 years ago

On 21-05-19 08:07, ~noneofyourbusiness wrote:

I suggest using this program https://github.com/Orange-OpenSource/pn

That looks promising! Thanks


Maarten van Gompel (proycon) https://proycon.anaproy.nl

~stacyharper 2 years ago

Oh nice ! And we can also reformat the number. We should then adapt the commit 91fe7fb to use pn. We also use the DEFAULT_NUMBER_PREFIX in the modemmonitor IIRC.

~proycon 2 years ago

Just for reference, the current implementation for this issue, by ~noneofyourbusiness, is in this patch (v11): https://lists.sr.ht/~mil/sxmo-devel/patches/23028 ... some discussion points are raised there too.

~noneofyourbusiness 2 years ago*

The current plan is to get it packaged, a v12 has been sent to match that https://lists.sr.ht/~mil/sxmo-devel/patches/23075

staceee is working on a v13

~proycon REPORTED FIXED 2 years ago

Register here or Log in to comment, or comment via email.