Dialplan Application
This usage mode allows for module actions to be performed at specific points of a dialplan execution. The syntax is straight forward:
<action application="phonenumber" data="<action(s)> <scope> [parameter(s)]"/>
- actions - the implementation accepts one or more (comma separated) actions to be executed;
- scope - represents the input the actions will be executed against; it can be set to
caller
,destination
,all
or an actual number (likely by expanding a previously set variable); - parameters - one or more (comma separated) parameters the actions will have to observe. When omitted, default values will be inferred from module’s configuration;
In this usage mode, the actions’ output will be returned in the form of channel variables; their naming is dictated by the responsible action as well as the scope. The table below outlines the channel variable names based on the executed action and the scope:
Action | caller | destination | Number |
---|---|---|---|
is_alpha_number | phonenumber_caller_is_alpha_number | phonenumber_destination_is_alpha_number | phonenumber_number_is_alpha_number |
convert_alpha_characters_in_number | phonenumber_caller_alpha_characters_in_number | phonenumber_destination_alpha_characters_in_number | phonenumber_number_alpha_characters_in_number |
normalize_digits_only | phonenumber_caller_digits_only | phonenumber_destination_digits_only | phonenumber_number_digits_only |
normalize_diallable_chars_only | phonenumber_caller_diallable_chars_only | phonenumber_destination_diallable_chars_only | phonenumber_number_diallable_chars_only |
get_national_significant_number | phonenumber_caller_national_significant_number | phonenumber_destination_national_significant_number | phonenumber_number_national_significant_number |
format_out_of_country_calling_number | phonenumber_caller_out_of_country_calling_number | phonenumber_destination_out_of_country_calling_number | phonenumber_number_out_of_country_calling_number |
format | phonenumber_caller_format | phonenumber_destination_format | phonenumber_number_format |
get_number_type | phonenumber_caller_number_type | phonenumber_destination_number_type | phonenumber_number_number_type |
is_valid_number_for_region | phonenumber_caller_valid_number_for_region | phonenumber_destination_valid_number_for_region | phonenumber_number_valid_number_for_region |
get_region_code | phonenumber_caller_region_code | phonenumber_destination_region_code | phonenumber_number_region_code |
is_possible_number_with_reason | phonenumber_caller_is_possible_number_with_reason | phonenumber_destination_is_possible_number_with_reason | phonenumber_number_is_possible_number_with_reason |
is_possible_number | phonenumber_caller_is_possible_number | phonenumber_destination_is_possible_number | phonenumber_number_is_possible_number |
get_description_for_number | phonenumber_caller_description_for_number | phonenumber_destination_description_for_number | phonenumber_number_description_for_number |