SIGN UP

PhoneNumber

Classes(1)

Methods(1)

Methods

getInfo(number: String, country: String): PhoneNumber.Info

Get phone number info.

Parameters

  • number:

    String

    Phone number in country specific format, or E.164 if starts with +

  • country:

    StringOptional

    2-digit country code to get number format, if not specified, number is treated as E.164, e.g. "RU", "US"

Returns

  • Return:

    PhoneNumber.Info

Examples

request:

Transform number dialed in US format to international format

 let a = PhoneNumber.getInfo("01174951234567", "US").number;

Get the region name of the caller's number:

 VoxEngine.addEventListener(AppEvents.CallAlerting, (e) => {
	const region = PhoneNumber.getInfo(e.callerid).region;
  	Logger.write(region);
});