Liblinphone  5.4.0
Typedefs | Enumerations | Functions
Group_proxies

Typedefs

typedef struct _LinphoneProxyConfig LinphoneProxyConfig
 Represents an account configuration to be used by LinphoneCore. More...
 
typedef enum _LinphoneRegistrationState LinphoneRegistrationState
 Describes proxy registration states. More...
 

Enumerations

enum  _LinphoneRegistrationState {
  LinphoneRegistrationNone = 0,
  LinphoneRegistrationProgress = 1,
  LinphoneRegistrationOk = 2,
  LinphoneRegistrationCleared = 3,
  LinphoneRegistrationFailed = 4,
  LinphoneRegistrationRefreshing = 5
}
 Describes proxy registration states. More...
 

Functions

LinphoneStatus linphone_core_set_primary_contact (LinphoneCore *core, const char *contact)
 Sets the local "from" SIP identity used for calls made out of any configured LinphoneAccount. More...
 
const char * linphone_core_get_primary_contact (LinphoneCore *core)
 Returns the default identity when no account is used. More...
 
const char * linphone_core_get_identity (LinphoneCore *core)
 Gets the default identity SIP address. More...
 
void linphone_core_set_guess_hostname (LinphoneCore *core, bool_t enable)
 Tells LinphoneCore to guess local hostname automatically in primary contact. More...
 
bool_t linphone_core_get_guess_hostname (LinphoneCore *core)
 Returns TRUE if hostname part of primary contact is guessed automatically. More...
 
MS2_DEPRECATED LinphoneAddresslinphone_core_create_primary_contact_parsed (LinphoneCore *core)
 Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object instead of const char *. More...
 
LinphoneProxyConfiglinphone_core_create_proxy_config (LinphoneCore *core)
 Create a proxy config with default values from Linphone core. More...
 
LinphoneStatus linphone_core_add_proxy_config (LinphoneCore *core, LinphoneProxyConfig *config)
 Add a proxy configuration. More...
 
void linphone_core_clear_proxy_config (LinphoneCore *core)
 Erase all proxies from config. More...
 
void linphone_core_remove_proxy_config (LinphoneCore *core, LinphoneProxyConfig *config)
 Removes a proxy configuration. More...
 
const bctbx_list_t * linphone_core_get_proxy_config_list (const LinphoneCore *core)
 Returns an unmodifiable list of entered proxy configurations. More...
 
LinphoneProxyConfiglinphone_core_get_proxy_config_by_idkey (LinphoneCore *core, const char *idkey)
 Searches for a LinphoneProxyConfig by it's idkey. More...
 
LinphoneProxyConfiglinphone_core_get_default_proxy_config (const LinphoneCore *core)
 Returns the default proxy configuration, that is the one used to determine the current identity. More...
 
void linphone_core_set_default_proxy_config (LinphoneCore *core, LinphoneProxyConfig *config)
 Sets the default proxy. More...
 
void linphone_core_refresh_registers (LinphoneCore *core)
 Forces registration refresh to be initiated upon next iterate. More...
 
MS2_DEPRECATED LinphoneAddresslinphone_core_get_primary_contact_parsed (LinphoneCore *core)
 Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object instead of const char *. More...
 
LinphoneAddresslinphone_core_get_primary_contact_address (LinphoneCore *core)
 Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object instead of a string. More...
 
const char * linphone_registration_state_to_string (LinphoneRegistrationState state)
 Human readable version of the LinphoneRegistrationState. More...
 

Detailed Description

Typedef Documentation

◆ LinphoneProxyConfig

typedef struct _LinphoneProxyConfig LinphoneProxyConfig

Represents an account configuration to be used by LinphoneCore.

In addition to the LinphoneAuthInfo that stores the credentials, you need to configure a LinphoneProxyConfig as well to be able to connect to a proxy server.

A minimal proxy config consists of an identity address (sip:username@domain.tld) and the proxy server address,

See also
linphone_proxy_config_set_server_addr().

If any, it will be stored inside the default configuration file, so it will survive the destruction of the LinphoneCore and be available at the next start.

The account set with linphone_core_set_default_proxy_config() will be used as default for outgoing calls & chat messages unless specified otherwise.

Deprecated:
06/04/2020 Use LinphoneAccount object instead

◆ LinphoneRegistrationState

Describes proxy registration states.

It is notified via the registration_state_changed() callback in LinphoneCoreCbs.

Enumeration Type Documentation

◆ _LinphoneRegistrationState

Describes proxy registration states.

It is notified via the registration_state_changed() callback in LinphoneCoreCbs.

Enumerator
LinphoneRegistrationNone 

Initial state for registrations.

LinphoneRegistrationProgress 

Registration is in progress.

LinphoneRegistrationOk 

Registration is successful.

LinphoneRegistrationCleared 

Unregistration succeeded.

LinphoneRegistrationFailed 

Registration failed.

LinphoneRegistrationRefreshing 

Registration refreshing.

Function Documentation

◆ linphone_core_add_proxy_config()

LinphoneStatus linphone_core_add_proxy_config ( LinphoneCore core,
LinphoneProxyConfig config 
)

Add a proxy configuration.

This will start registration on the proxy, if registration is enabled.

Parameters
coreLinphoneCore object
configthe LinphoneProxyConfig to add
Returns
0 if successful, -1 otherwise
Deprecated:
04/09/2024 Use linphone_core_add_account()

◆ linphone_core_clear_proxy_config()

void linphone_core_clear_proxy_config ( LinphoneCore core)

Erase all proxies from config.

Parameters
coreLinphoneCore object
Deprecated:
04/09/2024 Use linphone_core_clear_accounts()

◆ linphone_core_create_primary_contact_parsed()

MS2_DEPRECATED LinphoneAddress* linphone_core_create_primary_contact_parsed ( LinphoneCore core)

Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object instead of const char *.

Parameters
corethe LinphoneCore
Returns
a LinphoneAddress object.
Deprecated:
prefer using linphone_core_get_primary_contact_address()

◆ linphone_core_create_proxy_config()

LinphoneProxyConfig* linphone_core_create_proxy_config ( LinphoneCore core)

Create a proxy config with default values from Linphone core.

Parameters
coreLinphoneCore object
Returns
LinphoneProxyConfig with default values set
Deprecated:
04/09/2024 Use linphone_core_create_account()

◆ linphone_core_get_default_proxy_config()

LinphoneProxyConfig* linphone_core_get_default_proxy_config ( const LinphoneCore core)

Returns the default proxy configuration, that is the one used to determine the current identity.

Parameters
coreLinphoneCore object
Returns
The default proxy configuration.
Deprecated:
04/09/2024 Use linphone_core_get_default_account()

◆ linphone_core_get_guess_hostname()

bool_t linphone_core_get_guess_hostname ( LinphoneCore core)

Returns TRUE if hostname part of primary contact is guessed automatically.

Parameters
corethe LinphoneCore
Returns
TRUE if guess hostname enabled, FALSE otherwise.

◆ linphone_core_get_identity()

const char* linphone_core_get_identity ( LinphoneCore core)

Gets the default identity SIP address.

This is an helper function. If no default proxy is set, this will return the primary contact ( see linphone_core_get_primary_contact() ). If a default proxy is set it returns the registered identity on the proxy.

Parameters
coreLinphoneCore object
Returns
The default identity SIP address.

◆ linphone_core_get_primary_contact()

const char* linphone_core_get_primary_contact ( LinphoneCore core)

Returns the default identity when no account is used.

This SIP address usually contains a private ip address, and may not be routable globally.

Parameters
corethe Core
Returns
the primary contact identity

◆ linphone_core_get_primary_contact_address()

LinphoneAddress* linphone_core_get_primary_contact_address ( LinphoneCore core)

Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object instead of a string.

Parameters
corethe LinphoneCore
Returns
a LinphoneAddress object.

◆ linphone_core_get_primary_contact_parsed()

MS2_DEPRECATED LinphoneAddress* linphone_core_get_primary_contact_parsed ( LinphoneCore core)

Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object instead of const char *.

Parameters
corethe LinphoneCore
Returns
a LinphoneAddress object.
Deprecated:
22/10/2018 Use linphone_core_create_primary_contact_parsed() instead.

◆ linphone_core_get_proxy_config_by_idkey()

LinphoneProxyConfig* linphone_core_get_proxy_config_by_idkey ( LinphoneCore core,
const char *  idkey 
)

Searches for a LinphoneProxyConfig by it's idkey.

Parameters
corethe LinphoneCore object
idkeyAn arbitrary idkey string associated to a proxy configuration
Returns
the LinphoneProxyConfig object for the given idkey value, or NULL if none found
Deprecated:
04/09/2024 Use linphone_core_get_account_by_idkey()

◆ linphone_core_get_proxy_config_list()

const bctbx_list_t* linphone_core_get_proxy_config_list ( const LinphoneCore core)

Returns an unmodifiable list of entered proxy configurations.

Parameters
coreThe LinphoneCore object
Returns
A list of LinphoneProxyConfig.
Deprecated:
04/09/2024 Use linphone_core_get_account_list()

◆ linphone_core_refresh_registers()

void linphone_core_refresh_registers ( LinphoneCore core)

Forces registration refresh to be initiated upon next iterate.

Parameters
coreThe LinphoneCore object

◆ linphone_core_remove_proxy_config()

void linphone_core_remove_proxy_config ( LinphoneCore core,
LinphoneProxyConfig config 
)

Removes a proxy configuration.

LinphoneCore will then automatically unregister and place the proxy configuration on a deleted list. For that reason, a removed proxy does NOT need to be freed.

Parameters
coreLinphoneCore object
configthe LinphoneProxyConfig to remove
Deprecated:
04/09/2024 Use linphone_core_remove_account()

◆ linphone_core_set_default_proxy_config()

void linphone_core_set_default_proxy_config ( LinphoneCore core,
LinphoneProxyConfig config 
)

Sets the default proxy.

This default proxy must be part of the list of already entered LinphoneProxyConfig. Toggling it as default will make LinphoneCore use the identity associated with the proxy configuration in all incoming and outgoing calls.

Parameters
coreLinphoneCore object
configThe proxy configuration to use as the default one.
Deprecated:
04/09/2024 Use linphone_core_set_default_account()

◆ linphone_core_set_guess_hostname()

void linphone_core_set_guess_hostname ( LinphoneCore core,
bool_t  enable 
)

Tells LinphoneCore to guess local hostname automatically in primary contact.

Parameters
corethe LinphoneCore
enablewhether to enable the guess hostname feature or not

◆ linphone_core_set_primary_contact()

LinphoneStatus linphone_core_set_primary_contact ( LinphoneCore core,
const char *  contact 
)

Sets the local "from" SIP identity used for calls made out of any configured LinphoneAccount.

Not using a SIP account is not recommended.

This data is used in absence of any proxy configuration or when no account configuration is set. See LinphoneAccount

Parameters
corethe Core
contactthe contact to set
Returns
0 if successful, -1 otherwise

◆ linphone_registration_state_to_string()

const char* linphone_registration_state_to_string ( LinphoneRegistrationState  state)

Human readable version of the LinphoneRegistrationState.

Parameters
stateLinphoneRegistrationState the value for which we want a string representation
Returns
a string representation of the LinphoneRegistrationState