|A telephone number associated with the object.|
|Used on these elements|
|Status: in use|
|Tools for this tag|
A telephone number associated with a POI. See also contact:phone=* for an alternative way of tagging phone numbers.
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 an 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 (but even in this case, the "+1-xxx-xxx-xxxx" format for the NANP standard should be explicit, to indicate that this phone number is callable internationally: OSM user agents should not have to guess how to perform a call according to geographic locations, or according to the value of the first 3-digit group).
Note that for phone numbers that are in international E.164 format, space (or even hyphen) separators are not significant, but the convention is to use a separator at least between the ITU-T country code and the rest of the phone number. The other groupings are optional: area codes should preferably be separated only in countries where they are still used distinctly for domestic calls; in other countries, the groupings are just kept by convenience and according to local usages in phone books or as shown in amenities (these groupings may vary for mnemonic reasons only, there's no requirement to suppress these group separators even if they are ignored when dialing).
This is true also when the phone number has additional digits for target selection (e.g. in Germany where there's a common public part, with variable size, followed by an internal short number which may be locally dialed directly without using any trunk selection code before composing the national number). For the purpose of OSM, we should assume calls are being performed from a public network and not from a private internal network, and the full number should work even when dialing this full number with the trunk selection code from a local network where the short number should also work.
The same remark about separators applies for phone numbers that are not in E.164 format (because they are not usable internationally and can be dialed only domestically, either nationwide, or only from a more specific network).
Some mappers started to add emergency numbers to police stations, hospitals and fire stations. This is fine as long as local numbers are used and the number is really bound to the object. You should not map objects with universal emergency numbers (e.g. 911 / 110 / 112) for local objects since this could result in non emergency calls blocking real emergency calls when people try to reach a local police station, hospital or fire station with non emergency matters.
In NANPA countries such as the United States and Canada, businesses commonly use phonewords in posted phone numbers. phone=* should contain the numeric, fully resolved phone number for machine readability. Phonewords seen on signage etc. can go in phone:mnemonic=*, which could help search engines display the phone number more memorably. For example, "710-555-BEEF" would be tagged phone=+1-710-555-2333 phone:mnemonic=+1-710-555-BEEF and "55-KLICK" within the 710 area code would be tagged phone=+1-710-555-5425 phone:mnemonic=+1-710-55-KLICK.
How to map
Just add the phone=number tag to any map object that has a phone, following the format described above.
Italy does not omit the 0 in the international format like many countries do (the "0" default trunk prefix may be replaced by a "trunk selection code" in calls from within the country, but only for phone numbers that have this selection feature enabled: not all national phone numbers have a trunk selection code, and some ranges of "short" numbers, not starting with the default "0" trunk code, may also be called internationally; so this default "0" trunk code must still be used when calling from abroad). So the Milan number 02.724261 becomes phone=+39 02 724261 in OSM. A few other countries are doing the same and require dialing the national trunk selection code when calling them from abroad.
The phone numbers in the United States and Canada consist of the following four elements: "+" (plus sign), the international country code (1), the area code and the local telephone number (written in two memorable blocks). A locally formatted US number may look like this: (303) 555-1765 (without the international area code). The same phone number in E.164 format would be: +1 303 555 1765. However, the NANP notation (+1-303-355-1765) is used as a quasi-standard based on the local notation (see Usage section).
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). But please take care: In germany public telephones do not have phone numbers any more, because the service that they were callable has been discontinued.
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 (mobile phones accept this character in their contact list, but ignore it when performing calls). The same is true for separating spaces or dots.
- If the
'+'-sign is not supported by the device, it has to be replaced by the local international call prefix; e.g., 00 in most countries, or 011 in US. The dialing device may have to be configured accordingly (this is normally not needed for mobile phone devices that automatically recognize the rules used by the local mobile operator and preconfigured in its SIM card or in the phone firmware).
- The character ';' is sometimes used to separate multiple phone numbers.
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 (mostly seen when the amenity is on a country boundary, or is an international company).
One of the possible ways to solve this is by adding the ISO 3166-1 code at the end of the key. For example (all phone numbers below are invented only for documenting this page):
- phone=+32 57 53 62 45 for the country where the amenity is,
- phone:BE=+32 57 53 62 45 and phone:FR=+33 6 12654478 for different national phone numbers. Note that when using country codes, the convention is to make it uppercase, so it is not confused with a language code (but some mappers use lowercase instead).
Also some amenities have a local phone number which can only be used domestically not cannot be called internationally (notably for toll free phone numbers, or abbreviated phone numbers). For international calls, they publish another phone number. For example:
- phone:FR=0 800 123 456 for standard toll free call only from France where the amenity is (note that there's NO "+" sign, it is NOT in international format),
- phone=+33 1 23 45 67 89 when calling from any other country (note that it is not always possible to use it for domestic calls, or the toll free rate will not apply: users have to use the national number instead, they will most often be instructed by an automated vocal system: the most selective applicable key should be used; this means that OSM user agents should present the list of possible phone numbers, with their restrictions encoded in the subkey, to allow users to select which phone number to call, even if these agents preselect an applicable one).
Some phone numbers can also be called toll free (or with reduced rates) only when calling from a specific operator (such as customer services of that operator). When calling from another network, another national phone number or a standard geographic phone number must be used. For example, this could be tagged like this:
- phone:FR:mobile:SFR=3000 for standard toll free call only from the SFR mobile network (operator in France), sometimes even when calling from abroad with roaming access (provided you use the same SIM card of that operator); note that there's also no "+" sign for this short number (this phone number is not valid internationally). (adjust the "FR:mobile:SFR" subkey of the tag according to the conventions used in that country).
- phone:FR=0 810 123 456 for calls with flat rates from other networks only in France (still no "+" sign).
- phone=+33 1 23 45 67 89 when calling from any other country or network (international toll rates apply according to the pricing plan of the originating operator).
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.
- Maps.Me: Displays and dials the phone number of all types of indexed POI.
- Galileo Offline Maps: Displays and dials the phone number of all types of indexed POI.
Idea of deprecating either tags without contact: prefix or ones with contact prefix is repeatedly suggested, often triggering huge discussion and ending with conclusion that there is no consensus. Please, read past discussion before starting a new one.
- Key:contact - an alternative way of tagging phone number and other contact information which some mappers prefer
- emergency:phone=* - a tag to associate phone numbers specifically for emergencies
- Proposed features/Phone - A proposal for this tag, which has been rejected
- on Wikipedia
- on Wikipedia
- Tag:amenity=telephone public telephone, phone box
- Relevant Sophox queries:
- https://lists.openstreetmap.org/pipermail/tagging/2020-May/thread.html#52379 - May 2020 thread, over 50 messages
- https://lists.openstreetmap.org/pipermail/tagging/2019-December/thread.html#49474 - December 2019 thread
- https://lists.openstreetmap.org/pipermail/tagging/2019-August/thread.html#47668 August 2019 Thread