nbarr / bearfax

0 stars 0 forks source link

Parse / E.164 Formatting #7

Closed nbarr closed 7 years ago

nbarr commented 7 years ago

Parse and transform user inputted numbers to E.164 for database storage and Twilio submittal.

Library of choice, but appears this one does the job https://pypi.python.org/pypi/phonenumbers

nosuchip commented 7 years ago

Already done. Twilio has only one requirement from entire E.164 spec -

  1. Plus sign
  2. Country code
  3. Phone number

Without spaces between. It is already done. In database phone numbers stored in format:

  1. Country code
  2. Phone numer

Plus sign added right before sending fax to Twilio. All non-numeric characters from fax numer are stripped before putting to database.