JA:Key:phone

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg phone
Phone number on a shop.jpg
説明
オブジェクトに関連する電話番号。 Show/edit corresponding data item.
グループ: 注釈
適用できる要素
ノードに使用可能ウェイに使用可能領域に使用可能リレーションに使用可能
状態:事実上の標準

broom

Help (89606) - The Noun Project.svg

POI に関連付けられた電話番号です。電話番号の他のタグ付け方法について、 contact:phone=* も参照してください。

概要

対象物(特に会社、娯楽、施設などのためのもの)に電話番号を関連付けておくと、便利なことがあります。たとえばお店や博物館、居酒屋などです。ノードやエリアの対象物です。電話番号(phone)は、実際に存在するオブジェクトを記述するタグの中で、常に他のタグよりも重要であることは明らかです

phone=* は広く使用され、多くのマッパーに受け入れられていますが、自国のプライバシー関係の法律(訳注:個人情報保護法など)を侵害しないように確認してください(特に個人の電話番号)。

用法

  • phone=電話番号 この電話番号は、国際規格(ITU-T E.164)の形式に準じてください。
    • ITU-T E.123 に従えば、 phone=+<国番号> <市外局番> <市内局番> のパターンです。
    • (RFC 3966/NANP に従えば、 phone=+<国番号>-<市外局番>-<市内局番> のパターンです)

市外局番を使わない国では、その部分はを省略してください。

fax=電話番号 も同じ方法を使うことができます。

一部の国では、電話番号の表記方法における国の標準がとてもよく普及していることがあり(例えば、日本では 0xx(xxx)xxxx)、そのような国のマッパーは前述の標準以外の書式を好むことがあります(ただしこのような場合であっても、国際電話が受けられる電話番号では、 NANP 標準である "+1-xxx-xxx-xxxx" の書式が正しいです。 OSM ユーザーエージェントは、地理的な位置や、最初の3桁から電話のかけ方を推測してはいけません)。

国際E.164形式で表記された電話番号では、スペース (またはハイフン) による分割についてはっきり決まっているわけではありませんが、慣習では「少なくとも」ITU-T国番号とそれ以外の部分との間には区切りを入れるようになっています。その他の区切り方は任意です : 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).

マッピング方法

上述の形式に従い、電話がある任意の地図の対象物に、 phone=number タグを追加するだけです。

ページトップ右側に表示されているイラストは英国 (コード44)、London (エリア 20)にあるので、 phone=+44 20 84527891 のようにタグ付けできます。

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.

日本の場合

市外局番2ケタのとき

03-1234-5678

+81 3 1234 5678

市外局番3ケタのとき

075-123-4567

+81 75 123 4567

市外局番4ケタのとき

0460-12-3456

+81 460 12 3456

市外局番5ケタのとき

04992-1-2345

+81 4992 1 2345

電話ボックスの電話番号

電話ボックスにも電話番号があります。混乱しないようにしてください。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 (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).

Support for multiple 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 code at the end of the key. For example (all phone numbers below are invented only for documenting this page):

  • 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 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.
  • OSM Query: Displays phone numbers as 'callto' links that work with Skype for example.
  • Maps.Me: Displays and dials the phone number of all types of indexed POI.

関連項目