Destination Number Validation
By using Plivo’s enhanced destination number validation feature, you can identify invalid destination numbers and numbers that aren’t enabled for SMS or MMS services. It fixes incorrect destination number formats too. This enhanced validation should result in better delivery rates and increased cost savings from SMS and MMS messages not being sent to numbers that are incapable of accepting them
Synchronous Handling for Invalid Numbers
SMS API requests to invalid and non-SMS-enabled numbers are rejected with a 400 Bad Request API response, which developers can easily propagate upstream. Let’s see how that would work for a one-time password (OTP) use case:
Step 1: End user requests OTP on an invalid destination number.
Step 2: The application initiates a Send SMS API request.
Step 3: Plivo returns a 400 Bad Request response synchronously.
Step 4: The application returns an “invalid number” error.
Synchronous Handling for Invalid MMS numbers
MMS API requests to invalid or non-MMS-enabled numbers are rejected with a 400 Bad Request API response, which developers can easily propagate upstream. Let’s see how that would work for sending an MMS message.
Step 1: The application initiates an MMS message to an non-MMS-enabled number.
Step 2: Plivo returns a 400 Bad Request response synchronously.
Step 3: The application returns a “not an MMS enabled phone number” error.
Format Correction for Phone Numbers
The platform also intelligently reformats incorrectly formatted phone numbers. For example:
Scenario 1: If a user enters the Lithuanian phone number 370860112345 (country code 370), Plivo automatically reformats it to the E.164 international format +37060112345 before forwarding it to downstream carriers. Notice the missing 8 in the formatted number; 8 is only required when dialing a Lithuanian number from inside Lithuania.
Scenario 2: If a user enters the Mexican phone number 520455512345678 (country code 52), Plivo automatically reformats it to the E.164 international format +5215512345678. Notice that 045 has been replaced with 1, because 045 is only to be used when dialing a domestic cellphone from a landline, while 521 is the prefix for mobile phone numbers in E.164 format.
Enabling Destination Number Validation
All new Plivo customers have enhanced destination number validation enabled by default.