phonenumber

A phone number.

At a glance

Writing

Write the number as text in any common format: (202) 555-0123, 202.555.0123, +1 202-555-0123. It is stored in international E.164 form, +12025550123.

A number can carry what to dial after it connects:

The stored text is always the number, then ext and the extension, then , and the keys: +12025550123 ext 45,WW1#.

Written as

A JSON string whose schema format is phonenumber.

Reading

You read back that stored text. It is the same however the number was first written, so one number always reads, and compares, the same.

Querying

A value compared with =, !=, in or a comparison is read as a phone number first, in any format the field accepts, so 2025550123 finds +12025550123, for every value of an in list too. A like, ilike or regex pattern is used as written.

Call | from_number = "2025550123" | select id, from_number, start_time | limit 20
Call | to_number in ("(202) 555-0123", "202.555.0199") | select id, to_number | limit 20

Phone numbers are not word-searchable. To match part of one, use ilike on the stored E.164 text, such as an area code, which checks every row in scope:

Party | phone_numbers ilike "+1202%" | select id, phone_numbers | limit 20

A number stored with an extension or keys is not equal to the bare number.

Every operator is in the HQL reference.

Operations

Through the dtypes resource: