How to mask phone number for outgoing or incoming calls

Phone number masking allows displaying a different number instead of a real caller/ called ID to user in call dialog and CDR. The masking is implemented via the variable "force_lookup_number" added to Dialplan application "Set".

Created: November 2018

Permalink: https://wildix.atlassian.net/wiki/x/gg7OAQ



Phone number masking ensures user privacy and is very useful in cases when revealing personal numbers of agents or customers is not preferable. The masking is implemented via a special variable "force_lookup_number" which allows displaying a specified number instead of real called / caller ID in call dialog and CDR. It is set up via Dialplan application "Set". Masking can be performed for both outgoing and incoming calls.

FORCE_LOOKUP_NUMBER is not present in the list of available variables for "Set" Dialplan application. You need to enter this variable manually into the field.


Useful sources:

Phone number masking for outgoing external calls

When a user dials phone number, a different number (specified in Dialplan) is called instead of the number known to the user.

To mask a phone number of outgoing call, add the following Dialplan applications to a procedure used for making outgoing calls ("users" by default):

  • Set -> FORCE_LOOKUP_NUMBER -> XXXXX 
    where "XXXXX" is the number to be displayed to a user 
  • Dial the trunk/ Trunk group → Set (Number - indicate the real phone number to be called) -> dials the real phone number via the specified trunk/ group of trunks 


Result: user dials the number 778899, an external mobile number is called via the trunk, user can see only 778899 in call dialog and in call history

Phone number masking for incoming external calls

When a user receives an incoming external call, a different number is displayed instead of a real caller's number.

To mask a phone number of an incoming call, add the following Dialplan applications to a procedure used for receiving incoming calls ("main" by default):

  • Set -> FORCE_LOOKUP_NUMBER -> XXXXX
    where "XXXXX" is the number to be displayed to a user
  • Lookup caller name in phonebook -> searches for the caller name in a specified phonebook