Atom Telecom
DocumentationAI Assistant
  1. Home
  2. Support
  3. Voice
  4. CLI/CLD Translation

CLI/CLD Translation

2 min readVoice
For CLI translation, you will now be able to select the DID associated with the service to be the CLI when a call is made. If the Default option is selected, the Atomic switch will only use the CLI that is passed on by your switch/device.

Atomic can support various translation rules when it comes to CLI and CLD. This is a convenient 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 first 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:

plain text
s/^0011//

The following translation rule will add 53872# prefix:

plain text
s/^/53872#/

While the next rule will result in the number replaced with 123456 in all cases unconditionally.

plain text
123456

Translate all non 10 digits CLIs into the new one, and bypass the CLIs with another length

plain text
s/^.{0,9}$/0123456789/

Exclude + from the front of the number

plain text
s/^[+]//

Add 1 to any sequence of 10 symbols:

plain text
s/^(.{10})$/1\1/

Check if number contains the "space" OR "-" (dash) OR "." (dot) and replace all with "block":

plain text
s/^.*([ ]|\-|\.).*$/block/

Check for any space between numbers and remove it:

plain text
s/[ ]//

To setup your translation rule for Australian domestic dialling, you can use the below:

plain text
s/^[13]{2}(?=[0-9]{8}$)/6113/; s/^[13]{2}(?=[0-9]{4}$)/6113/;s/^0{1}(?=[0-9]{9}$)/61/;s/^[18]{2}(?=[0-9]{8}$)/6118/

For more details on Python regular expressions syntax please check the following link:http://docs.python.org/release/2.4/lib/re-syntax.html

Was this article helpful?

Related articles

2-way SMS

Voicemail

Adding / Removing Channels

Editing DID’s

Need more help?

Chat with our AI assistant

Back to Voice

Copyright © 2025 Atom Telecom. All rights reserved.