Converting local numbers into international format (for use with Rails and services such as Nexmo/Twilo) <p>I want to verify my users phone numbers using a service such as Nexmo or Twilo.</p> <p>To send a message via these services I need to supply the international number, however, I do not want to have to ask my users to provide the full international number - just their normal number that they would give to anyone in their own country (I don't expect them to know their international dialling codes, etc).</p> <p>So what is the best way to convert a local national number into an international one? As well as their number, each user will be asked to provide their country. (My user base will be international.)</p> <ul> <li><p>Should I add an extra field to the Country table that holds the international dialling code - and then just construct the full international number? This seems ok until you consider that some countries require omitting the 0 at the start of the number, and others don't.</p></li> <li><p>Is there an easier way? Or gem out there that does this? </p></li> </ul>