TryLearn More

Use SIP trunks, WebRTC & Apps

Slash your Phone Bill by 80%

Caller ID Reformatting

On this topic

Caller ID Reformatting

Introduction

CID Building rules

Configuring Caller ID Reformatting

Examples

Scenario 1

Scenario 2

Additional Notes

Introduction

In 3CX Phone System Version 15.5, each port/trunk/PSTN gateway or VoIP Provider trunk can get the incoming Caller ID number and format it in a way that the administrator wishes in order to have a prefix added, or present a unified number format in inbound and outbound calls.

CID Building rules

The configuration for inbound and outbound Caller ID formatting is the same. Due to the complexity of this task, basic string operations need to be understood.

  • ( ) Brackets – These are used to encapsulate variables and numbers. Each bracket will contain a variable.
  • (.*) – This means any sequence or number in a string. This should be always in the last position. Any variables added after this will be ignored.
  • 0-9,+ – Digits 0-9 and ‘+’ – These are used to match a corresponding symbol in a given CID.
  • (XXX) – Where X can be any digit from 0-9. Example if a number is 02031234567 and you put (0203) this means that the PBX will search for a string that matches 0203 exactly.
  • \1, \2 – \9 – This will be replaced with the content of variable 1, 2, ..9.
  • (.) – A dot is a placeholder for any symbol. Example (…) means pbx will match any 3 numbers. If you know that area code starts with 3 and contains three numbers you can enter (3..)

Configuring Caller ID Reformatting

To configure Caller ID reformatting:

  1. Expand the SIP trunks node in the 3CX Management Console and select the Port/Trunk that you want to configure.
  2. Click on the Trunk, select “Edit” and then  select the Caller ID tab.

  1. In the section Inbound” and Outbound”, create and apply your rules for incoming or outgoing Caller IDs.
  2. You can apply more than one rule per direction. Rules have priority and the rule that is matched first will be applied.

Examples

Scenario 1

Company ABC wants all USA international numbers to be formatted to a local number format instead of an international format that is being received through the VoIP provider, so we want to reformat +12021234567 as 1234567. In this case we can make a simple inbound Caller ID reformatting rule that states the following:

Source CID Pattern: +(1)(…)(.*)

Replace CID Pattern: \3

In this example:

  • + will be removed,
  • (1) refers to the country code for USA and is considered the first variable – \1
  • (…) refers to a 3 digit area code and is the second variable – \2
  • (.*) The remaining number and therefore this is the third variable – \3

This means is that we are keeping only the 3rd variable – the local number only. So an incoming number that is presented like this: +18135910130 will be shown as 5910130.

Scenario 2

Company ABC wants to add a 0 to the incoming caller ID number for quick redial purposes. The incoming number looks like this: +18135910130. Plus they would like to format the number in national format.

Source CID Pattern: +(1)(…)(.*)

New Source CID Pattern: 0\2\3

In this example:

  • The number ZERO (0) will be prepended to the result
  • the PBX will take variable \2 (813) and variable \3 (5910130) to create the result: 08135910130.

Additional Notes

  • Outbound Caller ID Reformatting requires the use of the “OriginatorCallerID” to be active in the SIP Trunk “Outbound Parameters” settings.
  • You can specify several re-formatting rules per Trunk
  • The re-formatting rule will apply in a top down order
  • These rules will not rewrite the  incoming From:Display value,which means that if the call has been received with +18135910130, the display will still show these numbers, but the “core part” of the number to be dialed has been updated.