Liblinphone  3.10.2
Data Structures | Defines | Typedefs | Enumerations | Functions
Initializing liblinphone

Data Structures

struct  _LCSipTransports
struct  _LinphoneCoreVTable

Defines

#define LC_SIP_TRANSPORT_DISABLED   0
#define LC_SIP_TRANSPORT_RANDOM   -1

Typedefs

typedef struct _LinphoneCore LinphoneCore
typedef struct _LCSipTransports LCSipTransports
typedef enum _LinphoneStreamType LinphoneStreamType
typedef enum _LinphoneIceState LinphoneIceState
typedef enum _LinphoneUpnpState LinphoneUpnpState
typedef enum _LinphoneGlobalState LinphoneGlobalState
typedef enum
_LinphoneCoreLogCollectionUploadState 
LinphoneCoreLogCollectionUploadState
typedef void(* LinphoneCoreGlobalStateChangedCb )(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message)
typedef void(* LinphoneCoreCallStateChangedCb )(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message)
typedef void(* LinphoneCoreCallEncryptionChangedCb )(LinphoneCore *lc, LinphoneCall *call, bool_t on, const char *authentication_token)
typedef void(* LinphoneCoreRegistrationStateChangedCb )(LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message)
typedef void(* ShowInterfaceCb )(LinphoneCore *lc)
typedef void(* DisplayStatusCb )(LinphoneCore *lc, const char *message)
typedef void(* DisplayMessageCb )(LinphoneCore *lc, const char *message)
typedef void(* DisplayUrlCb )(LinphoneCore *lc, const char *message, const char *url)
typedef void(* LinphoneCoreCbFunc )(LinphoneCore *lc, void *user_data)
typedef void(* LinphoneCoreNotifyPresenceReceivedCb )(LinphoneCore *lc, LinphoneFriend *lf)
typedef void(* LinphoneCoreNewSubscriptionRequestedCb )(LinphoneCore *lc, LinphoneFriend *lf, const char *url)
typedef void(* LinphoneCoreAuthInfoRequestedCb )(LinphoneCore *lc, const char *realm, const char *username, const char *domain)
typedef void(* LinphoneCoreCallLogUpdatedCb )(LinphoneCore *lc, LinphoneCallLog *newcl)
typedef void(* LinphoneCoreTextMessageReceivedCb )(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message)
typedef void(* LinphoneCoreMessageReceivedCb )(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message)
typedef void(* LinphoneCoreFileTransferRecvCb )(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, const char *buff, size_t size)
typedef void(* LinphoneCoreFileTransferSendCb )(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, char *buff, size_t *size)
typedef void(* LinphoneCoreFileTransferProgressIndicationCb )(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, size_t offset, size_t total)
typedef void(* LinphoneCoreIsComposingReceivedCb )(LinphoneCore *lc, LinphoneChatRoom *room)
typedef void(* LinphoneCoreDtmfReceivedCb )(LinphoneCore *lc, LinphoneCall *call, int dtmf)
typedef void(* LinphoneCoreReferReceivedCb )(LinphoneCore *lc, const char *refer_to)
typedef void(* LinphoneCoreBuddyInfoUpdatedCb )(LinphoneCore *lc, LinphoneFriend *lf)
typedef void(* LinphoneCoreTransferStateChangedCb )(LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state)
typedef void(* LinphoneCoreCallStatsUpdatedCb )(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallStats *stats)
typedef void(* LinphoneCoreInfoReceivedCb )(LinphoneCore *lc, LinphoneCall *call, const LinphoneInfoMessage *msg)
typedef enum
_LinphoneConfiguringState 
LinphoneConfiguringState
typedef void(* LinphoneCoreConfiguringStatusCb )(LinphoneCore *lc, LinphoneConfiguringState status, const char *message)
typedef void(* LinphoneCoreNetworkReachableCb )(LinphoneCore *lc, bool_t reachable)
typedef void(* LinphoneCoreLogCollectionUploadStateChangedCb )(LinphoneCore *lc, LinphoneCoreLogCollectionUploadState state, const char *info)
typedef void(* LinphoneCoreLogCollectionUploadProgressIndicationCb )(LinphoneCore *lc, size_t offset, size_t total)
typedef void(* LinphoneCoreFriendListCreatedCb )(LinphoneCore *lc, LinphoneFriendList *list)
typedef void(* LinphoneCoreFriendListRemovedCb )(LinphoneCore *lc, LinphoneFriendList *list)
typedef struct _LinphoneCoreVTable LinphoneCoreVTable
typedef enum
_LinphoneLogCollectionState 
LinphoneLogCollectionState

Enumerations

enum  _LinphoneStreamType {
  LinphoneStreamTypeAudio,
  LinphoneStreamTypeVideo,
  LinphoneStreamTypeText,
  LinphoneStreamTypeUnknown
}
enum  _LinphoneIceState {
  LinphoneIceStateNotActivated,
  LinphoneIceStateFailed,
  LinphoneIceStateInProgress,
  LinphoneIceStateHostConnection,
  LinphoneIceStateReflexiveConnection,
  LinphoneIceStateRelayConnection
}
enum  _LinphoneUpnpState {
  LinphoneUpnpStateIdle,
  LinphoneUpnpStatePending,
  LinphoneUpnpStateAdding,
  LinphoneUpnpStateRemoving,
  LinphoneUpnpStateNotAvailable,
  LinphoneUpnpStateOk,
  LinphoneUpnpStateKo,
  LinphoneUpnpStateBlacklisted
}
enum  _LinphoneGlobalState {
  LinphoneGlobalOff,
  LinphoneGlobalStartup,
  LinphoneGlobalOn,
  LinphoneGlobalShutdown,
  LinphoneGlobalConfiguring
}
enum  _LinphoneCoreLogCollectionUploadState {
  LinphoneCoreLogCollectionUploadStateInProgress,
  LinphoneCoreLogCollectionUploadStateDelivered,
  LinphoneCoreLogCollectionUploadStateNotDelivered
}
enum  _LinphoneConfiguringState {
  LinphoneConfiguringSuccessful,
  LinphoneConfiguringFailed,
  LinphoneConfiguringSkipped
}
enum  _LinphoneLogCollectionState {
  LinphoneLogCollectionDisabled,
  LinphoneLogCollectionEnabled,
  LinphoneLogCollectionEnabledWithoutPreviousLogHandler
}

Functions

void linphone_core_iterate (LinphoneCore *lc)
void linphone_core_set_root_ca (LinphoneCore *lc, const char *path)
const char * linphone_core_get_root_ca (LinphoneCore *lc)
void linphone_core_verify_server_certificates (LinphoneCore *lc, bool_t yesno)
void linphone_core_verify_server_cn (LinphoneCore *lc, bool_t yesno)
void * linphone_core_get_user_data (const LinphoneCore *lc)
void linphone_core_set_user_data (LinphoneCore *lc, void *userdata)
void linphone_core_destroy (LinphoneCore *lc)
void linphone_core_set_chat_database_path (LinphoneCore *lc, const char *path)
void linphone_core_add_supported_tag (LinphoneCore *lc, const char *tag)
void linphone_core_remove_supported_tag (LinphoneCore *lc, const char *tag)
const char * linphone_stream_type_to_string (const LinphoneStreamType)
const char * linphone_global_state_to_string (LinphoneGlobalState gs)
const char * linphone_core_log_collection_upload_state_to_string (const LinphoneCoreLogCollectionUploadState lcus)
LinphoneCoreVTablelinphone_core_v_table_new (void)
void linphone_core_v_table_set_user_data (LinphoneCoreVTable *table, void *data)
void * linphone_core_v_table_get_user_data (LinphoneCoreVTable *table)
LinphoneCoreVTablelinphone_core_get_current_vtable (LinphoneCore *lc)
void linphone_core_v_table_destroy (LinphoneCoreVTable *table)
LinphoneLogCollectionState linphone_core_log_collection_enabled (void)
void linphone_core_enable_log_collection (LinphoneLogCollectionState state)
const char * linphone_core_get_log_collection_path (void)
void linphone_core_set_log_collection_path (const char *path)
const char * linphone_core_get_log_collection_prefix (void)
void linphone_core_set_log_collection_prefix (const char *prefix)
size_t linphone_core_get_log_collection_max_file_size (void)
void linphone_core_set_log_collection_max_file_size (size_t size)
void linphone_core_set_log_collection_upload_server_url (LinphoneCore *core, const char *server_url)
void linphone_core_upload_log_collection (LinphoneCore *core)
char * linphone_core_compress_log_collection (void)
void linphone_core_reset_log_collection (void)
void linphone_core_set_log_handler (OrtpLogFunc logfunc)
void linphone_core_set_log_file (FILE *file)
void linphone_core_set_log_level (OrtpLogLevel loglevel)
void linphone_core_set_log_level_mask (OrtpLogLevel loglevel)
void linphone_core_enable_logs (FILE *file)
void linphone_core_enable_logs_with_cb (OrtpLogFunc logfunc)
void linphone_core_disable_logs (void)
void linphone_core_serialize_logs (void)
const char * linphone_core_get_version (void)
const char * linphone_core_get_user_agent (LinphoneCore *lc)
MS2_DEPRECATED const char * linphone_core_get_user_agent_name (void)
MS2_DEPRECATED const char * linphone_core_get_user_agent_version (void)
LinphoneCorelinphone_core_new (const LinphoneCoreVTable *vtable, const char *config_path, const char *factory_config_path, void *userdata)
LinphoneCorelinphone_core_new_with_config (const LinphoneCoreVTable *vtable, LpConfig *config, void *userdata)
void linphone_core_add_listener (LinphoneCore *lc, LinphoneCoreVTable *vtable)
void linphone_core_remove_listener (LinphoneCore *lc, const LinphoneCoreVTable *vtable)
void linphone_core_set_ssl_config (LinphoneCore *lc, void *ssl_config)
void linphone_core_set_call_logs_database_path (LinphoneCore *lc, const char *path)
void linphone_core_migrate_logs_from_rc_to_db (LinphoneCore *lc)
void linphone_core_set_zrtp_secrets_file (LinphoneCore *lc, const char *file)
const char * linphone_core_get_zrtp_secrets_file (LinphoneCore *lc)
void linphone_core_set_user_certificates_path (LinphoneCore *lc, const char *path)
const char * linphone_core_get_user_certificates_path (LinphoneCore *lc)
void linphone_core_reload_ms_plugins (LinphoneCore *lc, const char *path)
int linphone_core_get_max_calls (LinphoneCore *lc)
void linphone_core_set_max_calls (LinphoneCore *lc, int max)
bool_t linphone_core_media_encryption_supported (const LinphoneCore *lc, LinphoneMediaEncryption menc)
int linphone_core_set_provisioning_uri (LinphoneCore *lc, const char *uri)
const char * linphone_core_get_provisioning_uri (const LinphoneCore *lc)
void linphone_core_set_friends_database_path (LinphoneCore *lc, const char *path)
void linphone_core_migrate_friends_from_rc_to_db (LinphoneCore *lc)
int linphone_core_migrate_to_multi_transport (LinphoneCore *lc)

Define Documentation

#define LC_SIP_TRANSPORT_DISABLED   0

Disable a sip transport Use with LCSipTransports

#define LC_SIP_TRANSPORT_RANDOM   -1

Randomly chose a sip port for this transport Use with LCSipTransports


Typedef Documentation

typedef void(* DisplayMessageCb)(LinphoneCore *lc, const char *message)

Callback prototype

Deprecated:
typedef void(* DisplayStatusCb)(LinphoneCore *lc, const char *message)

Callback prototype

Deprecated:
typedef void(* DisplayUrlCb)(LinphoneCore *lc, const char *message, const char *url)

Callback prototype

Deprecated:

Linphone core SIP transport ports. Use with linphone_core_set_sip_transports

LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed

typedef struct _LinphoneCore LinphoneCore

Linphone core main object created by function linphone_core_new() .

typedef void(* LinphoneCoreAuthInfoRequestedCb)(LinphoneCore *lc, const char *realm, const char *username, const char *domain)

Callback for requesting authentication information to application or user.

Parameters:
lcthe LinphoneCore
realmthe realm (domain) on which authentication is required.
usernamethe username that needs to be authenticated. Application shall reply to this callback using linphone_core_add_auth_info().

Callback prototype

typedef void(* LinphoneCoreCallEncryptionChangedCb)(LinphoneCore *lc, LinphoneCall *call, bool_t on, const char *authentication_token)

Call encryption changed callback.

Parameters:
lcthe LinphoneCore
callthe call on which encryption is changed.
onwhether encryption is activated.
authentication_tokenan authentication_token, currently set for ZRTP kind of encryption only.

Callback to notify a new call-log entry has been added. This is done typically when a call terminates.

Parameters:
lcthe LinphoneCore
newclthe new call log entry added.
typedef void(* LinphoneCoreCallStateChangedCb)(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message)

Call state notification callback.

Parameters:
lcthe LinphoneCore
callthe call object whose state is changed.
cstatethe new state of the call
messagea non NULL informational message about the state.

Callback for receiving quality statistics for calls.

Parameters:
lcthe LinphoneCore
callthe call
statsthe call statistics.
typedef void(* LinphoneCoreCbFunc)(LinphoneCore *lc, void *user_data)

Callback prototype

typedef void(* LinphoneCoreConfiguringStatusCb)(LinphoneCore *lc, LinphoneConfiguringState status, const char *message)

Callback prototype for configuring status changes notification

Parameters:
lcthe LinphoneCore
messageinformational message.
typedef void(* LinphoneCoreDtmfReceivedCb)(LinphoneCore *lc, LinphoneCall *call, int dtmf)

Callback for being notified of DTMFs received.

Parameters:
lcthe linphone core
callthe call that received the dtmf
dtmfthe ascii code of the dtmf
typedef void(* LinphoneCoreFileTransferProgressIndicationCb)(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, size_t offset, size_t total)

File transfer progress indication callback prototype.

Parameters:
lcLinphoneCore object
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent incoming content information
offsetThe number of bytes sent/received since the beginning of the transfer.
totalThe total number of bytes to be sent/received.
typedef void(* LinphoneCoreFileTransferRecvCb)(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, const char *buff, size_t size)

File transfer receive callback prototype. This function is called by the core upon an incoming File transfer is started. This function may be call several time for the same file in case of large file.

Parameters:
lcLinphoneCore object
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent incoming content information
buffpointer to the received data
sizenumber of bytes to be read from buff. 0 means end of file.
typedef void(* LinphoneCoreFileTransferSendCb)(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, char *buff, size_t *size)

File transfer send callback prototype. This function is called by the core upon an outgoing File transfer is started. This function is called until size is set to 0.
a LinphoneContent with a size equal zero

Parameters:
lcLinphoneCore object
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent outgoing content
buffpointer to the buffer where data chunk shall be written by the app
sizeas input value, it represents the number of bytes expected by the framework. As output value, it means the number of bytes wrote by the application in the buffer. 0 means end of file.

Callback prototype for reporting when a friend list has been added to the core friends list.

Parameters:
[in]lcLinphoneCore object
[in]listLinphoneFriendList object

Callback prototype for reporting when a friend list has been removed from the core friends list.

Parameters:
[in]lcLinphoneCore object
[in]listLinphoneFriendList object
typedef void(* LinphoneCoreGlobalStateChangedCb)(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message)

Global state notification callback.

Parameters:
lc
gstatethe global state
messageinformational message.

Callback prototype for receiving info messages.

Parameters:
lcthe LinphoneCore
callthe call whose info message belongs to.
msgthe info message.

Is composing notification callback prototype.

Parameters:
[in]lcLinphoneCore object
[in]roomLinphoneChatRoom involved in the conversation.
typedef void(* LinphoneCoreLogCollectionUploadProgressIndicationCb)(LinphoneCore *lc, size_t offset, size_t total)

Callback prototype for reporting log collection upload progress indication.

Parameters:
[in]lcLinphoneCore object
[in]progressPercentage of the file size of the log collection already uploaded.

LinphoneCoreLogCollectionUploadState is used to notify if log collection upload have been succesfully delivered or not.

Callback prototype for reporting log collection upload state change.

Parameters:
[in]lcLinphoneCore object
[in]stateThe state of the log collection upload
[in]infoAdditional information: error message in case of error state, URL of uploaded file in case of success.

Chat message callback prototype

Parameters:
lcLinphoneCore object
roomLinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room.
LinphoneChatMessageincoming message
typedef void(* LinphoneCoreNetworkReachableCb)(LinphoneCore *lc, bool_t reachable)

Callback prototype for reporting network change either automatically detected or notified by linphone_core_set_network_reachable.

Parameters:
lcthe LinphoneCore
reachabletrue if network is reachable.
typedef void(* LinphoneCoreNewSubscriptionRequestedCb)(LinphoneCore *lc, LinphoneFriend *lf, const char *url)

Reports that a new subscription request has been received and wait for a decision. Status on this subscription request is notified by changing policy for this friend

Parameters:
lcLinphoneCore object
lfLinphoneFriend corresponding to the subscriber
urlof the subscriber Callback prototype

Report status change for a friend previously added to LinphoneCore.

Parameters:
lcLinphoneCore object .
lfUpdated LinphoneFriend .
typedef void(* LinphoneCoreReferReceivedCb)(LinphoneCore *lc, const char *refer_to)

Callback prototype

Registration state notification callback prototype

typedef void(* LinphoneCoreTextMessageReceivedCb)(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message)

Callback prototype

Deprecated:
use LinphoneCoreMessageReceivedCb instead.
Parameters:
lcLinphoneCore object
roomLinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room.
fromLinphoneAddress from
messageincoming message
typedef void(* LinphoneCoreTransferStateChangedCb)(LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state)

Callback for notifying progresses of transfers.

Parameters:
lcthe LinphoneCore
transferedthe call that was transfered
new_call_statethe state of the call to transfer target at the far end.

This structure holds all callbacks that the application should implement. None is mandatory.

LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed

Enum describing Ice states.

Enum describing the stream types.

Enum describing uPnP states.

typedef void(* ShowInterfaceCb)(LinphoneCore *lc)

Callback prototype

Deprecated:

Enumeration Type Documentation

LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed

LinphoneCoreLogCollectionUploadState is used to notify if log collection upload have been succesfully delivered or not.

Enumerator:
LinphoneCoreLogCollectionUploadStateInProgress 

Delivery in progress

LinphoneCoreLogCollectionUploadStateDelivered 

Log collection upload successfully delivered and acknowledged by remote end point

LinphoneCoreLogCollectionUploadStateNotDelivered 

Log collection upload was not delivered

LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed

Enum describing ICE states.

Enumerator:
LinphoneIceStateNotActivated 

ICE has not been activated for this call or stream

LinphoneIceStateFailed 

ICE processing has failed

LinphoneIceStateInProgress 

ICE process is in progress

LinphoneIceStateHostConnection 

ICE has established a direct connection to the remote host

LinphoneIceStateReflexiveConnection 

ICE has established a connection to the remote host through one or several NATs

LinphoneIceStateRelayConnection 

ICE has established a connection through a relay

Enum describing the stream types.

Enum describing uPnP states.

Enumerator:
LinphoneUpnpStateIdle 

uPnP is not activate

LinphoneUpnpStatePending 

uPnP process is in progress

LinphoneUpnpStateAdding 

Internal use: Only used by port binding

LinphoneUpnpStateRemoving 

Internal use: Only used by port binding

LinphoneUpnpStateNotAvailable 

uPnP is not available

LinphoneUpnpStateOk 

uPnP is enabled

LinphoneUpnpStateKo 

uPnP processing has failed

LinphoneUpnpStateBlacklisted 

IGD router is blacklisted


Function Documentation

add a listener to be notified of linphone core events. Once events are received, registered vtable are invoked in order.

Parameters:
vtablea LinphoneCoreVTable structure holding your application callbacks. Object is owned by linphone core until linphone_core_remove_listener.
lcobject
void linphone_core_add_supported_tag ( LinphoneCore lc,
const char *  tag 
)

This function controls signaling features supported by the core. They are typically included in a SIP Supported header.

Parameters:
lcthe LinphoneCore
tagthe feature tag name

Compress the log collection in a single file.

Returns:
The path of the compressed log collection file (to be freed calling ms_free()).

Destroys a LinphoneCore

void linphone_core_disable_logs ( void  )

Entirely disable logging.

Deprecated:
Use linphone_core_set_log_level instead.
void linphone_core_enable_log_collection ( LinphoneLogCollectionState  state)

Enable the linphone core log collection to upload logs on a server.

Parameters:
[in]stateLinphoneLogCollectionState value telling whether to enable log collection or not.
void linphone_core_enable_logs ( FILE *  file)

Enable logs in supplied FILE*.

Deprecated:
Use linphone_core_set_log_file and linphone_core_set_log_level instead.
Parameters:
filea C FILE* where to fprintf logs. If null stdout is used.
void linphone_core_enable_logs_with_cb ( OrtpLogFunc  logfunc)

Enable logs through the user's supplied log callback.

Deprecated:
Use linphone_core_set_log_handler and linphone_core_set_log_level instead.
Parameters:
logfuncThe address of a OrtpLogFunc callback whose protoype is typedef void (*OrtpLogFunc)(OrtpLogLevel lev, const char *fmt, va_list args);

Gets the current VTable. This is meant only to be called from a callback to be able to get the user_data associated with the vtable that called the callback.

Parameters:
lcthe linphonecore
Returns:
the vtable that called the last callback

Get the max file size in bytes of the files used for log collection.

Returns:
The max file size in bytes of the files used for log collection.
const char* linphone_core_get_log_collection_path ( void  )

Get the path where the log files will be written for log collection.

Returns:
The path where the log files will be written.

Get the prefix of the filenames that will be used for log collection.

Returns:
The prefix of the filenames used for log collection.

Get the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer

Parameters:
lccore
Returns:
max number of simultaneous calls
const char* linphone_core_get_provisioning_uri ( const LinphoneCore lc)

Get provisioning URI.

Parameters:
lcthe linphone core
Returns:
the provisioning URI.
const char* linphone_core_get_root_ca ( LinphoneCore lc)

Gets the path to a file or folder containing the trusted root CAs (PEM format)

Parameters:
lcThe LinphoneCore object
Returns:
liblinphone's user agent as a string.
MS2_DEPRECATED const char* linphone_core_get_user_agent_name ( void  )
MS2_DEPRECATED const char* linphone_core_get_user_agent_version ( void  )

Get the path to the directory storing the user's certificates.

Parameters:
[in]lcLinphoneCore object.
Returns:
The path to the directory storing the user's certificates.

Retrieves the user pointer that was given to linphone_core_new()

const char* linphone_core_get_version ( void  )

Returns liblinphone's version as a string.

Get the path to the file storing the zrtp secrets cache.

Parameters:
[in]lcLinphoneCore object.
Returns:
The path to the file storing the zrtp secrets cache.

Main loop function. It is crucial that your application call it periodically.

linphone_core_iterate() performs various backgrounds tasks:

  • receiving of SIP messages
  • handles timers and timeout
  • performs registration to proxies
  • authentication retries The application MUST call this function periodically, in its main loop. Be careful that this function must be called from the same thread as other liblinphone methods. If it is not the case make sure all liblinphone calls are serialized with a mutex.
LinphoneLogCollectionState linphone_core_log_collection_enabled ( void  )

Tells whether the linphone core log collection is enabled.

Returns:
The state of the linphone core log collection.

Check if a media encryption type is supported

Parameters:
lccore
mencLinphoneMediaEncryption
Returns:
whether a media encryption scheme is supported by the LinphoneCore engine

Migrates the friends from the linphonerc to the database if not done yet

Parameters:
lcthe linphone core

Migrates the call logs from the linphonerc to the database if not done yet

Parameters:
lcthe linphone core

Migrate configuration so that all SIP transports are enabled. Versions of linphone < 3.7 did not support using multiple SIP transport simultaneously. This function helps application to migrate the configuration so that all transports are enabled. Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. This function must be used just after creating the core, before any call to linphone_core_iterate()

Parameters:
lcthe linphone core
Returns:
1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error.
LinphoneCore* linphone_core_new ( const LinphoneCoreVTable vtable,
const char *  config_path,
const char *  factory_config_path,
void *  userdata 
)

Instanciates a LinphoneCore object.

The LinphoneCore object is the primary handle for doing all phone actions. It should be unique within your application.

Parameters:
vtablea LinphoneCoreVTable structure holding your application callbacks
config_patha path to a config file. If it does not exists it will be created. The config file is used to store all settings, call logs, friends, proxies... so that all these settings become persistent over the life of the LinphoneCore object. It is allowed to set a NULL config file. In that case LinphoneCore will not store any settings.
factory_config_patha path to a read-only config file that can be used to to store hard-coded preference such as proxy settings or internal preferences. The settings in this factory file always override the one in the normal config file. It is OPTIONAL, use NULL if unneeded.
userdataan opaque user pointer that can be retrieved at any time (for example in callbacks) using linphone_core_get_user_data().
See also:
linphone_core_new_with_config
LinphoneCore* linphone_core_new_with_config ( const LinphoneCoreVTable vtable,
LpConfig config,
void *  userdata 
)

Instantiates a LinphoneCore object with a given LpConfig.

The LinphoneCore object is the primary handle for doing all phone actions. It should be unique within your application.

Parameters:
vtablea LinphoneCoreVTable structure holding your application callbacks
configa pointer to an LpConfig object holding the configuration of the LinphoneCore to be instantiated.
userdataan opaque user pointer that can be retrieved at any time (for example in callbacks) using linphone_core_get_user_data().
See also:
linphone_core_new
void linphone_core_reload_ms_plugins ( LinphoneCore lc,
const char *  path 
)

Reload mediastreamer2 plugins from specified directory.

Parameters:
[in]lcLinphoneCore object.
[in]paththe path from where plugins are to be loaded, pass NULL to use default (compile-time determined) plugin directory.
void linphone_core_remove_listener ( LinphoneCore lc,
const LinphoneCoreVTable vtable 
)

remove a listener registred by linphone_core_add_listener.

Parameters:
lcobject
vtablea LinphoneCoreVTable structure holding your application callbacks
void linphone_core_remove_supported_tag ( LinphoneCore lc,
const char *  tag 
)

Remove a supported tag.

See also:
linphone_core_add_supported_tag()
Parameters:
lcthe LinphoneCore
tagthe tag to remove

Reset the log collection by removing the log files.

Enable logs serialization (output logs from either the thread that creates the linphone core or the thread that calls linphone_core_iterate()). Must be called before creating the linphone core.

void linphone_core_set_call_logs_database_path ( LinphoneCore lc,
const char *  path 
)

Sets the database filename where call logs will be stored. If the file does not exist, it will be created.

Parameters:
lcthe linphone core
pathfilesystem path
void linphone_core_set_chat_database_path ( LinphoneCore lc,
const char *  path 
)

Sets the database filename where chat messages will be stored. If the file does not exist, it will be created.

Parameters:
lcthe linphone core
pathfilesystem path
void linphone_core_set_friends_database_path ( LinphoneCore lc,
const char *  path 
)

Sets the database filename where friends will be stored. If the file does not exist, it will be created.

Parameters:
lcthe linphone core
pathfilesystem path

Set the max file size in bytes of the files used for log collection. Warning: this function should only not be used to change size dynamically but instead only before calling

See also:
linphone_core_enable_log_collection. If you increase max size on runtime, logs chronological order COULD be broken.
Parameters:
[in]sizeThe max file size in bytes of the files used for log collection.
void linphone_core_set_log_collection_path ( const char *  path)

Set the path where the log files will be written for log collection.

Parameters:
[in]pathThe path where the log files will be written.
void linphone_core_set_log_collection_prefix ( const char *  prefix)

Set the prefix of the filenames that will be used for log collection.

Parameters:
[in]prefixThe prefix to use for the filenames for log collection.
void linphone_core_set_log_collection_upload_server_url ( LinphoneCore core,
const char *  server_url 
)

Set the url of the server where to upload the collected log files.

Parameters:
[in]coreLinphoneCore object
[in]server_urlThe url of the server where to upload the collected log files.
void linphone_core_set_log_file ( FILE *  file)

Define a log file.

If the file pointer passed as an argument is NULL, stdout is used instead.

Parameters:
fileA pointer to the FILE structure of the file to write to.
void linphone_core_set_log_handler ( OrtpLogFunc  logfunc)

Define a log handler.

Parameters:
logfuncThe function pointer of the log handler.
void linphone_core_set_log_level ( OrtpLogLevel  loglevel)

Define the minimum level for logging.

Parameters:
loglevelMinimum level for logging messages.
void linphone_core_set_log_level_mask ( OrtpLogLevel  loglevel)

Define the log level using mask.

The loglevel parameter is a bitmask parameter. Therefore to enable only warning and error messages, use ORTP_WARNING | ORTP_ERROR. To disable logs, simply set loglevel to 0.

Parameters:
loglevelA bitmask of the log levels to set.
void linphone_core_set_max_calls ( LinphoneCore lc,
int  max 
)

Set the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer

Parameters:
lccore
maxnumber of simultaneous calls
int linphone_core_set_provisioning_uri ( LinphoneCore lc,
const char *  uri 
)

Set URI where to download xml configuration file at startup. This can also be set from configuration file or factory config file, from [misc] section, item "config-uri". Calling this function does not load the configuration. It will write the value into configuration so that configuration from remote URI will take place at next LinphoneCore start.

Parameters:
lcthe linphone core
urithe http or https uri to use in order to download the configuration. Passing NULL will disable remote provisioning.
Returns:
-1 if uri could not be parsed, 0 otherwise. Note that this does not check validity of URI endpoint nor scheme and download may still fail.
void linphone_core_set_root_ca ( LinphoneCore lc,
const char *  path 
)

Sets the path to a file or folder containing trusted root CAs (PEM format)

Parameters:
path
lcThe LinphoneCore object
void linphone_core_set_ssl_config ( LinphoneCore lc,
void *  ssl_config 
)

Set the pointer to an externally provided ssl configuration for the crypto library

Parameters:
lcLinphoneCore object
[in]ssl_configA pointer to an opaque structure which will be provided directly to the crypto library used in bctoolbox. Use with extra care. This ssl_config structure is responsability of the caller and will not be freed at the connection's end.
void linphone_core_set_user_certificates_path ( LinphoneCore lc,
const char *  path 
)

Set the path to the directory storing the user's x509 certificates (used by dtls)

Parameters:
[in]lcLinphoneCore object
[in]pathThe path to the directory to use to store the user's certificates.
void linphone_core_set_user_data ( LinphoneCore lc,
void *  userdata 
)

Associate a user pointer to the linphone core.

void linphone_core_set_zrtp_secrets_file ( LinphoneCore lc,
const char *  file 
)

Set the path to the file storing the zrtp secrets cache.

Parameters:
[in]lcLinphoneCore object
[in]fileThe path to the file to use to store the zrtp secrets cache.

Upload the log collection to the configured server url.

Parameters:
[in]coreLinphoneCore object

Destroy a vtable.

Parameters:
tableto be destroyed

Gets a user data pointer in the vtable.

Parameters:
tablethe vtable
Returns:
the data attached to the vtable

Instantiate a vtable with all arguments set to NULL

Returns:
newly allocated vtable
void linphone_core_v_table_set_user_data ( LinphoneCoreVTable table,
void *  data 
)

Sets a user data pointer in the vtable.

Parameters:
tablethe vtable
datathe user data to attach
void linphone_core_verify_server_certificates ( LinphoneCore lc,
bool_t  yesno 
)

Specify whether the tls server certificate must be verified when connecting to a SIP/TLS server.

void linphone_core_verify_server_cn ( LinphoneCore lc,
bool_t  yesno 
)

Specify whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.

Function returning a human readable value for LinphoneStreamType.