@voice can support various translation rules when it comes to CLI and CLD. This is a convinent feature if your existing switch does not support it. Generally, it does as advertised where you can convert a CLD (calling number) from +13379987654 to go out as 13379987654 (the prefix “+” was removed in this instance).
Translation Rules are specified either as a replacement numbers or as a set of regular expressions with Python syntax in the following two forms:
s/<match what>/<replace with>/
s/<match what><replace with>/g
The former will match/replace a single matched occurrence or pattern, while the former – all of them. Several expressions may be used in one translation rule; in this case they need to be separated by semicolon (“;”).
There are several “special” symbols in <match what> which allows to define matching rules, for example ^ matches beginning of the string, while $ - its end, so that for example ^1 will only match 1 as the first character of the string, while 9$ will only match 9 as a last character.
For example the following translation rule can be used to strip leading 0011 prefix from the number:
The following translation rule will add 53872# prefix:
While the next rule will result in the number replaced with 123456 in all cases unconditionally.
Translate all non 10 digits CLIs into the new one, and bypass the CLIs with another length
Exclude + from the front of the number
Add 1 to any sequence of 10 symbols:
Check if number contains the "space" OR "-" (dash) OR "." (dot) and replace all with "block":
Indicate space in number and remove it:
To setup your translation rule for Australian domestic dialling, you can use the below:
For more details on Python regular expressions syntax please check the following link: