Parameters

Parameters

default_region

This parameter is widely used by most actions during the parsing process. Its purpose is to provide the parser with an assumed region whenever the input number is not in international format. It should always be formatted as a two character region code; if the input number is written in international format, the parameter is not used and can be set to ZZ.

format

This parameter is currently used only by the format action, instructing it on how to output its result. It can take one of the following possible values:

  • E164 - will render the E.164 international notation of the input number however with no formatting applied (e.g. +16172531000)
  • INTERNATIONAL - format is consistent with the E.164 notation with formatting applied (e.g. +1 617-253-1000)
  • NATIONAL - format is following the ITU-T E.123 recommendation however it includes local formatting conventions (e.g. (617) 253-1000)
  • RFC3966 - is as per international format, but with all spaces (and other separating symbols) replaced with a hyphen; it also will have a prefix of “tel:” added (e.g. tel:+1-617-253-1000)

locale

Presently used only by the get_description_for_number action, it dictates which language should it used for its output (if available). Must be formatted as a language/region tag combination, e.g. es_MX, fr_BE, en_GB etc. For example running the action against +447400982200 as input will render the following values:

localeResult
en_USUnited Kingdom
fr_FRRoyaume-Uni
es_ESReino Unido

calling_from

This parameter will instruct format_out_of_country_calling_number on which region will the input number be dialed from, so it would format it using the local conventions for international dialing. It should always be formatted as a two character region code. For example running the action against the 030 34637000 German number will render the following values:

calling_fromResult
GB00 49 30 34637000
US011 49 30 34637000