- The application collects the phone numbers of the two parties whose numbers you wish to mask.

- The application makes a Number Masking API request to Plivo with the phone numbers and authentication parameters as mentioned in the session object reference.

- Plivo creates a number masking session and assigns to it a virtual phone number from your Plivo account.

- Both parties receive the virtual phone number, along with unique PIN codes that both parties will use to enter the call if calling from an unknown number.
- If either party calls the virtual phone number from a registered number, they will automatically be connected. The caller ID is set to the virtual phone number, masking the real phone numbers of both parties from each other.

- If either party dials the virtual phone number from an unknown number, they will be prompted to enter the PIN. Once the authentication is successful, they will be connected.

Prerequisites
A Plivo account is required — sign up with your work email address if you don’t have one already. You must have a voice-enabled Plivo phone number to create number masking sessions. You can rent numbers from the Numbers page of the Plivo console, or by using the Numbers API.Create a PIN-based session
Here’s a sample cURL request to create a number masking session with PIN authentication.cURL