|A telephone number associated with the object.|
|Used on these elements|
|Tools for this tag|
A telephone number associated with a POI.
|December 2013 - Although more and more user use the new contact=* tags today, the old tags (phone=*, fax=*, website=* and url=*) can be found five times often in OSM database. Most applications support both tagging schemata.|
Sometimes it is useful to associate a phone number with an object, especially for business, leisure or amenities. A shop, a museum or a pub for example. The object can be on a node or a area. Clearly phone is always an additional descriptive tag to be added alongside other more important tags which denote what the object actually is.
phone=* is widely used and accepted by many mappers but verify that you are not violating data privacy laws in your country (especially for private phone numbers).
- phone=number where the number should be in international (ITU-T E.164) format
If your country does not use area codes, that part should be left out.
fax=number may be used in the same way.
Some countries have very well established national standards on how telephone numbers are written (e.g. xxx-xxx-xxxx in the US) which leads to mappers in those countries preferring that format over the aforementioned standards.
How to map
Just add the phone=number tag to any map object that has a phone, following the format described above.
The illustration shown in the top-right is a shop in the UK (code 44), in London (area 20), so could be tagged with phone=+44 20 8452 7891. Italy does not omit the 0 in the international format like many countries do, so the Milan number 02.724261 becomes phone=+39 02 724261 in OSM.
Phone numbers of telephone boxes
Even phone boxes have telephone numbers. Don't be confused. Telephone boxes must always be tagged with amenity=telephone to describe what the object is. You can add the phone=* tag to supply the extra detail of its telephone number (depending on how diligent you feel like being).
phone=+49 4721 28695 for a public phone box on the German island Neuwerk.
Parsing phone numbers
Clearly it will be dangerous to assume that mappers have followed the above format correctly. Code using this tag might defensively reject or attempt to correct possible formatting errors. Specific things to note:
- When dialling the
'-'-signs have to be omitted
- If the
'+'-sign is not supported, it has to be replaced by the local international call prefix; e.g., 00. The dialling device has to be configured accordingly.
Support for multiple countries
|This hasn't been voted and is just a documentation of use|
Some amenities provide a different phone number for different countries (most seen when the amenity is on a country boundary, or an international company). As I was wondering how to map this, I used the following schema:
- phone=+32 57 536245 for the country where the amenity is
- phone:be=+32 57 536245 and phone:fr=+33 6 12654478 for different national phone numbers. Note that the country code is used, not the language code.
This makes sure tools don't have to adapt for those few border cases, and the OSM data is complete.
Applications / Web services that display or dial the number from OSM
- Offmaps (iPhone): Displays and dials the phone number in the app's downloadable City Guides.
- OsmAnd: Displays and dials the phone number of all types of indexed POI.
- OpenLinkMap: A slippy map, making this tag's data available as clickable POIs