That branch says "If it looks to be all digits, spaces, hyphens, and parentheses then strip it down to just digits. Otherwise assume that it is some kind of alias the service supports". It applies at the A/T layer and thus requires no DB updates, and makes no assumptions about lengths of numbers.
An alternative to client-side munging:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ tsbere/ sms_munge
That branch says "If it looks to be all digits, spaces, hyphens, and parentheses then strip it down to just digits. Otherwise assume that it is some kind of alias the service supports". It applies at the A/T layer and thus requires no DB updates, and makes no assumptions about lengths of numbers.