Discussions/tagging/contact:phone or phone/content
Format of phone numbers
Phone numbers should be always in the following format (ITU-T E.123 and DIN 5008):
+<country code> <area code> <local number>
+<country code>-<area code>-<local number>
Both in ITU-T E.164 format
Usage
Just add the phone=number tag to any map object that has a phone, following the format described below.
Key | Description | Example | Notes |
---|---|---|---|
contact:phone
|
Put in the phone number under which the facility which runs that POI can be contacted. | contact:phone=+49 3316 769689
|
This phone number must be in international format and it must be able to call this phone number from abroad. |
contact:phone:<country code>
|
Phone number for people living in <country code> or speaking the language of <country code>. | contact:phone:FR=+33 6 12654478 or contact:phone:BE=+32 5753 6245
|
See the Tagging different numbers for different countries section for better explanation. |
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 contact:phone=* tag to supply the extra detail of its telephone number (depending on how diligent you feel like being).
contact:phone=+49 4721 28695 for a public phone box on the German island Neuwerk.
Discouraged/harmful mapping
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.
Country specified
In NANPA countries such as the United States and Canada, businesses commonly use phonewords in posted phone numbers. contact:phone=*
should contain the numeric, fully resolved phone number for machine readability. Phonewords seen on signage etc. can go in contact:phone:mnemonic=*
, which could help search engines display the phone number more memorably. For example, "710-555-BEEF" would be tagged contact:phone=+1-710-555-2333
contact:phone:mnemonic=+1-710-555-BEEF
and "55-KLICK" within the 710 area code would be tagged contact:phone=+1-710-555-5425
contact:phone:mnemonic=+1-710-55-KLICK
.
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).
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 assumption that in the international phone number format the zero must go away is wrong.
Tagging different numbers for different countries
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 country code at the end of the key like contact:phone:<country code>
e.g. contact:phone:BE
. For example (all phone numbers below are invented only for documenting this page):
contact:phone=+32 57 53 62 45
for the country where the amenity is,contact:phone:BE=+32 57 53 62 45
andcontact: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.
Also some amenities have a local phone number which can only be used domestically (cannot be called internationally) E.g. toll free phone numbers, or abbreviated phone numbers. For international calls, they publish another phone number. For example:
contact: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),contact: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).
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.
See also
- Proposed features/Phone - A proposal for Key:phone, which has been rejected but then approved and years later then finally deprecated (use is discouraged).
- https://wiki.openstreetmap.org/wiki/Discussions/tagging/contact:phone_or_phone?veaction=edit - A proposal to deprecate Key:contact:phone in the first place. After this has failed it has been used to deprecate Key:phone sucessfully.
- List of country calling codes on Wikipedia
- Prefix code on Wikipedia
- Tag:amenity=telephone public telephone, phone box