IncomingCallRetrieverRequest

class IncomingCallRetrieverRequest : Parcelable


Request for initiating incoming call retriever API for phone number verification. The mandatory parameters are the country code, prefix, and a lower bound and upper bound that must have the same number of digits. Therefore, in addition to the integer range, the number of digits of incoming call number must also be known and should be equal to (number of digits in country code + number of digits in prefix + number of digits in lower bound).

Constraints for valid IncomingCallRetrieverRequest

  • Country Code: (Mandatory) The caller's phone number country code, without the leading +. Example: 1.

  • Prefix: The initial few digits of the caller's phone number. Example: 6576.

    • The prefix is mandatory if the phone number (excluding country code) contains 10 digits or more; otherwise, it is optional.

  • Start range: The lowest possible phone number in the expected range. This value is inclusive and must be less than or equal to endRange. Example: 000000.

    • Must be a valid positive integer string.

    • Number of digits in start & end range should be the same.

  • End range: The highest possible phone number in the expected range. This value is inclusive and must be greater than or equal to startRange. Example: 999999.

    • Must be a valid positive integer string.

    • Number of digits in start & end range should be the same.

  • The suffix of the incoming phone number (that is, the digits remaining after stripping the matched country code and prefix) must fall within the specified startRange and endRange. Specifically, parseInt(startRange) <= parseInt(suffix) <= parseInt(endRange).

Example

Given the following configuration:

{
"countryCode": "1",
"prefix": "6576",
"startRange": "000000",
"endRange": "888888"
}

The system will intercept calls from numbers like:

  • +1-6576 123456

  • +1-6576 12

  • +1-6576 0123456

but NOT from:

  • +1-6576 919373 (outside the specified range)

  • +1-6577 723730 (different prefix)

  • +8-6576 712373 (different country code)

  • +1-6576 919373 (outside the specified range)

Summary

Public constructors

IncomingCallRetrieverRequest(
    countryCode: String,
    prefix: String,
    startRange: String,
    endRange: String
)

Public functions

open Unit
writeToParcel(dest: Parcel, flags: Int)

Public properties

String

Country code of the caller phone number.

String

Upper bound of the phone number range from which the client should expect a call.

String

Prefix of the caller phone number.

String

Lower bound of the phone number range from which the client should expect a call.

Public companion properties

Public constructors

IncomingCallRetrieverRequest

IncomingCallRetrieverRequest(
    countryCode: String,
    prefix: String,
    startRange: String,
    endRange: String
)

Public functions

writeToParcel

open fun writeToParcel(dest: Parcel, flags: Int): Unit

Public properties

countryCode

val countryCode: String

Country code of the caller phone number. Always remove the leading + if present. Example: 1

endRange

val endRange: String

Upper bound of the phone number range from which the client should expect a call. This bound is inclusive and must be strictly greater than or equal to the startRange. Example: 999999

prefix

val prefix: String

Prefix of the caller phone number. Example: 6576

startRange

val startRange: String

Lower bound of the phone number range from which the client should expect a call. This bound is inclusive and must be strictly less than or equal to the endRange. Example: 000000