INTPHONE1

This function standardizes international phone numbers by analyzing international calling codes.

The INTPHONE1 function has a length limitation of 64 digits. If the value of the length of the INTPHONE1 field is over 64 digits, the operational server truncates the input value to the first 64 digits of the value.

Output Type
any
Fldargs
phicc,pharea,phnumber
MinFldArgs, MaxFldArgs
3,3
Number of standard roles
1
  1. The international calling code, area code, and the phone number are required fields to this function and the function first checks to make sure that the number of inputs are correct. If you do not configure the function correctly by leaving out one of these required fields, the operational server cannot start.
  2. The non-digits are eliminated as a first filtering step.
  3. The phone number field is then checked to see if there is an international dialing prefix (for example, +44) and if present, this is trimmed off. Then the country calling code is checked to verify that it is present in the phone number (by checking the valid list of country calling codes). If the code is present, it is also trimmed from the phone number field.
  4. If there is an international dialing prefix in the area code field, it is trimmed off the string. The country code is also checked and, if present, is also trimmed.
  5. If these two steps do not yield a prefix or country code, the international calling code field is checked and the country code output from is used for processing.
  6. After removing the prefixes and country codes, any long-distance characters (0 or 1) are removed from the start of the remaining phone number.
  7. The country calling code from the steps is used to determine the country to which the phone number belongs.
    • 1 - US phone
    • 33 - French phone
    • 44 - UK phone
    • 49 - German phone
    • Other - default phone standardization
  8. The number is then checked for min and max lengths. These min and max values are based on the country of origin. For each country of origin, max length is defined to be the longest legal phone number consisting of long-distance prefix + local number. This does not include the long-distance access numbers (for example, the 0 or 1 at the beginning of a phone number). The MinLength is the shortest legal local number and does not include any in-country access codes.
    1. If the phone string is less than minLength, the phone number is treated as an anonymous value.
    2. If the phone string is less than or equal to the maxLength, the remaining string phone string is returned.
    3. If the phone string is greater than maxLength, the left most maxLength characters are returned.
  9. The number is also checked to see if it is present in the ANON table and is treated accordingly.
  10. The standard role (stdrole) 2 is used for bucketing. The last six digits of the phone number are used.
INTPHONE1 example:

+44 (0) 282 999 7788 is converted to 2829997788.