Liblinphone: linphone::DialPlan Class Reference

Liblinphone 5.3.0

Public Member Functions | Static Public Member Functions | List of all members
linphone::DialPlan Class Reference

Represents a dial plan. More...

`#include <dial_plan.hh>`

Inheritance diagram for linphone::DialPlan:

## Public Member Functions
LINPHONECXX_PUBLIC | DialPlan (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneDialPlan * | cPtr ()
LINPHONECXX_PUBLIC std::string | getCountry () const
| Returns the country name of the dialplan.
LINPHONECXX_PUBLIC std::string | getCountryCallingCode () const
| Returns the country calling code of the dialplan.
LINPHONECXX_PUBLIC std::string | getFlag () const
| Returns the flag of the teritory as unicode characters.
LINPHONECXX_PUBLIC std::string | getInternationalCallPrefix () const
| Returns the international call prefix of the dialplan.
LINPHONECXX_PUBLIC bool | isGeneric () const
| Return if given plan is generic.
LINPHONECXX_PUBLIC std::string | getIsoCountryCode () const
| Returns the iso country code of the dialplan.
LINPHONECXX_PUBLIC int | getNationalNumberLength () const
| Returns the national number length of the dialplan.

## Static Public Member Functions
static LINPHONECXX_PUBLIC std::shared_ptr< const linphone::DialPlan > | byCcc (const std::string &ccc)
| Find best match for given CCC.
static LINPHONECXX_PUBLIC std::shared_ptr< const linphone::DialPlan > | byCccAsInt (int ccc)
| Find best match for given CCC.
static LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::DialPlan > > | getAllList ()
| Returns a list of all known dial plans.
static LINPHONECXX_PUBLIC int | lookupCccFromE164 (const std::string &e164)
| Function to get call country code from an e164 number, ex: +33952650121 will return 33.
static LINPHONECXX_PUBLIC int | lookupCccFromIso (const std::string &iso)
| Function to get call country code from ISO 3166-1 alpha-2 code, ex: FR returns 33.

## Detailed Description

Represents a dial plan.

## Member Function Documentation

## ◆ byCcc()

LINPHONECXX_PUBLIC std::shared_ptr< const linphone::DialPlan > linphone::DialPlan::byCcc | ( | const std::string & | ccc | ) |
| static

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()

LINPHONECXX_PUBLIC std::shared_ptr< const linphone::DialPlan > linphone::DialPlan::byCccAsInt | ( | int | ccc | ) |
| static

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()

LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::DialPlan > > linphone::DialPlan::getAllList | ( |  | ) |
| static

Returns a list of all known dial plans.

Returns
  The list of all known dial plans.

## ◆ getCountry()

LINPHONECXX_PUBLIC std::string linphone::DialPlan::getCountry | ( |  | ) | const

Returns the country name of the dialplan.

Returns
  the country name

## ◆ getCountryCallingCode()

LINPHONECXX_PUBLIC std::string linphone::DialPlan::getCountryCallingCode | ( |  | ) | const

Returns the country calling code of the dialplan.

Returns
  the country calling code

## ◆ getFlag()

LINPHONECXX_PUBLIC std::string linphone::DialPlan::getFlag | ( |  | ) | const

Returns the flag of the teritory as unicode characters.

Returns
  the flag as unicode characters

## ◆ getInternationalCallPrefix()

LINPHONECXX_PUBLIC std::string linphone::DialPlan::getInternationalCallPrefix | ( |  | ) | const

Returns the international call prefix of the dialplan.

Returns
  the international call prefix

## ◆ getIsoCountryCode()

LINPHONECXX_PUBLIC std::string linphone::DialPlan::getIsoCountryCode | ( |  | ) | const

Returns the iso country code of the dialplan.

Returns
  the iso country code

## ◆ getNationalNumberLength()

LINPHONECXX_PUBLIC int linphone::DialPlan::getNationalNumberLength | ( |  | ) | const

Returns the national number length of the dialplan.

Returns
  the national number length

## ◆ isGeneric()

LINPHONECXX_PUBLIC bool linphone::DialPlan::isGeneric | ( |  | ) | const

Return if given plan is generic.

Returns
  true if generic, false otherwise

## ◆ lookupCccFromE164()

LINPHONECXX_PUBLIC int linphone::DialPlan::lookupCccFromE164 | ( | const std::string & | e164 | ) |
| static

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()

LINPHONECXX_PUBLIC int linphone::DialPlan::lookupCccFromIso | ( | const std::string & | iso | ) |
| static

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

The documentation for this class was generated from the following file:

- dial_plan.hh