Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

This module was created to format numbers into a specified format (preferably e.164) for doing ENUM or LCR lookups, based on a set of regular expressions listed in translate.conf.xml. When used as a dialplan module, it can rewrite both the caller id number and destination number of the call before it reaches the XML dialplan, considerably simplifying dialplan and xml_curl configuration which in turn translates the values used in the CDR.

 Click here to expand Table of Contents

Configuration

The configuration file allows for a number of profiles, each listing a number of regex rules which are processed in order. It appears that the first match is used. Here is an example configuration for translating numbers in the United Kingdom to E.164 format.

API

from the cli:


If profile is not specified, it defaults to US

APP

The following will translate the destination number using the US profile defined in the translate.conf.xml


The result is stored in a new channel variable called translated which you can then use to transfer the call back to the dialplan


It can also be used as part of a variable

Dialplan

The following example will translate the destination_number and caller_id_number from a call coming in on a sofia profile before it goes to the XML dialplan

Profile Resolution

The order the profiles are resolved in is as follows:

  1. Checks the following channel variables in this order:
    1. translate_profile
    2. country
    3. default_country
  2. Fall back to US