Interface DialPlan


public interface DialPlan
Represents a dial plan.

  • Method Details

    • getCountry

      String getCountry()
      Returns the country name of the dialplan.

      Returns:
      the country name
    • getCountryCallingCode

      @NonNull String getCountryCallingCode()
      Returns the country calling code of the dialplan.

      Returns:
      the country calling code
    • getFlag

      @NonNull String getFlag()
      Returns the flag of the teritory as unicode characters.

      Returns:
      the flag as unicode characters
    • getInternationalCallPrefix

      @NonNull String getInternationalCallPrefix()
      Returns the international call prefix of the dialplan.

      Returns:
      the international call prefix
    • isGeneric

      boolean isGeneric()
      Return if given plan is generic.

      Returns:
      true if generic, false otherwise
    • getIsoCountryCode

      @NonNull String getIsoCountryCode()
      Returns the iso country code of the dialplan.

      Returns:
      the iso country code
    • getNationalNumberLength

      int getNationalNumberLength()
      Returns the national number length of the dialplan.

      Returns:
      the national number length
    • byCcc

      @NonNull DialPlan byCcc(@NonNull String ccc)
      Find best match for given CCC.

      Parameters:
      ccc - The country calling code
      Returns:
      the matching dial plan, or a generic one if none found
    • byCccAsInt

      @NonNull DialPlan byCccAsInt(@NonNull int ccc)
      Find best match for given CCC.

      Parameters:
      ccc - the country calling code
      Returns:
      the matching dial plan, or a generic one if none found
    • getAllList

      @NonNull DialPlan[] getAllList()
      Returns a list of all known dial plans.

      Returns:
      The list of all known dial plans.
    • lookupCccFromE164

      int lookupCccFromE164(@NonNull String e164)
      Function to get call country code from an e164 number, ex: +33952650121 will
      return 33.

      Parameters:
      e164 - phone number
      Returns:
      call country code or -1 if not found
    • lookupCccFromIso

      int lookupCccFromIso(@NonNull String iso)
      Function to get call country code from ISO 3166-1 alpha-2 code, ex: FR returns
      33.

      Parameters:
      iso - country code alpha2
      Returns:
      call country code or -1 if not found
    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object