Phone number data type

The phone number data type can be a useful tool in helping flow authors easily obtain property details about a phone number. In Architect, a phone number includes one of three schemes:

Scheme Description
tel This scheme is a tel URI in a format as specified in RFC 3966 and followed by a phone number optionally formatted according to E.164 formatting specifications. E.164 is the international standard for how global phone numbers are allocated and used. For more information, see About the tel scheme.
sip This scheme is followed by a SIP URI formatted address of the user’s SIP phone number. The standard format for a SIP URI is: USER@ADDRESS.
Note: You can also specify “sips” to allow resources to specify that they should be reached securely. Architect does not differentiate between sip or sips when classifying the scheme.

For example, let’s examine the following phone number string: 

tel: +13175551286

In this string:

  • The + indicates that this is a global phone number.
  • Immediately following the + in a global phone number is the “international dialing code” (sometimes called the “country code”), which can be 1 to 3 digits. In our example, it is 1.
  • The remaining digits are known as the “subscriber number”.
Note: Most international dialing codes are associated with one or more countries. For example, dialing code 1 is used for Canada, the United States, and 23 other countries and territories near North America (but not Mexico), dialing code 44 reaches the United Kingdom, 49 reaches Germany, and 31 reaches the Netherlands. Architect allows you to refer to the appropriate codes using the two-letter country abbreviations such as System.Regions.US.dialingCode (the United States dialing code of 1) or System.Regions.CA.dialingCode (Canada also shares the value 1) or System.Regions.NL.dialingCode (the Netherlands dialing code of “31”).

For more information, click to expand a section below.

A PhoneNumber is equal to another PhoneNumber if one of the following conditions are met for both phone numbers:

  • The isTel properties are true and the subscriberNumber properties are equal.
  • The isSip properties are true and the uri properties are equal.
  • The isTel and isSip properties on both PhoneNumber values are false and the raw properties are equal.

Property Type Description
uri String The URI for a sip, sips, or tel scheme phone number, otherwise a NOT_SET string. For any value of type PhoneNumber except the special value NOT_SET, the uri property will return a value.
e164 String The E.164 formatted string for a tel scheme phone number with a valid E.164 phone number, including dialing code and subscriber number, otherwise a NOT_SET string.
subscriberNumber String For a valid tel scheme phone number, the subscriber number portion of the E.164 number reported by the .e164 property–the E.164 number without the “+” and dialing code.
dialingCode String The E.164 formatted dialing code string for a tel scheme phone number, otherwise a NOT_SET string.
isSip Boolean True for a sip or sips scheme phone number, otherwise false.
isTel Boolean True for a tel scheme phone number, otherwise false. 
isGlobal Boolean True for a tel scheme phone number that contains a global number, otherwise false.
scheme String The scheme set on this phone number: tel, sip, or sips. If a scheme cannot be determined, this string will be NOT_SET.
raw String The entire string value used to create the phone number instance.

Use the phone number type in expressions and access phone number information. The following example strings illustrate the property information you can extract from a phone number type:

Example: +13175550116

If you create a phone number from ToPhoneNumber(“+13175550116″), you get:

Property Output
uri “tel:+13175550116”
e164 “+13175550116”
subscriberNumber “3175550116”
dialingCode “1”
isSip false
isTel true
isGlobal true
scheme “tel”
raw “+13175550116”

Example: +13175550116

If you create a phone number from ToPhoneNumber(“+1 (317) 555-0116″), you get:

Phone Number Property Output
uri “tel:+13175550116″
e164 +13175550116″
subscriberNumber 3175550116″
dialingCode “1”
isSip false
isTel true
isGlobal true
scheme “tel”
raw “+1 (317) 555-0116″

Example: 13175550116

If you create a phone number from ToPhoneNumber(“13175550116″), you get:

Phone Number Property Output
uri “tel:13175550116″
e164 NOT_SET
subscriberNumber “3175550116″
dialingCode “1”
isSip false
isTel true
isGlobal false
scheme “tel”
raw “13175550116″

Example: someone@example.com

If you create a sip number from ToPhoneNumber(“sip:someone@example.com”), you get:

Phone Number Property Output
uri “sip:someone@example.com
e164 NOT_SET
subscriberNumber NOT_SET
dialingCode NOT_SET
isSip true
isTel false
isGlobal false
scheme “sip”
raw “sip:someone@example.com

Example: +442079460193

If you create a phone number from ToPhoneNumber(“+442079460193“), you get:

Property Output
uri “tel:+442079460193”
e164 “+442079460193”
subscriberNumber “2079460193”
dialingCode “44”
isSip false
isTel true
isGlobal true
scheme “tel”
raw “+442079460193”