This repository contains XML Schemas used in EWP APIs for encoding phone and fax numbers. It follows the same versioning rules as all EWP APIs do. Other projects are welcome to reuse this schema, along with its namespace. We are also open to suggestions of extending it.
As opposed to addresses, phone number formats were much easier to decide upon, because there already exists an international standard for handling those.
You can read more on this standard:
There are free libraries, such as Google's libphonenumber, which allow you to convert between national phone numbers and E.164. This means that clients will be able to "pretty print" such number, and server should also be able to easily provide them in E.164 format.
However, if - for some reason - the server is not able to convert its data to
E.164 format, we allow it to be provided in unformatted way too (with the
<other-format>
element).
See attached schema.xsd
file.
<phone>
<e164>+4723456789</e164>
</phone>
<phone>
<e164>+4722222222</e164>
<ext>3407</ext>
</phone>
<fax>
<!-- To be avoided. -->
<other-format>(23) 456789</other-format>
</fax>