Help:Datatype "Telephone number"

From Linux Web Expert

Telephone number
[[Has description::Holds international telephone numbers based on the
Request for comment (RFC)
Type Telephone number
Component General
Creation date {{{created}}}
Author(s) {{{author}}}
Document status
standard]]
Further information
Provided by: Semantic MediaWiki
Since version: 1.5.0
Until version: still in use
Datatype ID: _tel
In this wiki: Telephone number
Table of Contents

The datatype telephone number is used for international telephone numbers that are to be stored in a standardized format. The datatype will try to interpret the phone number according to

Request for comment (RFC)
Type Telephone number
Component General
Creation date {{{created}}}
Author(s) {{{author}}}
Document status

1 so that it can be exported in a machine-readable format using tel: URIs.

Applications that do not need any re-use or validation of telephone numbers can also use datatype datatype "Text"Holds text of arbitrary length to store arbitrary human-readable phone number strings.

Declaration and Usage

A property of this type can be declared by writing [[has type::Telephone number]] on the property page.

Values of this property are complete phone number strings including country code. It is allowed to use the symbols "/", "-", ".", or " " to structure phone numbers in a readable way. These symbols will be used for the display of the data. Note that for the storage of data only the symbols "/", "-", "." are used but not a space. If spaces were specified for display a hyphen will however be used for storage, e.g. "+49-30-45-08-49-40" instead of "+49 30 45 08 49 40". The reason for this is that though the International Telecommunication Union (ITU) recommends the use of space characters as visual separators in printed telephone numbers

Request for comment (RFC)
Type Telephone number
Component General
Creation date {{{created}}}
Author(s) {{{author}}}
Document status

by the Internet Engineering Task Force (IETF) defines that URIs for telephone numbers MUST NOT use spaces in visual separators to avoid excessive escaping.2

Global numbers must always start with "+" or "00". Optionally, it is allowed to write the

Request for comment (RFC)
Type Telephone number
Component General
Creation date {{{created}}}
Author(s) {{{author}}}
Document status

1 URI prefix "tel:" in front of any telephone number.

The datatype does not support local numbers (without global country code). Moreover, it is not allowed to use vanity numbers since the mapping from letters to numbers is not standardized internationally.

Examples

Below are some examples of correct phone numbers:

Preferred annotations
[[Has telephone number::+353-91-555560]]
[[Has telephone number::00353-91-555560]]
Allowed annotations
[[Has telephone number::+353.91.555559]]
[[Has telephone number::+353 91 555561]]
[[Has telephone number::+ 353 91 555562]]
[[Has telephone number::+353 91 5 55563]]
[[Has telephone number::+353/91/555564]]
[[Has telephone number::00353 91 555565]]
[[Has telephone number::00353 / 91555566]]

It is allowed to write tel:in front of any of these examples, as in [[Has telephone number::tel:+353-91-555560]]. Moreover, some special fields are also allowed (see

Request for comment (RFC)
Type Telephone number
Component General
Creation date {{{created}}}
Author(s) {{{author}}}
Document status

1 for explanation):

[[Has telephone number::tel:+353-91-555560;postd=pp22]]
[[Has telephone number::tel:+1234567890;phone-context=+1234;vnd.company.option=foo]]
Invalid annotations

The following examples are not allowed and will lead to errors:

[[Has telephone number::+353 (0) 91 555555]]
[[Has telephone number::(00353 91) 55 55 55]]
[[Has telephone number::+353-91-55555-5/-6]]
[[Has telephone number::091 555 555]]
[[Has telephone number::+353-91-CALLME]]
[[Has telephone number::+353-91-55555-5 after 6pm]]
[[Has telephone number::+-353-91-55555-5]]
[[Has telephone number::+1]]
API example

<ul><li>The part "|Telephone number" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>

Semantic search

Using telephone number properties for searching pages can be done in a similar fashion as for all other properties; see Help:Semantic search. As with any property, you can use the "+" wildcard to select all pages with some value for a telephone number property, for example {{#ask: [[Has telephone number::+]] }}.

Warning: Default sort key "Telephone number" overrides earlier default sort key "Type Telephone number".

#scite could not render a citation text for reference "ietf:rfc:3966" because type "rfc" was not assigned to a template.
#scite could not render a citation text for reference "ietf:rfc:3966:511" because type "rfc" was not assigned to a template.

References

  1. a b c ietf:rfc:3966 
  2. ^ ietf:rfc:3966:511