pylinphone

Python API reference documentation

Liblinphone is a high-level open source library that integrates all the SIP voice/video and instant messaging features into a single easy-to-use API. This is the VoIP SDK engine on which Linphone applications are based.

Liblinphone combines our media processing and streaming toolkit (Mediastreamer2) with our user-agent library for SIP signaling (belle-sip).

Liblinphone is distributed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html). Please understand the licencing details before using it! For any use of this library beyond the rights granted to you by the GPLv3 license, please contact Belledonne Communications.

Other supported languages

Liblinphone has support for a variety of languages, each one has its own reference documentation:

See also

http://www.linphone.org

Getting started

Here's how to import our module and print the liblinphone version that you are using:

import linphone
print(linphone.Core.get_version())

Quick tour of liblinphone's features

Introduction

Liblinphone's has a consistent object-oriented design. Root objects must be constructed by the Factory class. No 'new' operator invocation is permitted. Liblinphone is using SIP as signaling protocol, which actually comprises a huge set of RFCs to cover various aspects of communications. Some terminology of the API is directly inherited from SIP specifications, that's why having some knowledge of the protocol is recommended for a better understanding of this documentation.

Initializing the engine

A typical liblinphone application has to first instanciate a Core object using the Factory. The core object represents the liblinphone engine, from which call, conferences, instant messages can be sent or received. For events to be reported and engine to schedule its tasks, the application must call Core.iterate() at regular interval, typically from a 20ms timer. In most case, a SIP account has to be provisionned so that SIP registration can take place onto a SIP server. This task is designated to the Account class. An Account can be created using Core.create_account(), based on parameters created with Core.create_account_params(). Then, account can be added to the core for usage using Core.add_account(). Application usually need to get informed of events occuring in the lifetime of the engine, which is done through listeners that the applications can override. An important listener interface is the CoreListener, that application should create, and then assign into their Core object through Core.add_listener() method.

Making calls

Applications can place outgoing calls using Core.invite() or Core.invite_address_with_params(). The CallParams class represents parameters for the calls, such as enabling video, requiring a specific MediaEncryption. The CallListener interface provides application way to get inform of the progress of the call, represented by the CallState enum. Incoming calls are notified through the CoreListener interface, and can later be accepted using Call.accept() . Calls can be terminated or aborted at any time using Call.terminate() .

Instant messaging

The ChatRoom class represents a text conversation. The Core object provides persistancy for all conversations, ie it stores all received and sent messages. The list of conversation can be retrieved using Core.chat_rooms property. To create a new conversation, use Core.create_chat_room(). ChatRoomParams provide a way to specify which kind of chatroom is to be created: for group, for one-ton-one conversation, with end-to end encryption for example. To send a message, first create the ChatMessage with ChatRoom.create_message_from_utf8(), then send it with ChatMessage.send() . A ChatMessage reports its progress through the ChatMessageListener interface. ChatRooms are automatically created by the Core when receiving a message that starts a new conversation, and notified through the CoreListener interface.

Presence

Applications can submit presence information through the Core's Core.presence_model property. The PresenceModel class represents the presence information, which is submitted to a presence server. Symmetrically, applications can subscribe to the presence server to get notified of the presence status of a contact list. This is to be done thanks to the FriendList and Friend classes.

class AVPFMode(enum.Enum):

Enum describing RTP AVPF activation modes.

AVPFModeDefault = <AVPFMode.AVPFModeDefault: -1>

Use default value defined at upper level.

AVPFModeDisabled = <AVPFMode.AVPFModeDisabled: 0>

AVPF is disabled.

AVPFModeEnabled = <AVPFMode.AVPFModeEnabled: 1>

AVPF is enabled.

Inherited Members
enum.Enum
name
value
class AccountCreatorActivationCodeStatus(enum.Enum):

Enum describing activation code checking, used by the AccountCreator.

Activation code ok.

AccountCreatorActivationCodeStatusTooShort = <AccountCreatorActivationCodeStatus.AccountCreatorActivationCodeStatusTooShort: 1>

Activation code too short.

AccountCreatorActivationCodeStatusTooLong = <AccountCreatorActivationCodeStatus.AccountCreatorActivationCodeStatusTooLong: 2>

Activation code too long.

AccountCreatorActivationCodeStatusInvalidCharacters = <AccountCreatorActivationCodeStatus.AccountCreatorActivationCodeStatusInvalidCharacters: 3>

Contain invalid characters.

Inherited Members
enum.Enum
name
value
class AccountCreatorAlgoStatus(enum.Enum):

Enum describing algorithm checking, used by the AccountCreator.

AccountCreatorAlgoStatusOk = <AccountCreatorAlgoStatus.AccountCreatorAlgoStatusOk: 0>

Algorithm ok.

AccountCreatorAlgoStatusNotSupported = <AccountCreatorAlgoStatus.AccountCreatorAlgoStatusNotSupported: 1>

Algorithm not supported.

Inherited Members
enum.Enum
name
value
class AccountCreatorBackend(enum.Enum):

Enum describing backend used in the AccountCreator.

AccountCreatorBackendXMLRPC = <AccountCreatorBackend.AccountCreatorBackendXMLRPC: 0>

XMLRPC Backend.

AccountCreatorBackendFlexiAPI = <AccountCreatorBackend.AccountCreatorBackendFlexiAPI: 1>

FlexiAPI Backend.

Inherited Members
enum.Enum
name
value
class AccountCreatorDomainStatus(enum.Enum):

Enum describing domain checking, used by the AccountCreator.

AccountCreatorDomainStatusOk = <AccountCreatorDomainStatus.AccountCreatorDomainStatusOk: 0>

Domain ok.

AccountCreatorDomainStatusInvalid = <AccountCreatorDomainStatus.AccountCreatorDomainStatusInvalid: 1>

Domain invalid.

Inherited Members
enum.Enum
name
value
class AccountCreatorEmailStatus(enum.Enum):

Enum describing email checking, used by the AccountCreator.

AccountCreatorEmailStatusOk = <AccountCreatorEmailStatus.AccountCreatorEmailStatusOk: 0>

Email ok.

AccountCreatorEmailStatusMalformed = <AccountCreatorEmailStatus.AccountCreatorEmailStatusMalformed: 1>

Email malformed.

AccountCreatorEmailStatusInvalidCharacters = <AccountCreatorEmailStatus.AccountCreatorEmailStatusInvalidCharacters: 2>

Contain invalid characters.

Inherited Members
enum.Enum
name
value
class AccountCreatorLanguageStatus(enum.Enum):

Enum describing language checking, used by the AccountCreator.

AccountCreatorLanguageStatusOk = <AccountCreatorLanguageStatus.AccountCreatorLanguageStatusOk: 0>

Language ok.

Inherited Members
enum.Enum
name
value
class AccountCreatorPasswordStatus(enum.Enum):

Enum describing password checking, used by the AccountCreator.

AccountCreatorPasswordStatusOk = <AccountCreatorPasswordStatus.AccountCreatorPasswordStatusOk: 0>

Password ok.

AccountCreatorPasswordStatusTooShort = <AccountCreatorPasswordStatus.AccountCreatorPasswordStatusTooShort: 1>

Password too short.

AccountCreatorPasswordStatusTooLong = <AccountCreatorPasswordStatus.AccountCreatorPasswordStatusTooLong: 2>

Password too long.

AccountCreatorPasswordStatusInvalidCharacters = <AccountCreatorPasswordStatus.AccountCreatorPasswordStatusInvalidCharacters: 3>

Contain invalid characters.

AccountCreatorPasswordStatusMissingCharacters = <AccountCreatorPasswordStatus.AccountCreatorPasswordStatusMissingCharacters: 4>

Missing specific characters.

Inherited Members
enum.Enum
name
value
class AccountCreatorPhoneNumberStatus(enum.Enum):

Enum describing phone number checking, used by the AccountCreator.

Phone number ok.

AccountCreatorPhoneNumberStatusTooShort = <AccountCreatorPhoneNumberStatus.AccountCreatorPhoneNumberStatusTooShort: 2>

Phone number too short.

AccountCreatorPhoneNumberStatusTooLong = <AccountCreatorPhoneNumberStatus.AccountCreatorPhoneNumberStatusTooLong: 4>

Phone number too long.

AccountCreatorPhoneNumberStatusInvalidCountryCode = <AccountCreatorPhoneNumberStatus.AccountCreatorPhoneNumberStatusInvalidCountryCode: 8>

Country code invalid.

AccountCreatorPhoneNumberStatusInvalid = <AccountCreatorPhoneNumberStatus.AccountCreatorPhoneNumberStatusInvalid: 16>

Phone number invalid.

Inherited Members
enum.Enum
name
value
class AccountCreatorStatus(enum.Enum):

Enum describing the status of server request, used by the AccountCreator.

AccountCreatorStatusRequestOk = <AccountCreatorStatus.AccountCreatorStatusRequestOk: 0>

Request status.

AccountCreatorStatusRequestFailed = <AccountCreatorStatus.AccountCreatorStatusRequestFailed: 1>

Request failed.

AccountCreatorStatusMissingArguments = <AccountCreatorStatus.AccountCreatorStatusMissingArguments: 2>

Request failed due to missing argument(s)

AccountCreatorStatusMissingCallbacks = <AccountCreatorStatus.AccountCreatorStatusMissingCallbacks: 3>

Request failed due to missing callback(s)

AccountCreatorStatusAccountCreated = <AccountCreatorStatus.AccountCreatorStatusAccountCreated: 4>

Account status.

AccountCreatorStatusAccountNotCreated = <AccountCreatorStatus.AccountCreatorStatusAccountNotCreated: 5>

Account not created.

AccountCreatorStatusAccountExist = <AccountCreatorStatus.AccountCreatorStatusAccountExist: 6>

Account exist.

AccountCreatorStatusAccountExistWithAlias = <AccountCreatorStatus.AccountCreatorStatusAccountExistWithAlias: 7>

Account exist with alias.

AccountCreatorStatusAccountNotExist = <AccountCreatorStatus.AccountCreatorStatusAccountNotExist: 8>

Account not exist.

AccountCreatorStatusAliasIsAccount = <AccountCreatorStatus.AccountCreatorStatusAliasIsAccount: 9>

Account was created with Alias.

AccountCreatorStatusAliasExist = <AccountCreatorStatus.AccountCreatorStatusAliasExist: 10>

Alias exist.

AccountCreatorStatusAliasNotExist = <AccountCreatorStatus.AccountCreatorStatusAliasNotExist: 11>

Alias not exist.

AccountCreatorStatusAccountActivated = <AccountCreatorStatus.AccountCreatorStatusAccountActivated: 12>

Account activated.

AccountCreatorStatusAccountAlreadyActivated = <AccountCreatorStatus.AccountCreatorStatusAccountAlreadyActivated: 13>

Account already activated.

AccountCreatorStatusAccountNotActivated = <AccountCreatorStatus.AccountCreatorStatusAccountNotActivated: 14>

Account not activated.

AccountCreatorStatusAccountLinked = <AccountCreatorStatus.AccountCreatorStatusAccountLinked: 15>

Account linked.

AccountCreatorStatusAccountNotLinked = <AccountCreatorStatus.AccountCreatorStatusAccountNotLinked: 16>

Account not linked.

AccountCreatorStatusServerError = <AccountCreatorStatus.AccountCreatorStatusServerError: 17>

Server.

AccountCreatorStatusPhoneNumberInvalid = <AccountCreatorStatus.AccountCreatorStatusPhoneNumberInvalid: 18>

Error cannot send SMS.

AccountCreatorStatusWrongActivationCode = <AccountCreatorStatus.AccountCreatorStatusWrongActivationCode: 19>

Error key doesn't match.

AccountCreatorStatusPhoneNumberOverused = <AccountCreatorStatus.AccountCreatorStatusPhoneNumberOverused: 20>

Error too many SMS sent.

AccountCreatorStatusAlgoNotSupported = <AccountCreatorStatus.AccountCreatorStatusAlgoNotSupported: 21>

Error algo isn't MD5 or SHA-256.

AccountCreatorStatusUnexpectedError = <AccountCreatorStatus.AccountCreatorStatusUnexpectedError: 22>

Generic error.

AccountCreatorStatusNotImplementedError = <AccountCreatorStatus.AccountCreatorStatusNotImplementedError: 23>

This API isn't implemented in the current backend.

AccountCreatorStatusRequestNotAuthorized = <AccountCreatorStatus.AccountCreatorStatusRequestNotAuthorized: 24>

Request has been denied, probably due to invalid auth token.

AccountCreatorStatusRequestTooManyRequests = <AccountCreatorStatus.AccountCreatorStatusRequestTooManyRequests: 25>

Request has been denied, due to too many requests sent in given period.

Inherited Members
enum.Enum
name
value
class AccountCreatorTransportStatus(enum.Enum):

Enum describing transport checking, used by the AccountCreator.

AccountCreatorTransportStatusOk = <AccountCreatorTransportStatus.AccountCreatorTransportStatusOk: 0>

Transport ok.

AccountCreatorTransportStatusUnsupported = <AccountCreatorTransportStatus.AccountCreatorTransportStatusUnsupported: 1>

Transport invalid.

Inherited Members
enum.Enum
name
value
class AccountCreatorUsernameStatus(enum.Enum):

Enum describing username checking, used by the AccountCreator.

AccountCreatorUsernameStatusOk = <AccountCreatorUsernameStatus.AccountCreatorUsernameStatusOk: 0>

Username ok.

AccountCreatorUsernameStatusTooShort = <AccountCreatorUsernameStatus.AccountCreatorUsernameStatusTooShort: 1>

Username too short.

AccountCreatorUsernameStatusTooLong = <AccountCreatorUsernameStatus.AccountCreatorUsernameStatusTooLong: 2>

Username too long.

AccountCreatorUsernameStatusInvalidCharacters = <AccountCreatorUsernameStatus.AccountCreatorUsernameStatusInvalidCharacters: 3>

Contain invalid characters.

AccountCreatorUsernameStatusInvalid = <AccountCreatorUsernameStatus.AccountCreatorUsernameStatusInvalid: 4>

Invalid username.

Inherited Members
enum.Enum
name
value
class AddressFamily(enum.Enum):

Enum describing Ip family.

AddressFamilyInet = <AddressFamily.AddressFamilyInet: 0>

IpV4.

AddressFamilyInet6 = <AddressFamily.AddressFamilyInet6: 1>

IpV6.

AddressFamilyUnspec = <AddressFamily.AddressFamilyUnspec: 2>

Unknown.

Inherited Members
enum.Enum
name
value
class AlertType(enum.Enum):

All kinds of alerts.

AlertTypeQoSCameraMisfunction = <AlertType.AlertTypeQoSCameraMisfunction: 0>

Camera is not working.

AlertTypeQoSCameraLowFramerate = <AlertType.AlertTypeQoSCameraLowFramerate: 1>

Camera is capturing low framerate.

AlertTypeQoSVideoStalled = <AlertType.AlertTypeQoSVideoStalled: 2>

Video decoding has stopped for a given period (10 s by default).

AlertTypeQoSHighLossLateRate = <AlertType.AlertTypeQoSHighLossLateRate: 3>

A received media stream suffers from high loss or late rate.

AlertTypeQoSHighRemoteLossRate = <AlertType.AlertTypeQoSHighRemoteLossRate: 4>

A report of high loss rate is received from remote party.

AlertTypeQoSBurstOccured = <AlertType.AlertTypeQoSBurstOccured: 5>

Packet Burst phenomenon.

AlertTypeQoSRetransmissionFailures = <AlertType.AlertTypeQoSRetransmissionFailures: 6>

Loss rate is significant but retransmissions fail to arrive on time.

AlertTypeQoSLowDownloadBandwidthEstimation = <AlertType.AlertTypeQoSLowDownloadBandwidthEstimation: 7>

Low bandwidth detected.

AlertTypeQoSLowQualityReceivedVideo = <AlertType.AlertTypeQoSLowQualityReceivedVideo: 8>

Low quality (bitrate) video received.

AlertTypeQoSLowQualitySentVideo = <AlertType.AlertTypeQoSLowQualitySentVideo: 9>

Low quality video is being sent.

AlertTypeQoSLowSignal = <AlertType.AlertTypeQoSLowSignal: 10>

The operating system reports a low radio signal (wifi or mobile)

AlertTypeQoSLostSignal = <AlertType.AlertTypeQoSLostSignal: 11>

The operating system reports a loss of radio signal (wifi or mobile).

Inherited Members
enum.Enum
name
value
class AudioDeviceCapabilities(enum.Enum):

AudioDeviceCapabilities enum represents whether a device can record audio, play audio or both

AudioDeviceCapabilitiesCapabilityRecord = <AudioDeviceCapabilities.AudioDeviceCapabilitiesCapabilityRecord: 1>

Can record audio.

AudioDeviceCapabilitiesCapabilityPlay = <AudioDeviceCapabilities.AudioDeviceCapabilitiesCapabilityPlay: 2>

Can play audio.

AudioDeviceCapabilitiesCapabilityAll = <AudioDeviceCapabilities.AudioDeviceCapabilitiesCapabilityAll: 3>

Can play and record audio.

Inherited Members
enum.Enum
name
value
class AudioDeviceType(enum.Enum):

AudioDeviceType enum represents the different types of an audio device.

AudioDeviceTypeUnknown = <AudioDeviceType.AudioDeviceTypeUnknown: 0>

Unknown.

AudioDeviceTypeMicrophone = <AudioDeviceType.AudioDeviceTypeMicrophone: 1>

Microphone.

AudioDeviceTypeEarpiece = <AudioDeviceType.AudioDeviceTypeEarpiece: 2>

Earpiece.

AudioDeviceTypeSpeaker = <AudioDeviceType.AudioDeviceTypeSpeaker: 3>

Speaker.

AudioDeviceTypeBluetooth = <AudioDeviceType.AudioDeviceTypeBluetooth: 4>

Bluetooth.

AudioDeviceTypeBluetoothA2DP = <AudioDeviceType.AudioDeviceTypeBluetoothA2DP: 5>

Bluetooth A2DP.

AudioDeviceTypeTelephony = <AudioDeviceType.AudioDeviceTypeTelephony: 6>

Telephony.

AudioDeviceTypeAuxLine = <AudioDeviceType.AudioDeviceTypeAuxLine: 7>

AuxLine.

AudioDeviceTypeGenericUsb = <AudioDeviceType.AudioDeviceTypeGenericUsb: 8>

GenericUsb.

AudioDeviceTypeHeadset = <AudioDeviceType.AudioDeviceTypeHeadset: 9>

Headset.

AudioDeviceTypeHeadphones = <AudioDeviceType.AudioDeviceTypeHeadphones: 10>

Headphones.

AudioDeviceTypeHearingAid = <AudioDeviceType.AudioDeviceTypeHearingAid: 11>

Hearing Aid.

Inherited Members
enum.Enum
name
value
class AuthMethod(enum.Enum):

Enum describing the authentication methods.

AuthMethodHttpDigest = <AuthMethod.AuthMethodHttpDigest: 0>

Digest authentication requested.

AuthMethodTls = <AuthMethod.AuthMethodTls: 1>

Client certificate requested.

AuthMethodBearer = <AuthMethod.AuthMethodBearer: 2>

Bearer authentication.

Inherited Members
enum.Enum
name
value
class CallDir(enum.Enum):

Enum representing the direction of a call.

CallDirOutgoing = <CallDir.CallDirOutgoing: 0>

outgoing calls

CallDirIncoming = <CallDir.CallDirIncoming: 1>

incoming calls

Inherited Members
enum.Enum
name
value
class CallState(enum.Enum):

CallState enum represents the different states a call can reach into. The application is notified of a state change through the LinphoneCoreVTable::call_state_changed callback.

CallStateIdle = <CallState.CallStateIdle: 0>

Initial state.

CallStateIncomingReceived = <CallState.CallStateIncomingReceived: 1>

Incoming call received.

CallStatePushIncomingReceived = <CallState.CallStatePushIncomingReceived: 2>

PushIncoming call received.

CallStateOutgoingInit = <CallState.CallStateOutgoingInit: 3>

Outgoing call initialized.

CallStateOutgoingProgress = <CallState.CallStateOutgoingProgress: 4>

Outgoing call in progress.

CallStateOutgoingRinging = <CallState.CallStateOutgoingRinging: 5>

Outgoing call ringing.

CallStateOutgoingEarlyMedia = <CallState.CallStateOutgoingEarlyMedia: 6>

Outgoing call early media.

CallStateConnected = <CallState.CallStateConnected: 7>

Connected.

CallStateStreamsRunning = <CallState.CallStateStreamsRunning: 8>

Streams running.

CallStatePausing = <CallState.CallStatePausing: 9>

Pausing.

CallStatePaused = <CallState.CallStatePaused: 10>

Paused.

CallStateResuming = <CallState.CallStateResuming: 11>

Resuming.

CallStateReferred = <CallState.CallStateReferred: 12>

Referred.

CallStateError = <CallState.CallStateError: 13>

Error.

CallStateEnd = <CallState.CallStateEnd: 14>

Call end.

CallStatePausedByRemote = <CallState.CallStatePausedByRemote: 15>

Paused by remote.

CallStateUpdatedByRemote = <CallState.CallStateUpdatedByRemote: 16>

The call's parameters are updated for example when video is asked by remote.

CallStateIncomingEarlyMedia = <CallState.CallStateIncomingEarlyMedia: 17>

We are proposing early media to an incoming call.

CallStateUpdating = <CallState.CallStateUpdating: 18>

We have initiated a call update.

CallStateReleased = <CallState.CallStateReleased: 19>

The call object is now released.

CallStateEarlyUpdatedByRemote = <CallState.CallStateEarlyUpdatedByRemote: 20>

The call is updated by remote while not yet answered (SIP UPDATE in earlydialog received)

CallStateEarlyUpdating = <CallState.CallStateEarlyUpdating: 21>

We are updating the call while not yet answered (SIP UPDATE in early dialogsent)

Inherited Members
enum.Enum
name
value
class CallStatus(enum.Enum):

Enum representing the status of a call.

CallStatusSuccess = <CallStatus.CallStatusSuccess: 0>

The call was sucessful.

CallStatusAborted = <CallStatus.CallStatusAborted: 1>

The call was aborted (caller hanged up)

CallStatusMissed = <CallStatus.CallStatusMissed: 2>

The call was missed (incoming call timed out without being answered or hangedup)

CallStatusDeclined = <CallStatus.CallStatusDeclined: 3>

The call was declined, either locally or by remote end.

CallStatusEarlyAborted = <CallStatus.CallStatusEarlyAborted: 4>

The call was aborted before being advertised to the application - for protocolreasons.

CallStatusAcceptedElsewhere = <CallStatus.CallStatusAcceptedElsewhere: 5>

The call was answered on another device.

CallStatusDeclinedElsewhere = <CallStatus.CallStatusDeclinedElsewhere: 6>

The call was declined on another device.

Inherited Members
enum.Enum
name
value
class ChatMessageDirection(enum.Enum):

ChatMessageDirection is used to indicate if a message is outgoing or incoming.

ChatMessageDirectionIncoming = <ChatMessageDirection.ChatMessageDirectionIncoming: 0>

Incoming message.

ChatMessageDirectionOutgoing = <ChatMessageDirection.ChatMessageDirectionOutgoing: 1>

Outgoing message.

Inherited Members
enum.Enum
name
value
class ChatMessageState(enum.Enum):

ChatMessageState is used to notify if messages have been successfully delivered or not.

ChatMessageStateIdle = <ChatMessageState.ChatMessageStateIdle: 0>

Initial state.

ChatMessageStateInProgress = <ChatMessageState.ChatMessageStateInProgress: 1>

Delivery in progress.

ChatMessageStateDelivered = <ChatMessageState.ChatMessageStateDelivered: 2>

Message successfully delivered and acknowledged by the server.

ChatMessageStateNotDelivered = <ChatMessageState.ChatMessageStateNotDelivered: 3>

Message was not delivered.

ChatMessageStateFileTransferError = <ChatMessageState.ChatMessageStateFileTransferError: 4>

Message was received and acknowledged but cannot get file from server.

ChatMessageStateFileTransferDone = <ChatMessageState.ChatMessageStateFileTransferDone: 5>

File transfer has been completed successfully.

ChatMessageStateDeliveredToUser = <ChatMessageState.ChatMessageStateDeliveredToUser: 6>

Message successfully delivered an acknowledged by the remote user.

ChatMessageStateDisplayed = <ChatMessageState.ChatMessageStateDisplayed: 7>

Message successfully displayed to the remote user.

ChatMessageStateFileTransferInProgress = <ChatMessageState.ChatMessageStateFileTransferInProgress: 8>

File transfer is in progress.

Inherited Members
enum.Enum
name
value
class ChatRoomBackend(enum.Enum):

ChatRoomBackend is used to indicate the backend implementation of a chat room.

ChatRoomBackendBasic = <ChatRoomBackend.ChatRoomBackendBasic: 1>

Basic (client-to-client) chat room.

ChatRoomBackendFlexisipChat = <ChatRoomBackend.ChatRoomBackendFlexisipChat: 2>

Server-based chat room.

Inherited Members
enum.Enum
name
value
class ChatRoomCapabilities(enum.Enum):

ChatRoomCapabilities is used to indicate the capabilities of a chat room.

ChatRoomCapabilitiesNone = <ChatRoomCapabilities.ChatRoomCapabilitiesNone: 0>

No capabilities.

ChatRoomCapabilitiesBasic = <ChatRoomCapabilities.ChatRoomCapabilitiesBasic: 1>

No server.

ChatRoomCapabilitiesRealTimeText = <ChatRoomCapabilities.ChatRoomCapabilitiesRealTimeText: 2>

Supports RTT.

ChatRoomCapabilitiesConference = <ChatRoomCapabilities.ChatRoomCapabilitiesConference: 4>

Use server (supports group chat)

ChatRoomCapabilitiesProxy = <ChatRoomCapabilities.ChatRoomCapabilitiesProxy: 8>

Special proxy chat room flag.

ChatRoomCapabilitiesMigratable = <ChatRoomCapabilities.ChatRoomCapabilitiesMigratable: 16>

Chat room migratable from Basic to Conference.

ChatRoomCapabilitiesOneToOne = <ChatRoomCapabilities.ChatRoomCapabilitiesOneToOne: 32>

A communication between two participants (can be Basic or Conference)

ChatRoomCapabilitiesEncrypted = <ChatRoomCapabilities.ChatRoomCapabilitiesEncrypted: 64>

Chat room is encrypted.

ChatRoomCapabilitiesEphemeral = <ChatRoomCapabilities.ChatRoomCapabilitiesEphemeral: 128>

Chat room can enable ephemeral messages.

Inherited Members
enum.Enum
name
value
class ChatRoomEncryptionBackend(enum.Enum):

ChatRoomEncryptionBackend is used to indicate the encryption engine used by a chat room.

ChatRoomEncryptionBackendNone = <ChatRoomEncryptionBackend.ChatRoomEncryptionBackendNone: 0>

No encryption.

ChatRoomEncryptionBackendLime = <ChatRoomEncryptionBackend.ChatRoomEncryptionBackendLime: 1>

Lime x3dh encryption.

Inherited Members
enum.Enum
name
value
class ChatRoomEphemeralMode(enum.Enum):

ChatRoomEphemeralMode is used to the ephemeral message mode used by a chat room.

ChatRoomEphemeralModeDeviceManaged = <ChatRoomEphemeralMode.ChatRoomEphemeralModeDeviceManaged: 0>

Each device manages its own ephemeral settings.

ChatRoomEphemeralModeAdminManaged = <ChatRoomEphemeralMode.ChatRoomEphemeralModeAdminManaged: 1>

Ephemeral settings are chatroom wide and only admins can change them.

Inherited Members
enum.Enum
name
value
class ChatRoomSecurityLevel(enum.Enum):

TODO move to encryption engine object when available ChatRoomSecurityLevel is used to indicate the encryption security level of a chat room.

ChatRoomSecurityLevelUnsafe = <ChatRoomSecurityLevel.ChatRoomSecurityLevelUnsafe: 0>

Security failure.

ChatRoomSecurityLevelClearText = <ChatRoomSecurityLevel.ChatRoomSecurityLevelClearText: 1>

No encryption.

ChatRoomSecurityLevelEncrypted = <ChatRoomSecurityLevel.ChatRoomSecurityLevelEncrypted: 2>

Encrypted.

ChatRoomSecurityLevelSafe = <ChatRoomSecurityLevel.ChatRoomSecurityLevelSafe: 3>

Encrypted and verified.

Inherited Members
enum.Enum
name
value
class ChatRoomState(enum.Enum):

ChatRoomState is used to indicate the current state of a chat room.

ChatRoomStateNone = <ChatRoomState.ChatRoomStateNone: 0>

Initial state.

ChatRoomStateInstantiated = <ChatRoomState.ChatRoomStateInstantiated: 1>

Chat room is now instantiated on local.

ChatRoomStateCreationPending = <ChatRoomState.ChatRoomStateCreationPending: 2>

One creation request was sent to the server.

ChatRoomStateCreated = <ChatRoomState.ChatRoomStateCreated: 3>

Chat room was created on the server.

ChatRoomStateCreationFailed = <ChatRoomState.ChatRoomStateCreationFailed: 4>

Chat room creation failed.

ChatRoomStateTerminationPending = <ChatRoomState.ChatRoomStateTerminationPending: 5>

Wait for chat room termination.

ChatRoomStateTerminated = <ChatRoomState.ChatRoomStateTerminated: 6>

Chat room exists on server but not in local.

ChatRoomStateTerminationFailed = <ChatRoomState.ChatRoomStateTerminationFailed: 7>

The chat room termination failed.

ChatRoomStateDeleted = <ChatRoomState.ChatRoomStateDeleted: 8>

Chat room was deleted on the server.

Inherited Members
enum.Enum
name
value
class CodecPriorityPolicy(enum.Enum):

Codec priority policies. This enum represents different policies for managing offered codec lists during calls, as well as the offer-answer logic. Currently, policies can be applied only for video codecs.

CodecPriorityPolicyBasic = <CodecPriorityPolicy.CodecPriorityPolicyBasic: 0>

In this mode, codecs have initial default ordering, that can be changed by theapplication The answerer of a call accepts codecs with the order given in theoffer.

CodecPriorityPolicyAuto = <CodecPriorityPolicy.CodecPriorityPolicyAuto: 1>

In this mode, the codec list is managed by the Core according to hardwarecapabilities in the goal of optimizing video quality and user experience.

Inherited Members
enum.Enum
name
value
class ConferenceInfoState(enum.Enum):

ConferenceInfoState is used to list all states of a conference info object

ConferenceInfoStateNew = <ConferenceInfoState.ConferenceInfoStateNew: 0>

New conference.

ConferenceInfoStateUpdated = <ConferenceInfoState.ConferenceInfoStateUpdated: 1>

Conference has been updated.

ConferenceInfoStateCancelled = <ConferenceInfoState.ConferenceInfoStateCancelled: 2>

Canceling a conference.

Inherited Members
enum.Enum
name
value
class ConferenceJoiningMode(enum.Enum):

Mode of joining conference.

It is only valid at the creation of the conferece
ConferenceJoiningModeDialIn = <ConferenceJoiningMode.ConferenceJoiningModeDialIn: 0>

Participants must dial the conference server.

ConferenceJoiningModeDialOut = <ConferenceJoiningMode.ConferenceJoiningModeDialOut: 1>

Conference server dials participants.

Inherited Members
enum.Enum
name
value
class ConferenceLayout(enum.Enum):

ConferenceLayout is used to indicate the layout used by the conference.

ConferenceLayoutGrid = <ConferenceLayout.ConferenceLayoutGrid: 0>

Grid - each participant is given an equal sized image size.

ConferenceLayoutActiveSpeaker = <ConferenceLayout.ConferenceLayoutActiveSpeaker: 1>

Active speaker - participant who speaks is prominently displayed in the centerof the screen and other participants are minimized.

Inherited Members
enum.Enum
name
value
class ConferenceParticipantListType(enum.Enum):

Type of conference participant list. When participant list is closed, no more participants can be added other than those declared when creating the conference When participant list is open, other people can join the conference upon invitation of a participant no more participants can be added other than those declared when creating the conference

ConferenceParticipantListTypeClosed = <ConferenceParticipantListType.ConferenceParticipantListTypeClosed: 0>

Only participants in the initiating INVITE are allowed to join the conference.

ConferenceParticipantListTypeOpen = <ConferenceParticipantListType.ConferenceParticipantListTypeOpen: 1>

All devices calling the conference URI are allowed to join the conference.

Inherited Members
enum.Enum
name
value
class ConferenceSchedulerState(enum.Enum):

Describes conference scheduler possible states. It is notified via the conference_scheduler_state_changed callback in ConferenceSchedulerListener.

ConferenceSchedulerStateIdle = <ConferenceSchedulerState.ConferenceSchedulerStateIdle: 0>

Default state of a freshly created ConferenceScheduler.

ConferenceSchedulerStateError = <ConferenceSchedulerState.ConferenceSchedulerStateError: 1>

An error has happened during conference creation.

ConferenceSchedulerStateAllocationPending = <ConferenceSchedulerState.ConferenceSchedulerStateAllocationPending: 2>

Conference creation is in progress.

ConferenceSchedulerStateReady = <ConferenceSchedulerState.ConferenceSchedulerStateReady: 3>

Confererence has been created.

ConferenceSchedulerStateUpdating = <ConferenceSchedulerState.ConferenceSchedulerStateUpdating: 4>

Conference has been updated.

Inherited Members
enum.Enum
name
value
class ConferenceSecurityLevel(enum.Enum):

Conference minimum security level.

ConferenceSecurityLevelNone = <ConferenceSecurityLevel.ConferenceSecurityLevelNone: 0>

No security.

ConferenceSecurityLevelPointToPoint = <ConferenceSecurityLevel.ConferenceSecurityLevelPointToPoint: 1>

Point-to-point encryption.

ConferenceSecurityLevelEndToEnd = <ConferenceSecurityLevel.ConferenceSecurityLevelEndToEnd: 2>

End-to-end encryption.

Inherited Members
enum.Enum
name
value
class ConferenceState(enum.Enum):

ConferenceState is used to indicate the current state of a conference.

ConferenceStateNone = <ConferenceState.ConferenceStateNone: 0>

Initial state.

ConferenceStateInstantiated = <ConferenceState.ConferenceStateInstantiated: 1>

Conference is now instantiated locally.

ConferenceStateCreationPending = <ConferenceState.ConferenceStateCreationPending: 2>

One creation request was sent to the service.

ConferenceStateCreated = <ConferenceState.ConferenceStateCreated: 3>

Conference was created on the service.

ConferenceStateCreationFailed = <ConferenceState.ConferenceStateCreationFailed: 4>

Conference creation on service failed.

ConferenceStateTerminationPending = <ConferenceState.ConferenceStateTerminationPending: 5>

Wait for conference termination.

ConferenceStateTerminated = <ConferenceState.ConferenceStateTerminated: 6>

The conference is terminated locally, though it may still exist on the servicefor other participants.

ConferenceStateTerminationFailed = <ConferenceState.ConferenceStateTerminationFailed: 7>

Conference termination failed.

ConferenceStateDeleted = <ConferenceState.ConferenceStateDeleted: 8>

Conference was deleted locally and on the service.

Inherited Members
enum.Enum
name
value
class ConfiguringState(enum.Enum):

Describes the state of the remote configuring process of the Core object, 'Skipped' when the feature is disabled. It is notified via the configuring_status() callback in CoreListener.

Inherited Members
enum.Enum
name
value
class ConsolidatedPresence(enum.Enum):

Consolidated presence information: 'online' means the user is open for communication, 'busy' means the user is open for communication but involved in an other activity, 'do not disturb' means the user is not open for communication, and 'offline' means that no presence information is available.

Inherited Members
enum.Enum
name
value
class CoreLogCollectionUploadState(enum.Enum):

Used to notify if log collection upload have been succesfully delivered or not.

CoreLogCollectionUploadStateInProgress = <CoreLogCollectionUploadState.CoreLogCollectionUploadStateInProgress: 0>

Delivery in progress.

CoreLogCollectionUploadStateDelivered = <CoreLogCollectionUploadState.CoreLogCollectionUploadStateDelivered: 1>

Log collection upload successfully delivered and acknowledged by remote endpoint.

CoreLogCollectionUploadStateNotDelivered = <CoreLogCollectionUploadState.CoreLogCollectionUploadStateNotDelivered: 2>

Log collection upload was not delivered.

Inherited Members
enum.Enum
name
value
class EcCalibratorStatus(enum.Enum):

Enum describing the result of the echo canceller calibration process.

EcCalibratorStatusInProgress = <EcCalibratorStatus.EcCalibratorStatusInProgress: 0>

The echo canceller calibration process is on going.

EcCalibratorStatusDone = <EcCalibratorStatus.EcCalibratorStatusDone: 1>

The echo canceller calibration has been performed and produced an echo delaymeasure.

EcCalibratorStatusFailed = <EcCalibratorStatus.EcCalibratorStatusFailed: 2>

The echo canceller calibration process has failed.

EcCalibratorStatusDoneNoEcho = <EcCalibratorStatus.EcCalibratorStatusDoneNoEcho: 3>

The echo canceller calibration has been performed and no echo has beendetected.

Inherited Members
enum.Enum
name
value
class EventLogType(enum.Enum):

EventLogType is used to indicate the type of an event. Useful for cast.

EventLogTypeNone = <EventLogType.EventLogTypeNone: 0>

No defined event.

EventLogTypeConferenceCreated = <EventLogType.EventLogTypeConferenceCreated: 1>

Conference (created) event.

EventLogTypeConferenceTerminated = <EventLogType.EventLogTypeConferenceTerminated: 2>

Conference (terminated) event.

EventLogTypeConferenceCallStarted = <EventLogType.EventLogTypeConferenceCallStarted: 3>

Conference call (start) event.

EventLogTypeConferenceConnected = <EventLogType.EventLogTypeConferenceConnected: 21>

Conference call (connected) event.

EventLogTypeConferenceCallEnded = <EventLogType.EventLogTypeConferenceCallEnded: 4>

Conference call (end) event.

EventLogTypeConferenceChatMessage = <EventLogType.EventLogTypeConferenceChatMessage: 5>

Conference chat message event.

EventLogTypeConferenceParticipantAdded = <EventLogType.EventLogTypeConferenceParticipantAdded: 6>

Conference participant (added) event.

EventLogTypeConferenceParticipantRemoved = <EventLogType.EventLogTypeConferenceParticipantRemoved: 7>

Conference participant (removed) event.

EventLogTypeConferenceParticipantRoleUnknown = <EventLogType.EventLogTypeConferenceParticipantRoleUnknown: 25>

Conference participant (role unknown) event.

EventLogTypeConferenceParticipantRoleSpeaker = <EventLogType.EventLogTypeConferenceParticipantRoleSpeaker: 26>

Conference participant (role speaker) event.

EventLogTypeConferenceParticipantRoleListener = <EventLogType.EventLogTypeConferenceParticipantRoleListener: 27>

Conference participant (role listener) event.

EventLogTypeConferenceParticipantSetAdmin = <EventLogType.EventLogTypeConferenceParticipantSetAdmin: 8>

Conference participant (set admin) event.

EventLogTypeConferenceParticipantUnsetAdmin = <EventLogType.EventLogTypeConferenceParticipantUnsetAdmin: 9>

Conference participant (unset admin) event.

EventLogTypeConferenceParticipantDeviceAdded = <EventLogType.EventLogTypeConferenceParticipantDeviceAdded: 10>

Conference participant device (added) event.

EventLogTypeConferenceParticipantDeviceRemoved = <EventLogType.EventLogTypeConferenceParticipantDeviceRemoved: 11>

Conference participant device (removed) event.

EventLogTypeConferenceParticipantDeviceMediaCapabilityChanged = <EventLogType.EventLogTypeConferenceParticipantDeviceMediaCapabilityChanged: 17>

Conference participant device (media capability changed) event.

EventLogTypeConferenceParticipantDeviceMediaAvailabilityChanged = <EventLogType.EventLogTypeConferenceParticipantDeviceMediaAvailabilityChanged: 23>

Conference participant device (media availability changed) event.

EventLogTypeConferenceParticipantDeviceStatusChanged = <EventLogType.EventLogTypeConferenceParticipantDeviceStatusChanged: 22>

Conference participant device (left) event.

EventLogTypeConferenceSubjectChanged = <EventLogType.EventLogTypeConferenceSubjectChanged: 12>

Conference subject event.

EventLogTypeConferenceAvailableMediaChanged = <EventLogType.EventLogTypeConferenceAvailableMediaChanged: 18>

Conference available media event.

EventLogTypeConferenceSecurityEvent = <EventLogType.EventLogTypeConferenceSecurityEvent: 13>

Conference encryption security event.

EventLogTypeConferenceEphemeralMessageLifetimeChanged = <EventLogType.EventLogTypeConferenceEphemeralMessageLifetimeChanged: 14>

Conference ephemeral message (ephemeral message lifetime changed) event.

EventLogTypeConferenceEphemeralMessageEnabled = <EventLogType.EventLogTypeConferenceEphemeralMessageEnabled: 15>

Conference ephemeral message (ephemeral message enabled) event.

EventLogTypeConferenceEphemeralMessageDisabled = <EventLogType.EventLogTypeConferenceEphemeralMessageDisabled: 16>

Conference ephemeral message (ephemeral message disabled) event.

EventLogTypeConferenceEphemeralMessageManagedByAdmin = <EventLogType.EventLogTypeConferenceEphemeralMessageManagedByAdmin: 19>

Conference ephemeral message (ephemeral message settings managed by admin)event.

EventLogTypeConferenceEphemeralMessageManagedByParticipants = <EventLogType.EventLogTypeConferenceEphemeralMessageManagedByParticipants: 20>

Conference ephemeral message (ephemeral message settings managed byparticipants) event.

EventLogTypeConferenceChatMessageReaction = <EventLogType.EventLogTypeConferenceChatMessageReaction: 24>

Reaction event to a chat message.

Inherited Members
enum.Enum
name
value
class FriendCapability(enum.Enum):

Enum describing the capabilities of a Friend, populated through presence subscribe/notify process.

FriendCapabilityNone = <FriendCapability.FriendCapabilityNone: 0>

No capabilities populated.

FriendCapabilityGroupChat = <FriendCapability.FriendCapabilityGroupChat: 1>

This friend can be invited in a Flexisip backend ChatRoom.

FriendCapabilityLimeX3Dh = <FriendCapability.FriendCapabilityLimeX3Dh: 2>

This friend can be invited in a Flexisip backend end-to-end encryptedChatRoom.

FriendCapabilityEphemeralMessages = <FriendCapability.FriendCapabilityEphemeralMessages: 4>

This friend is able to delete ephemeral messages once they have expired.

Inherited Members
enum.Enum
name
value
class FriendListStatus(enum.Enum):

Enum describing the status of a LinphoneFriendList operation.

FriendListStatusOK = <FriendListStatus.FriendListStatusOK: 0>

Operation went fine.

FriendListStatusNonExistentFriend = <FriendListStatus.FriendListStatusNonExistentFriend: 1>

Friend wasn't found in the FriendList

FriendListStatusInvalidFriend = <FriendListStatus.FriendListStatusInvalidFriend: 2>

Friend is already present in a FriendList

Inherited Members
enum.Enum
name
value
class FriendListSyncStatus(enum.Enum):

Enum describing the status of a CardDAV synchronization.

FriendListSyncStatusStarted = <FriendListSyncStatus.FriendListSyncStatusStarted: 0>

Synchronization started.

FriendListSyncStatusSuccessful = <FriendListSyncStatus.FriendListSyncStatusSuccessful: 1>

Synchronization finished successfuly.

FriendListSyncStatusFailure = <FriendListSyncStatus.FriendListSyncStatusFailure: 2>

Synchronization failed.

Inherited Members
enum.Enum
name
value
class FriendListType(enum.Enum):

The types of FriendList.

Inherited Members
enum.Enum
name
value
class GlobalState(enum.Enum):

Describes the global state of the Core object. It is notified via the global_state_changed() callback in CoreListener.

GlobalStateOff = <GlobalState.GlobalStateOff: 0>

State in which we're in after Core.stop.

GlobalStateStartup = <GlobalState.GlobalStateStartup: 1>

Transient state for when we call Core.start

GlobalStateOn = <GlobalState.GlobalStateOn: 2>

Indicates Core has been started and is up and running.

GlobalStateShutdown = <GlobalState.GlobalStateShutdown: 3>

Transient state for when we call Core.stop

GlobalStateConfiguring = <GlobalState.GlobalStateConfiguring: 4>

Transient state between Startup and On if there is a remote provisionning URIconfigured.

GlobalStateReady = <GlobalState.GlobalStateReady: 5>

Core state after being created by linphone_factory_create_core, generallyfollowed by a call to Core.start

Inherited Members
enum.Enum
name
value
class IceState(enum.Enum):

Enum describing ICE states.

IceStateNotActivated = <IceState.IceStateNotActivated: 0>

ICE has not been activated for this call or stream.

IceStateFailed = <IceState.IceStateFailed: 1>

ICE processing has failed.

IceStateInProgress = <IceState.IceStateInProgress: 2>

ICE process is in progress.

IceStateHostConnection = <IceState.IceStateHostConnection: 3>

ICE has established a direct connection to the remote host.

IceStateReflexiveConnection = <IceState.IceStateReflexiveConnection: 4>

ICE has established a connection to the remote host through one or severalNATs.

IceStateRelayConnection = <IceState.IceStateRelayConnection: 5>

ICE has established a connection through a relay.

Inherited Members
enum.Enum
name
value
class LdapAuthMethod(enum.Enum):

Enum describing how the authentification will be made.

LdapAuthMethodAnonymous = <LdapAuthMethod.LdapAuthMethodAnonymous: 0>

Connection without passwords.

LdapAuthMethodSimple = <LdapAuthMethod.LdapAuthMethodSimple: 1>

Connection with username/password.

Inherited Members
enum.Enum
name
value
class LdapCertVerificationMode(enum.Enum):

Enum describing server certificates verification modes.

LdapCertVerificationModeDefault = <LdapCertVerificationMode.LdapCertVerificationModeDefault: -1>

Use default value defined on core.

LdapCertVerificationModeDisabled = <LdapCertVerificationMode.LdapCertVerificationModeDisabled: 0>

Verification is disabled.

LdapCertVerificationModeEnabled = <LdapCertVerificationMode.LdapCertVerificationModeEnabled: 1>

Verification is enabled.

Inherited Members
enum.Enum
name
value
class LdapCheck(enum.Enum):

Enum describing errors in LDAP parameters.

LdapCheckOk = <LdapCheck.LdapCheckOk: 0>

No error.

LdapCheckServerEmpty = <LdapCheck.LdapCheckServerEmpty: 1>

Server field is empty.

LdapCheckServerNotUrl = <LdapCheck.LdapCheckServerNotUrl: 2>

The server is not an url.

LdapCheckServerNoScheme = <LdapCheck.LdapCheckServerNoScheme: 4>

The server doesn't contain a scheme.

LdapCheckServerNotLdap = <LdapCheck.LdapCheckServerNotLdap: 8>

The server is not a LDAP scheme.

LdapCheckServerLdaps = <LdapCheck.LdapCheckServerLdaps: 16>

LDAP over SSL is non-standardized and deprecated: ldaps has been specified.

LdapCheckBaseObjectEmpty = <LdapCheck.LdapCheckBaseObjectEmpty: 32>

Base Object has been specified.

LdapCheckMissingFields = <LdapCheck.LdapCheckMissingFields: 64>

Some required fields are missing.

Inherited Members
enum.Enum
name
value
class LdapDebugLevel(enum.Enum):

Enum Debug verbosity for OpenLdap.

LdapDebugLevelOff = <LdapDebugLevel.LdapDebugLevelOff: 0>

Set OpenLdap verbosity to none.

LdapDebugLevelVerbose = <LdapDebugLevel.LdapDebugLevelVerbose: 1>

Set OpenLdap verbosity to debug level.

Inherited Members
enum.Enum
name
value
class LogCollectionState(enum.Enum):

Whether or not to keep a file with the logs.

Inherited Members
enum.Enum
name
value
class LogLevel(enum.Enum):

Verbosity levels of log messages.

LogLevelDebug = <LogLevel.LogLevelDebug: 1>

Level for debug messages.

LogLevelTrace = <LogLevel.LogLevelTrace: 2>

Level for traces.

LogLevelMessage = <LogLevel.LogLevelMessage: 4>

Level for information messages.

LogLevelWarning = <LogLevel.LogLevelWarning: 8>

Level for warning messages.

LogLevelError = <LogLevel.LogLevelError: 16>

Level for error messages.

LogLevelFatal = <LogLevel.LogLevelFatal: 32>

Level for fatal error messages.

Inherited Members
enum.Enum
name
value
class MagicSearchAggregation(enum.Enum):

Enum describing how to merge SearchResult from MagicSearch.

MagicSearchAggregationNone = <MagicSearchAggregation.MagicSearchAggregationNone: 0>

No aggregation is done, you can have multiple SearchResult with the sameFriend.

MagicSearchAggregationFriend = <MagicSearchAggregation.MagicSearchAggregationFriend: 1>

Aggregation is done by friend, you will have at most a SearchResult per Friend.

Inherited Members
enum.Enum
name
value
class MagicSearchSource(enum.Enum):

Enum describing the search categories for Magic Search.

MagicSearchSourceNone = <MagicSearchSource.MagicSearchSourceNone: 0>

no Source specified.

MagicSearchSourceFriends = <MagicSearchSource.MagicSearchSourceFriends: 1>

Search in friends only.

MagicSearchSourceCallLogs = <MagicSearchSource.MagicSearchSourceCallLogs: 2>

Search in Call Logs.

MagicSearchSourceLdapServers = <MagicSearchSource.MagicSearchSourceLdapServers: 4>

Search in LDAP servers.

MagicSearchSourceChatRooms = <MagicSearchSource.MagicSearchSourceChatRooms: 8>

Search in Chat rooms participants.

MagicSearchSourceRequest = <MagicSearchSource.MagicSearchSourceRequest: 16>

Search from request : it is usually an address built from the request.

MagicSearchSourceFavoriteFriends = <MagicSearchSource.MagicSearchSourceFavoriteFriends: 32>

Search in "starred" friends only.

MagicSearchSourceConferencesInfo = <MagicSearchSource.MagicSearchSourceConferencesInfo: 64>

Search in conferences info (organizer and participants)

MagicSearchSourceAll = <MagicSearchSource.MagicSearchSourceAll: -1>

Search in all sources.

Inherited Members
enum.Enum
name
value
class MediaDirection(enum.Enum):

Indicates for a given media the stream direction.

MediaDirectionInvalid = <MediaDirection.MediaDirectionInvalid: -1>

Default value, shouldn't be used.

MediaDirectionInactive = <MediaDirection.MediaDirectionInactive: 0>

No active media not supported yet.

MediaDirectionSendOnly = <MediaDirection.MediaDirectionSendOnly: 1>

Media is only being sent, it won't be received.

MediaDirectionRecvOnly = <MediaDirection.MediaDirectionRecvOnly: 2>

Media will only be received, nothing will be sent.

MediaDirectionSendRecv = <MediaDirection.MediaDirectionSendRecv: 3>

Media will be sent and received.

Inherited Members
enum.Enum
name
value
class MediaEncryption(enum.Enum):

Enum describing type of media encryption types.

MediaEncryptionNone = <MediaEncryption.MediaEncryptionNone: 0>

No media encryption is used.

MediaEncryptionSRTP = <MediaEncryption.MediaEncryptionSRTP: 1>

Use SRTP media encryption.

MediaEncryptionZRTP = <MediaEncryption.MediaEncryptionZRTP: 2>

Use ZRTP media encryption.

MediaEncryptionDTLS = <MediaEncryption.MediaEncryptionDTLS: 3>

Use DTLS media encryption.

Inherited Members
enum.Enum
name
value
class MediaResourceMode(enum.Enum):

Media resource usage.

MediaResourceModeExclusiveMediaResources = <MediaResourceMode.MediaResourceModeExclusiveMediaResources: 0>

Media resources are not shared.

MediaResourceModeSharedMediaResources = <MediaResourceMode.MediaResourceModeSharedMediaResources: 1>

Media resources are shared.

Inherited Members
enum.Enum
name
value
class MessageWaitingIndicationContextClass(enum.Enum):

Enum describing the different contexts for the MessageWaitingIndicationSummary.

Inherited Members
enum.Enum
name
value
class ParticipantDeviceDisconnectionMethod(enum.Enum):

ParticipantDeviceDisconnectionMethod is used to indicate how a participant left a conference.

an admin removes the device from a conference

ParticipantDeviceDisconnectionMethodDeparted = <ParticipantDeviceDisconnectionMethod.ParticipantDeviceDisconnectionMethodDeparted: 1>

the device disconnects from the conference

device is busy

an error occurred while the device is leaving the conference or he declined acall from the server

Inherited Members
enum.Enum
name
value
class ParticipantDeviceJoiningMethod(enum.Enum):

ParticipantDeviceJoiningMethod is used to indicate how a participant joined a conference or if it is the focus.

ParticipantDeviceJoiningMethodDialedIn = <ParticipantDeviceJoiningMethod.ParticipantDeviceJoiningMethodDialedIn: 0>

device called the conference

ParticipantDeviceJoiningMethodDialedOut = <ParticipantDeviceJoiningMethod.ParticipantDeviceJoiningMethodDialedOut: 1>

device is called the conference

ParticipantDeviceJoiningMethodFocusOwner = <ParticipantDeviceJoiningMethod.ParticipantDeviceJoiningMethodFocusOwner: 2>

device is the focus

Inherited Members
enum.Enum
name
value
class ParticipantDeviceState(enum.Enum):

ParticipantDeviceState is used to list all states a participant device can be in

ParticipantDeviceStateJoining = <ParticipantDeviceState.ParticipantDeviceStateJoining: 0>

an INVITE has been sent

ParticipantDeviceStatePresent = <ParticipantDeviceState.ParticipantDeviceStatePresent: 1>

the SIP session has been concluded, participant is part of the conference

ParticipantDeviceStateLeaving = <ParticipantDeviceState.ParticipantDeviceStateLeaving: 2>

A BYE is pending.

ParticipantDeviceStateLeft = <ParticipantDeviceState.ParticipantDeviceStateLeft: 3>

The Session is terminated.

ParticipantDeviceStateScheduledForJoining = <ParticipantDeviceState.ParticipantDeviceStateScheduledForJoining: 4>

Initial state for the server group chatroom, when the participant has not yetbeen INVITEd.

ParticipantDeviceStateScheduledForLeaving = <ParticipantDeviceState.ParticipantDeviceStateScheduledForLeaving: 5>

Transitional state for a participant that will receive a BYE shortly.

ParticipantDeviceStateOnHold = <ParticipantDeviceState.ParticipantDeviceStateOnHold: 6>

the SIP session has been concluded, participant is not media mixed

ParticipantDeviceStateAlerting = <ParticipantDeviceState.ParticipantDeviceStateAlerting: 7>

180 Ringing

ParticipantDeviceStateMutedByFocus = <ParticipantDeviceState.ParticipantDeviceStateMutedByFocus: 8>

Some medias have been muted by the focus.

Inherited Members
enum.Enum
name
value
class ParticipantRole(enum.Enum):

ParticipantRole is used to define a role of a participant within a conference

ParticipantRoleSpeaker = <ParticipantRole.ParticipantRoleSpeaker: 0>

participant is a speaker in the conference

ParticipantRoleListener = <ParticipantRole.ParticipantRoleListener: 1>

participant is a listener in the conference.

ParticipantRoleUnknown = <ParticipantRole.ParticipantRoleUnknown: 2>

participant role is unknown

Inherited Members
enum.Enum
name
value
class PlayerState(enum.Enum):

The state of a Player.

PlayerStateClosed = <PlayerState.PlayerStateClosed: 0>

No file is opened for playing.

PlayerStatePaused = <PlayerState.PlayerStatePaused: 1>

The player is paused.

PlayerStatePlaying = <PlayerState.PlayerStatePlaying: 2>

The player is playing.

Inherited Members
enum.Enum
name
value
class PresenceActivityType(enum.Enum):

Activities as defined in section 3.2 of RFC 4480.

PresenceActivityTypeAppointment = <PresenceActivityType.PresenceActivityTypeAppointment: 0>

The person has a calendar appointment, without specifying exactly of what type.

PresenceActivityTypeAway = <PresenceActivityType.PresenceActivityTypeAway: 1>

The person is physically away from all interactive communication devices.

PresenceActivityTypeBreakfast = <PresenceActivityType.PresenceActivityTypeBreakfast: 2>

The person is eating the first meal of the day, usually eaten in the morning.

PresenceActivityTypeBusy = <PresenceActivityType.PresenceActivityTypeBusy: 3>

The person is busy, without further details.

PresenceActivityTypeDinner = <PresenceActivityType.PresenceActivityTypeDinner: 4>

The person is having his or her main meal of the day, eaten in the evening orat midday.

PresenceActivityTypeHoliday = <PresenceActivityType.PresenceActivityTypeHoliday: 5>

This is a scheduled national or local holiday.

PresenceActivityTypeInTransit = <PresenceActivityType.PresenceActivityTypeInTransit: 6>

The person is riding in a vehicle, such as a car, but not steering.

PresenceActivityTypeLookingForWork = <PresenceActivityType.PresenceActivityTypeLookingForWork: 7>

The person is looking for (paid) work.

PresenceActivityTypeLunch = <PresenceActivityType.PresenceActivityTypeLunch: 8>

The person is eating his or her midday meal.

PresenceActivityTypeMeal = <PresenceActivityType.PresenceActivityTypeMeal: 9>

The person is scheduled for a meal, without specifying whether it is breakfast,lunch, or dinner, or some other meal.

PresenceActivityTypeMeeting = <PresenceActivityType.PresenceActivityTypeMeeting: 10>

The person is in an assembly or gathering of people, as for a business, social,or religious purpose.

PresenceActivityTypeOnThePhone = <PresenceActivityType.PresenceActivityTypeOnThePhone: 11>

The person is talking on the telephone.

PresenceActivityTypeOther = <PresenceActivityType.PresenceActivityTypeOther: 12>

The person is engaged in an activity with no defined representation.

PresenceActivityTypePerformance = <PresenceActivityType.PresenceActivityTypePerformance: 13>

A performance is a sub-class of an appointment and includes musical,theatrical, and cinematic performances as well as lectures.

PresenceActivityTypePermanentAbsence = <PresenceActivityType.PresenceActivityTypePermanentAbsence: 14>

The person will not return for the foreseeable future, e.g., because it is nolonger working for the company.

PresenceActivityTypePlaying = <PresenceActivityType.PresenceActivityTypePlaying: 15>

The person is occupying himself or herself in amusement, sport, or otherrecreation.

PresenceActivityTypePresentation = <PresenceActivityType.PresenceActivityTypePresentation: 16>

The person is giving a presentation, lecture, or participating in a formalround-table discussion.

PresenceActivityTypeShopping = <PresenceActivityType.PresenceActivityTypeShopping: 17>

The person is visiting stores in search of goods or services.

PresenceActivityTypeSleeping = <PresenceActivityType.PresenceActivityTypeSleeping: 18>

The person is sleeping.

PresenceActivityTypeSpectator = <PresenceActivityType.PresenceActivityTypeSpectator: 19>

The person is observing an event, such as a sports event.

PresenceActivityTypeSteering = <PresenceActivityType.PresenceActivityTypeSteering: 20>

The person is controlling a vehicle, watercraft, or plane.

PresenceActivityTypeTravel = <PresenceActivityType.PresenceActivityTypeTravel: 21>

The person is on a business or personal trip, but not necessarily in-transit.

PresenceActivityTypeTV = <PresenceActivityType.PresenceActivityTypeTV: 22>

The person is watching television.

PresenceActivityTypeUnknown = <PresenceActivityType.PresenceActivityTypeUnknown: 23>

The activity of the person is unknown.

PresenceActivityTypeVacation = <PresenceActivityType.PresenceActivityTypeVacation: 24>

A period of time devoted to pleasure, rest, or relaxation.

PresenceActivityTypeWorking = <PresenceActivityType.PresenceActivityTypeWorking: 25>

The person is engaged in, typically paid, labor, as part of a profession orjob.

PresenceActivityTypeWorship = <PresenceActivityType.PresenceActivityTypeWorship: 26>

The person is participating in religious rites.

Inherited Members
enum.Enum
name
value
class PresenceBasicStatus(enum.Enum):

Basic status as defined in section 4.1.4 of RFC 3863.

PresenceBasicStatusOpen = <PresenceBasicStatus.PresenceBasicStatusOpen: 0>

This value means that the associated contact element, if any, is ready toaccept communication.

PresenceBasicStatusClosed = <PresenceBasicStatus.PresenceBasicStatusClosed: 1>

This value means that the associated contact element, if any, is unable toaccept communication.

Inherited Members
enum.Enum
name
value
class Privacy(enum.Enum):

Defines privacy policy to apply as described by rfc3323.

PrivacyNone = <Privacy.PrivacyNone: 0>

Privacy services must not perform any privacy function.

PrivacyUser = <Privacy.PrivacyUser: 1>

Request that privacy services provide a user-level privacy function.

PrivacyHeader = <Privacy.PrivacyHeader: 2>

Request that privacy services modify headers that cannot be set arbitrarily bythe user (Contact/Via).

PrivacySession = <Privacy.PrivacySession: 4>

Request that privacy services provide privacy for session media.

PrivacyId = <Privacy.PrivacyId: 8>

rfc3325 The presence of this privacy type in a Privacy header field indicatesthat the user would like the Network Asserted Identity to be kept private withrespect to SIP entities outside the Trust Domain with which the userauthenticated.

PrivacyCritical = <Privacy.PrivacyCritical: 16>

Privacy service must perform the specified services or fail the request.

PrivacyDefault = <Privacy.PrivacyDefault: 32768>

Special keyword to use privacy as defined either globally or by proxy usingProxyConfig.privacy

Inherited Members
enum.Enum
name
value
class PublishState(enum.Enum):

Enum for publish states.

PublishStateNone = <PublishState.PublishStateNone: 0>

Initial state, do not use.

PublishStateIncomingReceived = <PublishState.PublishStateIncomingReceived: 1>

An incoming publish is received.

PublishStateOk = <PublishState.PublishStateOk: 2>

Publish is accepted.

PublishStateError = <PublishState.PublishStateError: 3>

Publish encoutered an error, Event.reason gives reason code.

PublishStateExpiring = <PublishState.PublishStateExpiring: 4>

Publish is about to expire, only sent if [sip]->refresh_generic_publishproperty is set to 0.

PublishStateCleared = <PublishState.PublishStateCleared: 5>

Event has been un published.

PublishStateTerminating = <PublishState.PublishStateTerminating: 6>

Publish is about to terminate.

PublishStateOutgoingProgress = <PublishState.PublishStateOutgoingProgress: 7>

An outgoing publish was created and submitted.

PublishStateRefreshing = <PublishState.PublishStateRefreshing: 8>

Publish is about to refresh.

Inherited Members
enum.Enum
name
value
class Reason(enum.Enum):

Enum describing various failure reasons or contextual information for some events. seealso Call.reason.

seealso ProxyConfig.error.

seealso ErrorInfo.reason.

ReasonNone = <Reason.ReasonNone: 0>

No reason has been set by the core.

ReasonNoResponse = <Reason.ReasonNoResponse: 1>

No response received from remote.

ReasonForbidden = <Reason.ReasonForbidden: 2>

Authentication failed due to bad credentials or resource forbidden.

ReasonDeclined = <Reason.ReasonDeclined: 3>

The call has been declined.

ReasonNotFound = <Reason.ReasonNotFound: 4>

Destination of the call was not found.

ReasonNotAnswered = <Reason.ReasonNotAnswered: 5>

The call was not answered in time (request timeout)

ReasonBusy = <Reason.ReasonBusy: 6>

Phone line was busy.

ReasonUnsupportedContent = <Reason.ReasonUnsupportedContent: 7>

Unsupported content.

ReasonBadEvent = <Reason.ReasonBadEvent: 8>

Bad event.

ReasonIOError = <Reason.ReasonIOError: 9>

Transport error: connection failures, disconnections etc...

ReasonDoNotDisturb = <Reason.ReasonDoNotDisturb: 10>

Do not disturb reason.

ReasonUnauthorized = <Reason.ReasonUnauthorized: 11>

Operation is unauthorized because missing credential.

ReasonNotAcceptable = <Reason.ReasonNotAcceptable: 12>

Operation is rejected due to incompatible or unsupported media parameters.

ReasonNoMatch = <Reason.ReasonNoMatch: 13>

Operation could not be executed by server or remote client because it didn'thave any context for it.

ReasonMovedPermanently = <Reason.ReasonMovedPermanently: 14>

Resource moved permanently.

ReasonGone = <Reason.ReasonGone: 15>

Resource no longer exists.

ReasonTemporarilyUnavailable = <Reason.ReasonTemporarilyUnavailable: 16>

Temporarily unavailable.

ReasonAddressIncomplete = <Reason.ReasonAddressIncomplete: 17>

Address incomplete.

ReasonNotImplemented = <Reason.ReasonNotImplemented: 18>

Not implemented.

ReasonBadGateway = <Reason.ReasonBadGateway: 19>

Bad gateway.

ReasonSessionIntervalTooSmall = <Reason.ReasonSessionIntervalTooSmall: 20>

The received request contains a Session-Expires header field with a durationbelow the minimum timer.

ReasonServerTimeout = <Reason.ReasonServerTimeout: 21>

Server timeout.

ReasonUnknown = <Reason.ReasonUnknown: 22>

Unknown reason.

ReasonTransferred = <Reason.ReasonTransferred: 23>

The call has been transferred.

ReasonConditionalRequestFailed = <Reason.ReasonConditionalRequestFailed: 24>

Conditional Request Failed.

Inherited Members
enum.Enum
name
value
class RecorderFileFormat(enum.Enum):

Enum representing the file format of a recording.

Inherited Members
enum.Enum
name
value
class RecorderState(enum.Enum):

Enum representing the state of a recording.

RecorderStateClosed = <RecorderState.RecorderStateClosed: 0>

No file is opened for recording.

RecorderStatePaused = <RecorderState.RecorderStatePaused: 1>

The recorder is paused.

RecorderStateRunning = <RecorderState.RecorderStateRunning: 2>

The recorder is running.

Inherited Members
enum.Enum
name
value
class RegistrationState(enum.Enum):

Describes proxy registration states. It is notified via the registration_state_changed() callback in CoreListener.

RegistrationStateNone = <RegistrationState.RegistrationStateNone: 0>

Initial state for registrations.

RegistrationStateProgress = <RegistrationState.RegistrationStateProgress: 1>

Registration is in progress.

RegistrationStateOk = <RegistrationState.RegistrationStateOk: 2>

Registration is successful.

RegistrationStateCleared = <RegistrationState.RegistrationStateCleared: 3>

Unregistration succeeded.

RegistrationStateFailed = <RegistrationState.RegistrationStateFailed: 4>

Registration failed.

RegistrationStateRefreshing = <RegistrationState.RegistrationStateRefreshing: 5>

Registration refreshing.

Inherited Members
enum.Enum
name
value
class SecurityEventType(enum.Enum):

SecurityEventType is used to indicate the type of security event.

SecurityEventTypeNone = <SecurityEventType.SecurityEventTypeNone: 0>

Event is not a security event.

SecurityEventTypeSecurityLevelDowngraded = <SecurityEventType.SecurityEventTypeSecurityLevelDowngraded: 1>

Chatroom security level downgraded event.

SecurityEventTypeParticipantMaxDeviceCountExceeded = <SecurityEventType.SecurityEventTypeParticipantMaxDeviceCountExceeded: 2>

Participant has exceeded the maximum number of device event.

SecurityEventTypeEncryptionIdentityKeyChanged = <SecurityEventType.SecurityEventTypeEncryptionIdentityKeyChanged: 3>

Peer device instant messaging encryption identity key has changed event.

SecurityEventTypeManInTheMiddleDetected = <SecurityEventType.SecurityEventTypeManInTheMiddleDetected: 4>

Man in the middle detected event.

Inherited Members
enum.Enum
name
value
class SecurityLevel(enum.Enum):

Security level determined by type of encryption (point-to-point, end-to-end, etc...) and whether or not a SAS validation was made with the remote(s) end(s). A SecurityLevel.EndToEndEncryptedAndVerified level means it's end-to-end encrypted and SAS validation was made. An SecurityLevel.Unsafe level means end-to-end-encrypted but it's likely a man-in-the-middle exists between you and one device.

SecurityLevelUnsafe = <SecurityLevel.SecurityLevelUnsafe: 0>

Security failure.

SecurityLevelNone = <SecurityLevel.SecurityLevelNone: 1>

No encryption.

SecurityLevelEndToEndEncrypted = <SecurityLevel.SecurityLevelEndToEndEncrypted: 2>

End-to-end encrypted.

SecurityLevelEndToEndEncryptedAndVerified = <SecurityLevel.SecurityLevelEndToEndEncryptedAndVerified: 3>

End-to-end encrypted and verified.

SecurityLevelPointToPointEncrypted = <SecurityLevel.SecurityLevelPointToPointEncrypted: 4>

Point-to-point encrypted.

Inherited Members
enum.Enum
name
value
class SessionExpiresRefresher(enum.Enum):

Session Timers refresher.

Inherited Members
enum.Enum
name
value
class SignalStrengthUnit(enum.Enum):

All signal units that a device can use.

Inherited Members
enum.Enum
name
value
class SignalType(enum.Enum):

All signal types that a device can use.

Inherited Members
enum.Enum
name
value
class SrtpSuite(enum.Enum):

Enum describing type of SRTP encryption suite.

Inherited Members
enum.Enum
name
value
class StreamType(enum.Enum):

Enum describing the stream types.

Inherited Members
enum.Enum
name
value
class SubscribePolicy(enum.Enum):

Enum controlling behavior for incoming subscription request. Use by Friend.inc_subscribe_policy

SubscribePolicySPWait = <SubscribePolicy.SubscribePolicySPWait: 0>

Does not automatically accept an incoming subscription request.

SubscribePolicySPDeny = <SubscribePolicy.SubscribePolicySPDeny: 1>

Rejects incoming subscription request.

SubscribePolicySPAccept = <SubscribePolicy.SubscribePolicySPAccept: 2>

Automatically accepts a subscription request.

Inherited Members
enum.Enum
name
value
class SubscriptionDir(enum.Enum):

Enum for subscription direction (incoming or outgoing).

SubscriptionDirIncoming = <SubscriptionDir.SubscriptionDirIncoming: 0>

Incoming subscription.

SubscriptionDirOutgoing = <SubscriptionDir.SubscriptionDirOutgoing: 1>

Outgoing subscription.

SubscriptionDirInvalidDir = <SubscriptionDir.SubscriptionDirInvalidDir: 2>

Invalid subscription direction.

Inherited Members
enum.Enum
name
value
class SubscriptionState(enum.Enum):

Enum for subscription states. SubscriptionState.Terminated and SubscriptionState.Error are final states.

SubscriptionStateNone = <SubscriptionState.SubscriptionStateNone: 0>

Initial state, should not be used.

SubscriptionStateOutgoingProgress = <SubscriptionState.SubscriptionStateOutgoingProgress: 1>

An outgoing subcription was sent.

SubscriptionStateIncomingReceived = <SubscriptionState.SubscriptionStateIncomingReceived: 2>

An incoming subcription is received.

SubscriptionStatePending = <SubscriptionState.SubscriptionStatePending: 3>

Subscription is pending, waiting for user approval.

SubscriptionStateActive = <SubscriptionState.SubscriptionStateActive: 4>

Subscription is accepted.

SubscriptionStateTerminated = <SubscriptionState.SubscriptionStateTerminated: 5>

Subscription is terminated normally.

SubscriptionStateError = <SubscriptionState.SubscriptionStateError: 6>

Subscription was terminated by an error, indicated by Event.reason

SubscriptionStateExpiring = <SubscriptionState.SubscriptionStateExpiring: 7>

Subscription is about to expire, only sent if [sip]->refresh_generic_subscribeproperty is set to 0.

Inherited Members
enum.Enum
name
value
class ToneID(enum.Enum):

Enum listing frequent telephony tones.

ToneIDUndefined = <ToneID.ToneIDUndefined: 0>

Not a tone.

ToneIDBusy = <ToneID.ToneIDBusy: 1>

Busy tone.

ToneIDCallWaiting = <ToneID.ToneIDCallWaiting: 2>

Call waiting tone.

ToneIDCallOnHold = <ToneID.ToneIDCallOnHold: 3>

Call on hold tone.

ToneIDCallLost = <ToneID.ToneIDCallLost: 4>

Tone played when call is abruptly disconnected (media lost)

ToneIDCallEnd = <ToneID.ToneIDCallEnd: 5>

When the call end for any reason but lost.

ToneIDCallNotAnswered = <ToneID.ToneIDCallNotAnswered: 6>

When the call is not answered.

Inherited Members
enum.Enum
name
value
class TransportType(enum.Enum):

Enum describing transport type for LinphoneAddress.

Inherited Members
enum.Enum
name
value
class TunnelMode(enum.Enum):

Enum describing the tunnel modes.

TunnelModeDisable = <TunnelMode.TunnelModeDisable: 0>

The tunnel is disabled.

TunnelModeEnable = <TunnelMode.TunnelModeEnable: 1>

The tunnel is enabled.

TunnelModeAuto = <TunnelMode.TunnelModeAuto: 2>

The tunnel is enabled automatically if it is required.

Inherited Members
enum.Enum
name
value
class UpnpState(enum.Enum):

Enum describing uPnP states.

UpnpStateIdle = <UpnpState.UpnpStateIdle: 0>

uPnP is not activate

UpnpStatePending = <UpnpState.UpnpStatePending: 1>

uPnP process is in progress

UpnpStateAdding = <UpnpState.UpnpStateAdding: 2>

Internal use: Only used by port binding.

UpnpStateRemoving = <UpnpState.UpnpStateRemoving: 3>

Internal use: Only used by port binding.

UpnpStateNotAvailable = <UpnpState.UpnpStateNotAvailable: 4>

uPnP is not available

UpnpStateOk = <UpnpState.UpnpStateOk: 5>

uPnP is enabled

UpnpStateKo = <UpnpState.UpnpStateKo: 6>

uPnP processing has failed

UpnpStateBlacklisted = <UpnpState.UpnpStateBlacklisted: 7>

IGD router is blacklisted.

Inherited Members
enum.Enum
name
value
class VersionUpdateCheckResult(enum.Enum):

Enum describing the result of a version update check.

Inherited Members
enum.Enum
name
value
class VideoSourceScreenSharingType(enum.Enum):

Enum representing the sub type of the screen sharing.

VideoSourceScreenSharingTypeDisplay = <VideoSourceScreenSharingType.VideoSourceScreenSharingTypeDisplay: 0>

The screen sharing is done from a display.

VideoSourceScreenSharingTypeWindow = <VideoSourceScreenSharingType.VideoSourceScreenSharingTypeWindow: 1>

The screen sharing is done from a window.

VideoSourceScreenSharingTypeArea = <VideoSourceScreenSharingType.VideoSourceScreenSharingTypeArea: 2>

The screen sharing is done from an area.

Inherited Members
enum.Enum
name
value
class VideoSourceType(enum.Enum):

Enum representing the type of a video source.

VideoSourceTypeCall = <VideoSourceType.VideoSourceTypeCall: 1>

The video source is another call.

VideoSourceTypeCamera = <VideoSourceType.VideoSourceTypeCamera: 2>

The video source is a camera.

VideoSourceTypeImage = <VideoSourceType.VideoSourceTypeImage: 3>

The video source is an image.

VideoSourceTypeScreenSharing = <VideoSourceType.VideoSourceTypeScreenSharing: 4>

The video source is a screen sharing.

Inherited Members
enum.Enum
name
value
class XmlRpcArgType(enum.Enum):

Enum describing the types of argument for LinphoneXmlRpcRequest.

Inherited Members
enum.Enum
name
value
class XmlRpcStatus(enum.Enum):

Enum describing the status of a LinphoneXmlRpcRequest.

Inherited Members
enum.Enum
name
value
class ZrtpKeyAgreement(enum.Enum):

Enum describing the ZRTP key exchange algorithns.

Inherited Members
enum.Enum
name
value
class ZrtpPeerStatus(enum.Enum):

Enum describing the ZRTP SAS validation status of a peer URI.

ZrtpPeerStatusUnknown = <ZrtpPeerStatus.ZrtpPeerStatusUnknown: 0>

Peer URI unkown or never validated/invalidated the SAS.

ZrtpPeerStatusInvalid = <ZrtpPeerStatus.ZrtpPeerStatusInvalid: 1>

Peer URI SAS rejected in database.

ZrtpPeerStatusValid = <ZrtpPeerStatus.ZrtpPeerStatusValid: 2>

Peer URI SAS validated in database.

Inherited Members
enum.Enum
name
value
class AccountListener:

An object to handle the callbacks for the handling of Account objects.

on_registration_state_changed: Callable[[Account, RegistrationState, str], NoneType]

Callback for notifying when a registration state has changed for the account.

Parameters
  • account: LinphoneAccount object whose registration state changed.
  • state: The current LinphoneRegistrationState.
  • message: A non None informational message about the state.
on_message_waiting_indication_changed: Callable[[Account, MessageWaitingIndication], NoneType]

Callback for notifying a message waiting indication change for the account.

Parameters
class AccountCreatorListener:

An object to handle the responses callbacks for handling the AccountCreator operations.

on_create_account: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_is_account_exist: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_activate_account: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_send_token: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_account_creation_request_token: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_account_creation_token_using_request_token: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_is_account_activated: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_activate_alias: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_is_alias_used: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_is_account_linked: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_recover_account: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_update_account: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
on_login_linphone_account: Callable[[AccountCreator, AccountCreatorStatus, str | None], NoneType]

Callback to notify a response of server.

Parameters
  • creator: AccountCreator object
  • status: The status of the AccountCreator test existence operation that has just finished
  • response: The response has a string
class AlertListener:

Object that represents a callback attached to an alert.

on_terminated: Callable[[Alert], NoneType]

Callback to know if an alert stops.

Parameters
  • alert: the alert that stops
class CallListener:

That class holds all the callbacks which are called by Call objects. Use Factory.create_call_cbs to create an instance. Then, call the callback setters on the events you need to monitor and pass the object to a Call instance through Call.add_callbacks.

on_dtmf_received: Callable[[Call, int], NoneType]

Callback for being notified of received DTMFs.

Parameters
  • call: Call object that received the dtmf
  • dtmf: The ascii code of the dtmf
on_goclear_ack_sent: Callable[[Call], NoneType]

GoClear ACK sent callback.

Parameters
  • call: the Call on which the GoClear ACK was sent.
on_encryption_changed: Callable[[Call, bool, str | None], NoneType]

Call encryption changed callback.

Parameters
  • call: Call object whose encryption is changed.
  • on: Whether encryption is activated.
  • authentication_token: An authentication_token, currently set for ZRTP kind of encryption only.
on_send_master_key_changed: Callable[[Call, str], NoneType]

Call send master key changed callback.

Parameters
  • call: Call object whose encryption is changed.
on_receive_master_key_changed: Callable[[Call, str], NoneType]

Call receive master key changed callback.

Parameters
  • call: Call object whose encryption is changed.
on_info_message_received: Callable[[Call, InfoMessage], NoneType]

Callback for receiving info messages.

Parameters
on_state_changed: Callable[[Call, CallState, str], NoneType]

Call state notification callback.

Parameters
  • call: Call whose state is changed.
  • state: The new CallState of the call
  • message: An informational message about the state.
on_stats_updated: Callable[[Call, CallStats], NoneType]

Callback for receiving quality statistics for calls.

Parameters
  • call: Call object whose statistics are notified
  • stats: CallStats object
on_transfer_state_changed: Callable[[Call, CallState], NoneType]

Callback for notifying progresses of transfers.

Parameters
  • call: Call that was transfered
  • state: The CallState of the call to transfer target at the far end.
on_ack_processing: Callable[[Call, Headers, bool], NoneType]

Callback for notifying the processing SIP ACK messages.

Parameters
  • call: Call for which an ACK is being received or sent
  • ack: the ACK Headers
  • is_received: if True this ACK is an incoming one, otherwise it is an ACK about to be sent.
on_tmmbr_received: Callable[[Call, int, int], NoneType]

Callback for notifying a received TMMBR.

Parameters
  • call: LinphoneCall for which the TMMBR has changed
  • stream_index: the index of the current stream
  • tmmbr: the value of the received TMMBR
on_snapshot_taken: Callable[[Call, str], NoneType]

Callback for notifying a snapshot taken.

Parameters
  • call: LinphoneCall for which the snapshot was taken
  • file_path: the name of the saved file
on_next_video_frame_decoded: Callable[[Call], NoneType]

Callback to notify a next video frame has been decoded.

Parameters
  • call: LinphoneCall for which the next video frame has been decoded
on_camera_not_working: Callable[[Call, str], NoneType]

Callback to notify that the camera is not working and has been changed to "No Webcam". A camera is detected as mis-functionning as soon as it outputs no frames at all during a period of 5 seconds. This check is only performed on desktop platforms, in the purpose of notifying camera failures, for example if when a usb cable gets disconnected.

Parameters
  • call: LinphoneCall for which the next video frame has been decoded
  • camera_name: the name of the non-working camera
on_video_display_error_occurred: Callable[[Call, int], NoneType]

Callback to notify that there are errors from the video rendering. The error code depends of the implementation.

Parameters
  • call: LinphoneCall
  • error_code: error code from render. It depends of the renderer.
on_audio_device_changed: Callable[[Call, AudioDevice], NoneType]

Callback to notify that the audio device has been changed.

Parameters
  • call: LinphoneCall for which the audio device has changed
  • audio_device: the new audio device used for this call
on_remote_recording: Callable[[Call, bool], NoneType]

Callback to notify that the call is being recorded by the remote.

Parameters
  • call: LinphoneCall for which the audio is recorded
  • recording: True if the call is being recorded by the remote, False otherwise
class ChatMessageListener:

An object to handle the callbacks for the handling a ChatMessage objects.

on_msg_state_changed: Callable[[ChatMessage, ChatMessageState], NoneType]

Call back used to notify message delivery status.

Parameters
on_new_message_reaction: Callable[[ChatMessage, ChatMessageReaction], NoneType]

Callback used to notify a reaction has been received or sent for a given message.

Parameters
  • message: LinphoneChatMessage object
  • reaction: the LinphoneChatMessageReaction reaction that was sent or received
on_reaction_removed: Callable[[ChatMessage, Address], NoneType]

Callback used to notify a reaction has been removed from a given message.

Parameters
  • message: LinphoneChatMessage object
  • address: the LinphoneAddress of the person that removed it's reaction
on_file_transfer_recv: Callable[[ChatMessage, Content, Buffer], NoneType]

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
  • message: ChatMessage message from which the body is received.
  • content: Content incoming content information
  • buffer: Buffer holding the received data. Empty buffer means end of file.
on_file_transfer_send: Callable[[ChatMessage, Content, int, int], NoneType]

File transfer send callback prototype. This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0.

Parameters
  • message: ChatMessage message from which the body is received.
  • content: Content outgoing content
  • offset: the offset in the file from where to get the data to be sent
  • size: the number of bytes expected by the framework
Returns

A Buffer object holding the data written by the application. An empty buffer means end of file.

The returned value isn't used, hence the deprecation!

Deprecated since version 17/08/2020 Use LinphoneChatMessageCbsFileTransferSendChunkCb.

instead.

on_file_transfer_send_chunk: Callable[[ChatMessage, Content, int, int, Buffer], NoneType]

File transfer send callback prototype. This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0.

Parameters
  • message: ChatMessage message from which the body is received.
  • content: Content outgoing content
  • offset: the offset in the file from where to get the data to be sent
  • size: the number of bytes expected by the framework
  • buffer: A Buffer to be filled. Leave it empty when end of file has been reached.
on_file_transfer_progress_indication: Callable[[ChatMessage, Content, int, int], NoneType]

File transfer progress indication callback prototype.

Parameters
  • message: ChatMessage message from which the body is received.
  • content: Content incoming content information
  • offset: The number of bytes sent/received since the beginning of the transfer.
  • total: The total number of bytes to be sent/received.
on_participant_imdn_state_changed: Callable[[ChatMessage, ParticipantImdnState], NoneType]

Call back used to notify participant IMDN state.

Parameters
on_ephemeral_message_timer_started: Callable[[ChatMessage], NoneType]

Callback used to notify an ephemeral message that its lifespan before disappearing has started to decrease. This callback is called when the ephemeral message is read by the receiver.

Parameters
  • message: LinphoneChatMessage object
on_ephemeral_message_deleted: Callable[[ChatMessage], NoneType]

Call back used to notify ephemeral message is deleted.

Parameters
  • message: LinphoneChatMessage object
class ChatRoomListener:

An object to handle the callbacks for the handling a ChatRoom objects.

on_is_composing_received: Callable[[ChatRoom, Address, bool], NoneType]

Is composing notification callback prototype.

Parameters
  • chat_room: LinphoneChatRoom involved in the conversation
  • remote_address: The LinphoneAddress that has sent the is-composing notification
  • is_composing: A boolean value telling whether the remote is composing or not
on_message_received: Callable[[ChatRoom, ChatMessage], NoneType]

Callback used to notify a chat room that a message has been received.

Parameters
  • chat_room: LinphoneChatRoom object
  • message: The LinphoneChatMessage that has been received
on_messages_received: Callable[[ChatRoom, list[ChatMessage]], NoneType]

Callback used to notify a chat room that many chat messages have been received. Only called when aggregation is enabled (aka [sip] chat_messages_aggregation == 1 or using linphone_core_set_chat_messages_aggregation_enabled), it replaces the single message received callback.

Parameters
  • chat_room: LinphoneChatRoom object
  • chat_messages: The list of events to be notified
on_new_event: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that an event log has been created.

Parameters
on_new_events: Callable[[ChatRoom, list[EventLog]], NoneType]

Callback used to notify a chat room that many event logs have been created.

Parameters
  • chat_room: ChatRoom object
  • event_logs: The list of events to be notified
on_chat_message_received: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a chat message has been received.

Parameters
on_chat_messages_received: Callable[[ChatRoom, list[EventLog]], NoneType]

Callback used to notify a chat room that one or many chat messages have been received. Only called when aggregation is enabled (aka [sip] chat_messages_aggregation == 1 or using Core.chat_messages_aggregation_enabled), it replaces the single chat message received callback.

Parameters
  • chat_room: ChatRoom object
  • event_logs: The list of events to be notified
on_chat_message_sending: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a chat message is being sent.

Parameters
on_chat_message_sent: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a chat message has been sent.

Parameters
on_participant_added: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a participant has been added.

Parameters
on_participant_removed: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a participant has been removed.

Parameters
on_participant_admin_status_changed: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that the admin status of a participant has been changed.

Parameters
on_state_changed: Callable[[ChatRoom, ChatRoomState], NoneType]

Callback used to notify a chat room state has changed.

Parameters
  • chat_room: LinphoneChatRoom object
  • newState: The new LinphoneChatRoomState of the chat room
on_security_event: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a security event in the chat room.

Parameters
on_subject_changed: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify that the subject of a chat room has changed.

Parameters
on_undecryptable_message_received: Callable[[ChatRoom, ChatMessage], NoneType]

Callback used to notify a chat room that a message has been received but we were unable to decrypt it.

Parameters
  • chat_room: ChatRoom involved in this conversation
  • message: The ChatMessage that has been received
on_participant_device_added: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a participant has been added.

Parameters
on_participant_device_removed: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that a participant has been removed.

Parameters
on_participant_device_state_changed: Callable[[ChatRoom, EventLog, ParticipantDeviceState], NoneType]

Callback used to notify a conference that a participant device has changed state.

Parameters
  • chat_room: ChatRoom object
  • event_log: EventLog The event to be notified
  • state: new participant device state
on_participant_device_media_availability_changed: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a conference that the media availability of a participant device has been changed.

Parameters
on_conference_joined: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room has been joined.

Parameters
on_conference_left: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room has been left.

Parameters
on_ephemeral_event: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that an ephemeral related event has been generated.

Parameters
on_ephemeral_message_timer_started: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that the lifespan of an ephemeral message before disappearing has started to decrease. This callback is called when the ephemeral message is read by the receiver.

Parameters
on_ephemeral_message_deleted: Callable[[ChatRoom, EventLog], NoneType]

Callback used to notify a chat room that an ephemeral message has been deleted.

Parameters
on_conference_address_generation: Callable[[ChatRoom], NoneType]

Callback used when a group chat room is created server-side to generate the address of the chat room. The function ChatRoom.conference_address needs to be called by this callback.

Parameters
on_participant_registration_subscription_requested: Callable[[ChatRoom, Address], NoneType]

Callback used when a group chat room server is subscribing to registration state of a participant.

Parameters
on_participant_registration_unsubscription_requested: Callable[[ChatRoom, Address], NoneType]

Callback used when a group chat room server is unsubscribing to registration state of a participant.

Parameters
on_chat_message_should_be_stored: Callable[[ChatRoom, ChatMessage], NoneType]

Callback used to tell the core whether or not to store the incoming message in db or not using ChatMessage.to_be_stored.

Parameters
on_chat_message_participant_imdn_state_changed: Callable[[ChatRoom, ChatMessage, ParticipantImdnState], NoneType]

Callback used to notify a participant state has changed in a message of this chat room.

Parameters
on_chat_room_read: Callable[[ChatRoom], NoneType]

Callback used to notify a chat room was "marked as read".

Parameters
  • chat_room: The LinphoneChatRoom object that was marked as read
on_new_message_reaction: Callable[[ChatRoom, ChatMessage, ChatMessageReaction], NoneType]

Callback used to notify a reaction has been received or sent for a given message.

Parameters
  • chat_room: LinphoneChatRoom object
  • message: LinphoneChatMessage object for which we received a reaction
  • reaction: the LinphoneChatMessageReaction reaction that was sent or received
class ConferenceListener:

An object to handle the callbacks for the handling a Conference objects. Use Factory.create_conference_cbs to create an instance. Then pass the object to a Conference instance through Conference.add_callbacks.

on_participant_added: Callable[[Conference, Participant], NoneType]

Callback used to notify a conference that a participant has been added.

Parameters
  • conference: LinphoneConference object
  • participant: LinphoneParticipant that has been added to the conference
on_participant_removed: Callable[[Conference, Participant], NoneType]

Callback used to notify a conference that a participant has been removed.

Parameters
  • conference: LinphoneConference object
  • participant: LinphoneParticipant that has been removed to the conference
on_participant_device_added: Callable[[Conference, ParticipantDevice], NoneType]

Callback used to notify a conference that a participant has been added.

Parameters
  • conference: LinphoneConference object
  • participant_device: LinphoneParticipantDevice that has been added to the conference
on_participant_device_removed: Callable[[Conference, ParticipantDevice], NoneType]

Callback used to notify a conference that a participant has been removed.

Parameters
  • conference: LinphoneConference object
  • participant_device: LinphoneParticipantDevice that has been removed to the conference
on_participant_role_changed: Callable[[Conference, Participant], NoneType]

Callback used to notify a conference that the role of a participant has been changed.

Parameters
on_participant_admin_status_changed: Callable[[Conference, Participant], NoneType]

Callback used to notify a conference that the admin status of a participant has been changed.

Parameters
  • conference: LinphoneConference object
  • participant: LinphoneParticipant whose admin status has changed
on_participant_device_state_changed: Callable[[Conference, ParticipantDevice, ParticipantDeviceState], NoneType]

Callback used to notify a conference that a participant device has changed state.

Parameters
  • conference: LinphoneConference object
  • device: LinphoneParticipantDevice who change state
  • state: new participant device state
on_participant_device_screen_sharing_changed: Callable[[Conference, ParticipantDevice, bool], NoneType]

Callback used to notify a conference that a participant device starts or stops screen sharing.

Parameters
  • conference: Conference object
  • device: ParticipantDevice who starts or stops screen sharing
  • enabled: whether the screen sharing is enabled or disabled
on_participant_device_media_availability_changed: Callable[[Conference, ParticipantDevice], NoneType]

Callback used to notify a conference that the media availability of a participant device has been changed.

Parameters
  • conference: LinphoneConference object
  • device: LinphoneParticipantDevice whose media availability changed has changed
on_participant_device_media_capability_changed: Callable[[Conference, ParticipantDevice], NoneType]

Callback used to notify a conference that the media capability of a participant device has been changed.

Parameters
on_state_changed: Callable[[Conference, ConferenceState], NoneType]

Callback used to notify a conference state has changed.

Parameters
  • conference: LinphoneConference object
  • newState: The new state of the conference
on_available_media_changed: Callable[[Conference], NoneType]

Callback used to notify that the available media of a conference has changed.

Parameters
on_subject_changed: Callable[[Conference, str], NoneType]

Callback used to notify that the subject of a conference has changed.

Parameters
  • conference: LinphoneConference object
  • subject: subject of the conference
on_participant_device_is_speaking_changed: Callable[[Conference, ParticipantDevice, bool], NoneType]

Callback used to notify that a participant device is speaking or isn't speaking anymore.

Parameters
  • conference: Conference object
  • participant_device: the participant device
  • is_speaking: True if is speaking, False otherwise
on_participant_device_is_muted: Callable[[Conference, ParticipantDevice, bool], NoneType]

Callback used to notify that a participant device is muted or is no longer muted.

Parameters
  • conference: Conference object
  • participant_device: the participant device
  • is_muted: True if is muted, False otherwise
on_audio_device_changed: Callable[[Conference, AudioDevice], NoneType]

Callback used to notify that the audio device of a conference has changed.

Parameters
  • conference: LinphoneConference object
  • audio_device: audio device of the conference
on_active_speaker_participant_device: Callable[[Conference, ParticipantDevice], NoneType]

Callback used to notify which participant device video is being displayed as "actively speaking".

Parameters
  • conference: Conference object
  • participant_device: the participant device currently displayed as active speaker
class ConferenceSchedulerListener:

An object to handle the callbacks of ConferenceScheduler object.

on_state_changed: Callable[[ConferenceScheduler, ConferenceSchedulerState], NoneType]

Callback for notifying when a registration state has changed for the conference scheduler.

Parameters
  • conference_scheduler: LinphoneConferenceScheduler object whose state has changed.
  • state: The current LinphoneConferenceSchedulerState.
on_invitations_sent: Callable[[ConferenceScheduler, list[Address] | None], NoneType]

Callback for notifying when conference invitations have been sent. In case of error for some participants, their addresses will be given as parameter.

Parameters
  • conference_scheduler: ConferenceScheduler object whose state has changed.
  • failed_invitations: a list of addresses for which invitation couldn't be sent.
class CoreListener:

That class holds all the callbacks which are called by Core. Once created, add your CoreListener using Core.add_callbacks. Keep a reference on it as long as you need it. You can use Core.remove_callbacks to remove it but that isn't mandatory. The same applies to all listeners in our API.

on_global_state_changed: Callable[[Core, GlobalState, str], NoneType]

Global state notification callback.

Parameters
on_registration_state_changed: Callable[[Core, ProxyConfig, RegistrationState, str], NoneType]

Registration state notification callback prototype.

Parameters
  • core: the Core
  • proxy_config: the ProxyConfig which state has changed
  • state: the current RegistrationState
  • message: a non None informational message about the state
    Deprecated since version 06/04/2020 Use LinphoneCoreCbsAccountRegistrationStateChangedCb.

instead

on_conference_info_received: Callable[[Core, ConferenceInfo], NoneType]

Callback prototype for notifying the application about a received conference info.

Parameters
on_push_notification_received: Callable[[Core, str | None], NoneType]

Callback prototype for notifying the application a push notification was received. On iOS it only works with pushkit (VoIP) pushes.

Parameters
  • core: Core object
  • payload: the body of the push notification, if any
on_preview_display_error_occurred: Callable[[Core, int], NoneType]

Callback to notify that there are errors from the video rendering. Check LinphoneCallCbsVideoDisplayErrorOccurredCb for more details.

Parameters
  • core: Core object
  • error_code: The error code. It depends of the display filter (available for OpenGL)
on_call_state_changed: Callable[[Core, Call, CallState, str], NoneType]

Call state notification callback.

Parameters
  • core: the Core
  • call: the Call object whose state is changed.
  • state: the new CallState of the call
  • message: a non None informational message about the state.
on_notify_presence_received: Callable[[Core, Friend], NoneType]

Report status change for a friend previously added to the Core with linphone_core_add_friend().

Parameters
  • core: Core object
  • linphone_friend: Updated Friend
on_notify_presence_received_for_uri_or_tel: Callable[[Core, Friend, str, PresenceModel], NoneType]

Reports presence model change for a specific URI or phone number of a friend.

Parameters
  • core: Core object
  • linphone_friend: Friend object
  • uri_or_tel: The URI or phone number for which the presence model has changed
  • presence_model: The new PresenceModel
on_new_subscription_requested: Callable[[Core, Friend, str], NoneType]

Reports that a new subscription request has been received and wait for a decision.

A subscription request is notified by this function only if the

SubscribePolicy for the given Friend has been set to SubscribePolicy.SPWait. See Friend.inc_subscribe_policy.

Parameters
  • core: Core object
  • linphone_friend: The Friend aimed by the subscription.
  • url: URI of the subscriber
on_authentication_requested: Callable[[Core, AuthInfo, AuthMethod], NoneType]

Callback for requesting authentication information to application or user.

Parameters
  • core: the Core
  • auth_info: a AuthInfo pre-filled with username, realm and domain values as much as possible
  • method: the type of authentication requested as AuthMethod enum
    Application shall reply to this callback using Core.add_auth_info.
on_call_log_updated: Callable[[Core, CallLog], NoneType]

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

Parameters
  • core: the Core
  • call_log: the new CallLog entry added.
on_call_id_updated: Callable[[Core, str, str], NoneType]

Callback to notify the callid of a call has been updated. This is done typically when a call retry.

Parameters
  • core: the Core
  • previous_call_id: the previous callid.
  • current_call_id: the new callid.
on_message_received: Callable[[Core, ChatRoom, ChatMessage], NoneType]

Chat message callback prototype.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
  • message: ChatMessage incoming message
on_new_message_reaction: Callable[[Core, ChatRoom, ChatMessage, ChatMessageReaction], NoneType]

Chat message new reaction callback prototype.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
  • message: the ChatMessage to which the reaction applies to
  • reaction: the ChatMessageReaction that has been sent or received
on_reaction_removed: Callable[[Core, ChatRoom, ChatMessage, Address], NoneType]

Chat message removed reaction callback prototype.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
  • message: the ChatMessage to which a reaction has been removed from
  • address: the Address of the person that removed it's reaction
on_messages_received: Callable[[Core, ChatRoom, list[ChatMessage]], NoneType]

Chat messages callback prototype. Only called when aggregation is enabled (aka [sip] chat_messages_aggregation == 1 or using Core.chat_messages_aggregation_enabled), it replaces the single message received callback.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
  • messages: The of incoming messages
on_message_sent: Callable[[Core, ChatRoom, ChatMessage], NoneType]

Called after the ChatMessage.send was called. The message will be in state InProgress. In case of resend this callback won't be called.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in this conversation. Can be be created by the framework in case the From-URI is not present in any chat room.
  • message: ChatMessage outgoing message
on_chat_room_session_state_changed: Callable[[Core, ChatRoom, CallState, str], NoneType]

Chat room session state changed callback.

Parameters
  • core: Core object
  • chat_room: ChatRoom that has been marked as read.
  • state: the new CallState of the call
  • message: a non None informational message about the state.
on_chat_room_read: Callable[[Core, ChatRoom], NoneType]

Chat room marked as read callback.

Parameters
  • core: Core object
  • chat_room: ChatRoom that has been marked as read.
on_message_received_unable_decrypt: Callable[[Core, ChatRoom, ChatMessage], NoneType]

Chat message not decrypted callback prototype.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in this conversation. Can be be created by the framework in case the from-URI is not present in any chat room.
  • message: ChatMessage incoming message
on_is_composing_received: Callable[[Core, ChatRoom], NoneType]

Is composing notification callback prototype.

Parameters
  • core: Core object
  • chat_room: ChatRoom involved in the conversation.
on_dtmf_received: Callable[[Core, Call, int], NoneType]

Callback for being notified of DTMFs received.

Parameters
  • core: the LinphoneCore
  • call: the LinphoneCall that received the dtmf
  • dtmf: the ascii code of the dtmf
on_refer_received: Callable[[Core, str], NoneType]

Callback prototype for when a refer is received.

Parameters
  • core: the Core
  • refer_to: the address of the refer
on_call_goclear_ack_sent: Callable[[Core, Call], NoneType]

GoClear ACK sent on call callback.

Parameters
  • core: the Core
  • call: the Call on which the GoClear ACK was sent.
on_call_encryption_changed: Callable[[Core, Call, bool, str | None], NoneType]

Call encryption changed callback.

Parameters
  • core: the Core
  • call: the Call on which encryption is changed.
  • media_encryption_enabled: whether encryption is activated.
  • authentication_token: an authentication token, currently set for ZRTP kind of encryption only.
on_call_send_master_key_changed: Callable[[Core, Call, str | None], NoneType]

Call send master key changed callback.

Parameters
  • core: the Core
  • call: the Call on which the GoClear ACK was sent.
  • master_key: new master key.
on_call_receive_master_key_changed: Callable[[Core, Call, str | None], NoneType]

Call receive master key changed callback.

Parameters
  • core: the Core
  • call: the Call on which the GoClear ACK was sent.
  • master_key: new master key.
on_transfer_state_changed: Callable[[Core, Call, CallState], NoneType]

Callback for notifying progresses of transfers.

Parameters
  • core: the LinphoneCore
  • transfered: the LinphoneCall that was transfered
  • call_state: the LinphoneCallState of the call to transfer target at the far end.
on_buddy_info_updated: Callable[[Core, Friend], NoneType]

Callback prototype when using the buddy plugin.

Parameters
  • core: the Core
  • linphone_friend: the Friend that has been updated
on_call_stats_updated: Callable[[Core, Call, CallStats], NoneType]

Callback for receiving quality statistics for calls.

Parameters
on_info_received: Callable[[Core, Call, InfoMessage], NoneType]

Callback prototype for receiving info messages.

Parameters
  • core: the Core
  • call: the call whose info message belongs to.
  • message: the info message.
on_subscription_state_changed: Callable[[Core, Event, SubscriptionState], NoneType]

Callback prototype for notifying the application about changes of subscription states, including arrival of new subscriptions.

Parameters
on_notify_sent: Callable[[Core, Event, Content | None], NoneType]

Callback prototype for notifying the application about notification that is being sent.

Parameters
  • core: Core object
  • linphone_event: the Event received
  • body: the Content of the event
on_notify_received: Callable[[Core, Event, str, Content | None], NoneType]

Callback prototype for notifying the application about notification received from the network.

Parameters
  • core: Core object
  • linphone_event: the Event received
  • notified_event: The event as string
  • body: the Content of the event
on_subscribe_received: Callable[[Core, Event, str, Content | None], NoneType]

Callback prototype for notifying the application about subscription received from the network.

Parameters
  • core: Core object
  • linphone_event: the Event received
  • subscribe_event: The event as string
  • body: the Content of the event
on_publish_state_changed: Callable[[Core, Event, PublishState], NoneType]

Callback prototype for notifying the application about changes of publish states.

Parameters
on_publish_received: Callable[[Core, Event, str, Content | None], NoneType]

Callback prototype for notifying the application about publish received from the network.

Parameters
  • core: Core object
  • linphone_event: the Event received
  • publish_event: The event as string
  • body: the Content of the event
on_configuring_status: Callable[[Core, ConfiguringState, str | None], NoneType]

Callback prototype for configuring status changes notification.

Parameters
on_network_reachable: Callable[[Core, bool], NoneType]

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

Parameters
  • core: the Core
  • reachable: true if network is reachable.
on_log_collection_upload_state_changed: Callable[[Core, CoreLogCollectionUploadState, str], NoneType]

Callback prototype for reporting log collection upload state change.

Parameters
  • core: Core object
  • state: The state of the log collection upload
  • info: Additional information: error message in case of error state, URL of uploaded file in case of success.
on_log_collection_upload_progress_indication: Callable[[Core, int, int], NoneType]

Callback prototype for reporting log collection upload progress indication.

Parameters
  • core: Core object
  • offset: the number of bytes sent since the start of the upload
  • total: the total number of bytes to upload
on_friend_list_created: Callable[[Core, FriendList], NoneType]

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

Parameters
on_friend_list_removed: Callable[[Core, FriendList], NoneType]

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

Parameters
on_call_created: Callable[[Core, Call], NoneType]

Callback notifying that a new Call (either incoming or outgoing) has been created.

Parameters
  • core: Core object that has created the call
  • call: The newly created Call object
on_version_update_check_result_received: Callable[[Core, VersionUpdateCheckResult, str, str | None], NoneType]

Callback prototype for reporting the result of a version update check.

Parameters
  • core: Core object
  • result: The result of the version update check
  • url: The url where to download the new version if the result is

    LinphoneVersionUpdateCheckNewVersionAvailable

on_conference_state_changed: Callable[[Core, Conference, ConferenceState], NoneType]

Callback prototype telling that a Conference state has changed.

Parameters
on_chat_room_state_changed: Callable[[Core, ChatRoom, ChatRoomState], NoneType]

Callback prototype telling that a ChatRoom state has changed.

Parameters
on_chat_room_subject_changed: Callable[[Core, ChatRoom], NoneType]

Callback prototype telling that a ChatRoom subject has changed.

Parameters
  • core: Core object
  • chat_room: The ChatRoom object for which the subject has changed
on_chat_room_ephemeral_message_deleted: Callable[[Core, ChatRoom], NoneType]

Callback prototype telling that a ChatRoom ephemeral message has expired.

Parameters
  • core: Core object
  • chat_room: The ChatRoom object for which a message has expired.
on_imee_user_registration: Callable[[Core, bool, str, str], NoneType]

Callback prototype telling that an Instant Message Encryption Engine user registered on the server with or without success.

Parameters
  • core: Core object
  • status: the return status of the registration action.
  • user_id: the userId published on the encryption engine server
  • info: information about failure
on_qrcode_found: Callable[[Core, str | None], NoneType]

Callback prototype telling the result of decoded qrcode.

Parameters
  • core: Core object
  • result: The result of the decoded qrcode
on_first_call_started: Callable[[Core], NoneType]

Callback prototype telling a call has started (incoming or outgoing) while there was no other call.

Parameters
on_last_call_ended: Callable[[Core], NoneType]

Callback prototype telling the last call has ended (Core.calls_nb returns 0)

Parameters
on_audio_device_changed: Callable[[Core, AudioDevice], NoneType]

Callback prototype telling that the audio device for at least one call has changed.

Parameters
  • core: LinphoneCore object
  • audio_device: the newly used LinphoneAudioDevice object
on_audio_devices_list_updated: Callable[[Core], NoneType]

Callback prototype telling the audio devices list has been updated. Either a new device is available or a previously available device isn't anymore. You can call Core.audio_devices to get the new list.

Parameters
on_ec_calibration_result: Callable[[Core, EcCalibratorStatus, int], NoneType]

Function prototype used by linphone_core_cbs_set_ec_calibration_result.

Parameters
  • core: The Core.
  • status: The EcCalibratorStatus of the calibrator.
  • delay_ms: The measured delay if available.
on_ec_calibration_audio_init: Callable[[Core], NoneType]

Function prototype used by linphone_core_cbs_set_ec_calibration_audio_init.

Parameters
on_ec_calibration_audio_uninit: Callable[[Core], NoneType]

Function prototype used by linphone_core_cbs_set_ec_calibration_audio_uninit.

Parameters
on_account_registration_state_changed: Callable[[Core, Account, RegistrationState, str], NoneType]

Callback notifying that a Account has its registration state changed.

Parameters
  • core: The Core object.
  • account: The Account object which has its registration changed.
  • state: The new RegistrationState for this account.
  • message: a non None informational message about the state
on_default_account_changed: Callable[[Core, Account | None], NoneType]

Default account changed callback prototype.

Parameters
  • core: Core object
  • account: Account object that has been set as the default account, probably by calling Core.default_account, or None if the default account was removed.
on_account_added: Callable[[Core, Account], NoneType]

Account added callback prototype.

Parameters
on_account_removed: Callable[[Core, Account], NoneType]

Account removed callback prototype.

Parameters
on_new_alert_triggered: Callable[[Core, Alert], NoneType]

Callback for notifying about an alert (e.g on Qos)

Parameters
class EventListener:

An object to handle the callbacks for handling the LinphoneEvent operations.

on_notify_response: Callable[[Event], NoneType]

Callback used to notify the response to a sent NOTIFY.

Parameters
  • event: The Event object that has sent the NOTIFY and for which we received a response
on_notify_received: Callable[[Event, Content | None], NoneType]

Callback used to notify the received to a NOTIFY.

Parameters
  • event: The LinphoneEvent object that receive the NOTIFY
  • content: The LinphoneContent object that containe the body of the event
on_subscribe_received: Callable[[Event], NoneType]

Callback used to notify the received to a SUBSCRIBE.

Parameters
  • event: The LinphoneEvent object that receive the SUBSCRIBE
on_subscribe_state_changed: Callable[[Event, SubscriptionState], NoneType]

SUBSCRIBE state changed callback.

Parameters
on_publish_received: Callable[[Event, Content | None], NoneType]

Callback used to notify the received to a PUBLISH.

Parameters
  • event: The LinphoneEvent object that receive the PUBLISH
  • content: The LinphoneContent object that containe the body of the event
on_publish_state_changed: Callable[[Event, PublishState], NoneType]

PUBLISH state changed callback.

Parameters
  • event: The LinphoneEvent object that state changed
  • state: The LinphonePublishState
class FriendListener:

An object to handle the callbacks for Friend.

on_presence_received: Callable[[Friend], NoneType]

Callback used to notify a friend that it has received presence information.

Parameters
  • linphone_friend: The Friend object for which the status has changed
class FriendListListener:

An object to handle the callbacks for Friend synchronization.

on_contact_created: Callable[[FriendList, Friend], NoneType]

Callback used to notify a new contact has been created on the CardDAV server and downloaded locally.

Parameters
  • friend_list: The FriendList object the new contact is added to
  • linphone_friend: The Friend object that has been created
on_contact_deleted: Callable[[FriendList, Friend], NoneType]

Callback used to notify a contact has been deleted on the CardDAV server.

Parameters
  • friend_list: The FriendList object a contact has been removed from
  • linphone_friend: The Friend object that has been deleted
on_contact_updated: Callable[[FriendList, Friend, Friend], NoneType]

Callback used to notify a contact has been updated on the CardDAV server.

Parameters
  • friend_list: The FriendList object in which a contact has been updated

  • new_friend: The new Friend object corresponding to the updated contact

  • old_friend: The old Friend object before update

on_sync_status_changed: Callable[[FriendList, FriendListSyncStatus, str | None], NoneType]

Callback used to notify the status of the synchronization has changed.

Parameters
  • friend_list: The FriendList object for which the status has changed
  • status: The new FriendListSyncStatus
  • message: An additional information on the status update
on_presence_received: Callable[[FriendList, list[Friend]], NoneType]

Callback used to notify a list with all friends that have received presence information.

Parameters
  • friend_list: The LinphoneFriendList object for which the status has changed
  • friends: A of the relevant friends
on_new_sip_address_discovered: Callable[[FriendList, Friend, str], NoneType]

Callback used to notify a list that a new SIP address was discovered through long term presence mechanism.

Parameters
  • friend_list: The FriendList object for which the status has changed
  • linphone_friend: The Friend for which the SIP address was discovered

  • sip_uri: The newly discovered SIP URI

class LoggingServiceListener:

Listener for LoggingService.

on_log_message_written: Callable[[LoggingService, str, LogLevel, str], NoneType]

Type of callbacks called each time liblinphone write a log message.

Parameters
  • log_service: A pointer on the logging service singleton.
  • domain: A string describing which sub-library of liblinphone the message is coming from.
  • level: Verbosity LogLevel of the message.
  • message: Content of the message.
class MagicSearchListener:

A MagicSearchListener is used to do specifics searchs.

on_search_results_received: Callable[[MagicSearch], NoneType]

Callback used to notify when results are received.

Parameters
on_ldap_have_more_results: Callable[[MagicSearch, Ldap], NoneType]

Callback used to notify when LDAP have more results available.

Parameters
class ParticipantDeviceListener:

An object to handle the callbacks for the handling a ParticipantDevice objects. Use Factory.create_participant_device_cbs to create an instance. Then pass the object to a ParticipantDevice instance through ParticipantDevice.add_callbacks.

on_is_speaking_changed: Callable[[ParticipantDevice, bool], NoneType]

Callback used to notify that is this participant device speaking has changed.

Parameters
  • participant_device: ParticipantDevice object
  • is_speaking: is this participant device speaking
on_is_muted: Callable[[ParticipantDevice, bool], NoneType]

Callback used to notify that this participant device is muted or is no longer muted.

Parameters
  • participant_device: ParticipantDevice object
  • is_muted: is this participant device muted
on_screen_sharing_changed: Callable[[ParticipantDevice, bool], NoneType]

Callback used to notify that this participant device is screen sharing or is no longer screen sharing.

Parameters
  • participant_device: ParticipantDevice object
  • is_screen_sharing: is this participant device screen sharing
on_state_changed: Callable[[ParticipantDevice, ParticipantDeviceState], NoneType]

Callback used to notify that participant device changed state.

Parameters
  • participant_device: LinphoneParticipantDevice object
on_stream_capability_changed: Callable[[ParticipantDevice, MediaDirection, StreamType], NoneType]

Callback used to notify that participant device stream capability has changed.

Parameters
  • participant_device: ParticipantDevice object
  • direction: participant device's stream direction
  • stream_type: type of stream: aaudio, video or text
on_thumbnail_stream_capability_changed: Callable[[ParticipantDevice, MediaDirection], NoneType]

Callback used to notify that participant device thumbnail stream capability has changed.

Parameters
  • participant_device: ParticipantDevice object
  • direction: participant device's thumbnail direction
on_stream_availability_changed: Callable[[ParticipantDevice, bool, StreamType], NoneType]

Callback used to notify that participant device stream availability has changed.

Parameters
  • participant_device: ParticipantDevice object
  • available: participant device's stream availability
  • stream_type: type of stream: aaudio, video or text
on_thumbnail_stream_availability_changed: Callable[[ParticipantDevice, bool], NoneType]

Callback used to notify that participant device thumbnail stream availability has changed.

Parameters
  • participant_device: ParticipantDevice object
  • available: participant device's thumbnail stream availability
on_video_display_error_occurred: Callable[[ParticipantDevice, int], NoneType]

Callback to notify that there are errors from the video rendering of the participant device. Check LinphoneCallCbsVideoDisplayErrorOccurredCb for more details.

Parameters
  • participant_device: LinphoneParticipantDevice object
  • error_code: the error code coming from the display render.
class PlayerListener:

An object to handle the callbacks for the handling a Player objects.

on_eof_reached: Callable[[Player], NoneType]

Callback for notifying end of play (file).

Parameters
class XmlRpcRequestListener:

An object to handle the callbacks for handling the XmlRpcRequest operations.

on_response: Callable[[XmlRpcRequest], NoneType]

Callback used to notify the response to an XML-RPC request.

Parameters
class Account:

Object that represents a Linphone Account. This object replaces the deprecated ProxyConfig. Use a AccountParams object to configure it.

avpf_enabled: bool

Indicates whether AVPF/SAVPF is being used for calls using this account.

Returns

True if AVPF/SAVPF is enabled, False otherwise.

call_logs: list[CallLog]

Returns the list of call logs for a given account. This list must be freed after use.

Returns

The list of call logs .

chat_rooms: list[ChatRoom]

Returns the list of chat rooms for a given account.

Returns

The list of chat rooms .

conference_information_list: list[ConferenceInfo]

Returns the list of conference information for a given account. This list must be freed after use.

Returns

The list of call logs .

contact_address: Address | None

Return the contact address of the account.

Returns

a Address correspong to the contact address of the account.

core: Core

Get the Core object to which is associated the Account.

Returns

The Core object to which is associated the Account.

current_callbacks: AccountListener | None

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

Returns

The AccountListener that has called the last callback.

dependency: Account | None

Get the dependency of a Account.

Returns

The account this one is dependent upon, or None if not marked dependent.

error: Reason

Get the reason why registration failed when the account state is LinphoneRegistrationFailed.

Returns

The Reason why registration failed for this account.

error_info: ErrorInfo

Get detailed information why registration failed when the account state is LinphoneRegistrationFailed.

Returns

The ErrorInfo explaining why registration failed for this account.

is_avpf_enabled: bool

Indicates whether AVPF/SAVPF is being used for calls using this account.

Returns

True if AVPF/SAVPF is enabled, False otherwise. Deprecated since version 16/12/2021 Use Account.avpf_enabled instead..

missed_calls_count: int

Returns the missed calls count for a given account.

Returns

The missed calls count.

params: AccountParams

Get the AccountParams as read-only object. To make changes, clone the returned object using AccountParams.clone method, make your changes on it and apply them using with Account.params.

Returns

The AccountParams attached to this account.

Get the registration state of the given account.

Returns

The RegistrationState of the account.

transport: TransportType

Get the transport from either service route, route or addr.

Returns

The transport as a string (I.E udp, tcp, tls, dtls). Deprecated since version 01/03/2021 Use Linphone_account_params_get_transport() instead..

unread_chat_message_count: int

Returns the unread chat message count for a given account.

Returns

The unread chat message count.

def add_listener(self, listener: AccountListener):

Adds a listener to this Account object

Parameters
def remove_listener(self, listener: AccountListener):

Removes a listener from this this Account object

Parameters
def new_with_config( lc: Core | None, params: AccountParams, config: ProxyConfig | None) -> Account:

Create a new Account with a Proxy config backpointer. This is only intended to be used while keeping a backward compatibility with proxy config.

Parameters
Returns

The newly created Account object.

def add_custom_param(self, key: str, value: str):

Set one custom parameter to this Account.

Parameters
  • key: key of the searched parameter.
  • value: value of the searched parameter.
def clear_call_logs(self):

Deletes all the call logs related to this account from the database.

def clone(self) -> Account:

Instantiate a new account with values from source.

Returns

The newly created Account object.

def find_auth_info(self) -> AuthInfo | None:

Find authentication info matching account, if any, similarly to linphone_core_find_auth_info.

Returns

a AuthInfo matching account criteria if possible, None if nothing can be found.

def get_call_logs_for_address(self, remote_address: Address) -> list[CallLog]:

Returns the list of call logs for a given account. This list must be freed after use.

Parameters
  • remote_address: the Address object to filter call logs.
Returns

The list of filtered call logs .

def get_custom_header(self, header_name: str) -> str | None:

Obtain the value of a header sent by the server in last answer to REGISTER.

Parameters
  • header_name: The header name for which to fetch corresponding value.
Returns

The value of the queried header.

def get_custom_param(self, key: str) -> str:

Get the custom parameter with key to this Account.

Parameters
  • key: key of the searched parameter.
Returns

The value of the parameter with key if found or an empty string otherwise.

def is_phone_number(self, username: str) -> bool:

Detect if the given input is a phone number or not.

Parameters
  • username: The string to parse.
Returns

True if input is a phone number, False otherwise.

def normalize_phone_number(self, username: str) -> str | None:

Normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 or +33888444222 depending on the Account object. This function will always generate a normalized username if input is a phone number.

Parameters
  • username: The string to parse.
Returns

None if input is an invalid phone number, normalized phone number from username input otherwise.

def normalize_sip_uri(self, username: str) -> Address | None:

Normalize a human readable sip uri into a fully qualified LinphoneAddress. A sip address should look like DisplayName . Basically this function performs the following tasks The result is a syntactically correct SIP address.

Parameters
  • username: The string to parse.
Returns

None if invalid input, normalized sip address otherwise.

def pause_register(self):

Prevent an account from refreshing its registration. This is useful to let registrations to expire naturally (or) when the application wants to keep control on when refreshes are sent. However, linphone_core_set_network_reachable(lc,True) will always request the accounts to refresh their registrations. The refreshing operations can be resumed with Account.refresh_register.

def refresh_register(self):

Refresh a proxy registration. This is useful if for example you resuming from suspend, thus IP address may have changed.

def reset_missed_calls_count(self):

Re-sets the number of missed calls for this account to 0.

def set_custom_header(self, header_name: str, header_value: str | None):

Set the value of a custom header sent to the server in REGISTERs request.

Parameters
  • header_name: The header name.
  • header_value: The header value.
class AccountCreator:

The object used to configure an account on a server via XML-RPC, see https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Override%20account%20creator%20request/.

account_creation_request_token: str | None

Get the account creation request token received to be used to check user validation.

Returns

The token set, if any

activation_code: str | None

Get the activation code.

Returns

The activation code of the AccountCreator.

algorithm: str | None

Get the algorithm configured in the account creator.

Returns

The algorithm of the AccountCreator.

current_callbacks: AccountCreatorListener | None

Get the current AccountCreatorListener object associated with a LinphoneAccountCreator.

Returns

The current AccountCreatorListener object associated with the LinphoneAccountCreator.

display_name: str | None

Get the display name.

Returns

The display name of the AccountCreator.

domain: str | None

Get the domain.

Returns

The domain of the AccountCreator.

email: str | None

Get the email.

Returns

The email of the AccountCreator.

ha1: str | None

Get the ha1.

Returns

The ha1 of the AccountCreator.

language: str | None

Get the language use in email of SMS.

Returns

The language of the AccountCreator.

password: str | None

Get the password.

Returns

The password of the AccountCreator.

phone_country_code: str | None

Get the international prefix.

Returns

The international prefix (or phone country code) of the AccountCreator.

phone_number: str | None

Get the RFC 3966 normalized phone number.

Returns

The phone number of the AccountCreator.

pn_param: str | None

Get the param to be used by the backend to send the push notification to the device asking for an auth token.

Returns

The pn_param set, if any

pn_prid: str | None

Get the prid to be used by the backend to send the push notification to the device asking for an auth token.

Returns

The pn_prid set, if any

pn_provider: str | None

Get the provider to be used by the backend to send the push notification to the device asking for an auth token.

Returns

The pn_provider set, if any

route: str | None

Get the route.

Returns

The route of the AccountCreator.

def set_as_default(self, set_as_default: bool) -> AccountCreatorStatus:

Set the set_as_default property.

Parameters
  • set_as_default: True for the created proxy config to be set as default in Core, False otherwise
Returns

AccountCreatorStatus.RequestOk if everything is OK, or a specific error otherwise.

token: str | None

Get the authentication token set (if any) to be used to authenticate next queries, if required.

Returns

The token set, if any

transport: TransportType

Get Transport.

Returns

The TransportType of the creator.

username: str | None

Get the username.

Returns

The username of the AccountCreator.

def add_listener(self, listener: AccountCreatorListener):

Adds a listener to this AccountCreator object

Parameters
def remove_listener(self, listener: AccountCreatorListener):

Removes a listener from this this AccountCreator object

Parameters
def create(core: Core) -> AccountCreator:

Create a AccountCreator and set Linphone Request callbacks.

Parameters
  • core: The Core used for the XML-RPC communication
Returns

The new AccountCreator object.

def set_account(self, account: Account | None):

Assign a proxy config pointer to the LinphoneAccountCreator.

Parameters
  • account: The LinphoneAccount to associate with the LinphoneAccountCreator.
def set_proxy_config(self, cfg: ProxyConfig | None):

Assign a proxy config pointer to the LinphoneAccountCreator.

Parameters
  • cfg: The LinphoneProxyConfig to associate with the LinphoneAccountCreator.
def activate_account(self) -> AccountCreatorStatus:

Send a request to activate an account on server.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def activate_alias(self) -> AccountCreatorStatus:

Send a request to activate an alias.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def create_account(self) -> AccountCreatorStatus:

Send a request to create an account on server.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def create_account_in_core(self) -> Account | None:

Create and configure a Account and a AuthInfo from informations set in the AccountCreator.

Returns

A Account object if successful, None otherwise.

def create_proxy_config(self) -> ProxyConfig | None:

Create and configure a proxy config and a authentication info for an account creator.

Returns

A ProxyConfig object if successful, None otherwise.
Deprecated since version 05/05/2023 Use AccountCreator.create_account_in_core instead..

def create_push_account(self) -> AccountCreatorStatus:

Send a request to create a push account on server. Push accounts are used in account dependent situation when account cannot send push notifications. A username and password are automatically generated, an account is automatically activated.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def is_account_activated(self) -> AccountCreatorStatus:

Send a request to know if an account is activated on server.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def is_account_exist(self) -> AccountCreatorStatus:

Send a request to know the existence of account on server.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def is_account_linked(self) -> AccountCreatorStatus:

Send a request to know if an account is linked.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def is_alias_used(self) -> AccountCreatorStatus:

Send a request to know if an alias is used.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def login_linphone_account(self) -> AccountCreatorStatus:

Send a request to get the password & algorithm of an account using the confirmation key.

Returns

AccountCreatorStatus.RequestOk if everything is OK, or a specific error otherwise.

def recover_account(self) -> AccountCreatorStatus:

Send a request to recover an account.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def request_account_creation_request_token(self) -> AccountCreatorStatus:

Request an account creation "request_token" to be used on account creations. The request_token is retrieved from the callback linphone_account_creator_cbs_get_account_creation_request_token

Returns

AccountCreatorStatus.RequestOk if everything is OK, or a specific error otherwise.

def request_account_creation_token_using_request_token(self) -> AccountCreatorStatus:

Send a request to get a token to be used for account creation from a request_token. The token is retrieved from the callback linphone_account_creator_cbs_get_account_creation_token_using_request_token

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def request_auth_token(self) -> AccountCreatorStatus:

Request an auth token to be send by the backend by push notification.

Returns

AccountCreatorStatus.RequestOk if everything is OK, or a specific error otherwise.

def reset(self):

Reset the account creator entries like username, password, phone number...

def set_phone_number(self, phone_number: str | None, country_code: str | None) -> int:

Set the phone number normalized.

Parameters
  • phone_number: The phone number to set
  • country_code: Country code to associate phone number with
Returns

AccountCreatorPhoneNumberStatus.Ok if everything is OK, or specific(s) error(s) otherwise.

def update_account(self) -> AccountCreatorStatus:

Send a request to update an account.

Returns

AccountCreatorStatus.RequestOk if the request has been sent, AccountCreatorStatus.RequestFailed otherwise

def use_test_admin_account(self):

Require the account creator to use special "test admin account".

The "test admin account" is a special feature required for

automated test, and requires the APP_EVERYONE_IS_ADMIN property to be enabled on the remote Flexisip Account Manager (FlexiAPI). This feature must never be turned on for a production-stage app.

class AccountParams:

Object that is used to set the different parameters of a Account. Note that authenticated accounts should have a corresponding AuthInfo added to the Core to register properly.

audio_video_conference_factory_address: Address | None

Get the audio video conference factory uri.

Returns

The Address of the audio video conference factory.

avpf_mode: AVPFMode

Get enablement status of RTCP feedback (also known as AVPF profile).

Returns

the enablement mode, which can be AVPFMode.Default (use LinphoneCore's mode), AVPFMode.Enabled (avpf is enabled), or AVPFMode.Disabled (disabled).

avpf_rr_interval: int

Get the interval between regular RTCP reports when using AVPF/SAVPF.

Returns

The interval in seconds.

conference_factory_address: Address | None

Get the conference factory uri.

Returns

The Address of the conference factory.

conference_factory_uri: str | None

Get the conference factory uri.

Returns

The uri of the conference factory.

contact_parameters: str | None

Returns the contact parameters.

Returns

The previously set contact parameters.

contact_uri_parameters: str | None

Return the contact URI parameters.

Returns

The previously set contact URI parameters.

cpim_in_basic_chat_room_enabled: bool

Indicates whether chat messages sent by this account in a ChatRoomBackend.Basic chat room will be using CPIM format or not. By default SIP SIMPLE format is used for "basic" chat rooms, CPIM is only used for ChatRoomBackend.FlexisipChat chat rooms. seealso.

https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Instant%20Messaging/Reply%20to%20a%20specific%20message/

Returns

True if chat messages will be sent out in CPIM format, False if chat messages will be sent out as SIP SIMPLE.

custom_contact: Address | None

Get the custom contact address previously used when registering to the SIP server.

Returns

a Address

dial_escape_plus_enabled: bool

Return whether or not the + should be replaced by 00.

Returns

Whether liblinphone should replace "+" by "00" in dialed numbers (passed to Core.invite).

domain: str | None

Get the domain name of the given account params.

Returns

The domain name of the account params.

expires: int

Get the account params expires.

Returns

The duration of registration.

identity: str | None

Get the identity of the account params.

Returns

The SIP identity that belongs to this account params.
Deprecated since version 01/03/2021 Use AccountParams.identity_address instead..

identity_address: Address | None

Get the identity address of the account params.

Returns

The SIP identity that belongs to this account params.

idkey: str | None

Get the idkey property of a AccountParams.

Returns

The idkey string, or None.

instant_messaging_encryption_mandatory: bool

Check if encryption is mandatory for instant messages or not.

Returns

True if encryption is mandatory; False otherwise.

international_prefix: str | None

Gets the prefix set for this account params.

Returns

The international prefix if set, null otherwise.

international_prefix_iso_country_code: str | None

Gets the ISO country code set for the international prefix in this account params.

Returns

The international prefix ISO country code if set, null otherwise.

is_push_notification_available: bool

Gets whether push notifications are available or not (Android & iOS only).

Returns

True if push notifications are available, False otherwise

lime_server_url: str | None

Get the x3dh server url.

Returns

The x3dh server url.

mwi_server_address: Address | None

Get the Message Waiting Indication server address.

Returns

The Message Waiting Indication server address.

nat_policy: NatPolicy | None

Get The policy that is used to pass through NATs/firewalls when using this account params. If it is set to None, the default NAT policy from the core will be used instead.

Returns

The NatPolicy object in use.
seealso Core.nat_policy.

outbound_proxy_enabled: bool

Tell if the proxy is used as the only route.

Returns

enable True if enabled, False otherwise.

picture_uri: str | None

Gets the account picture URI if set, None otherwise.

Returns

The account picture URI.

privacy: int

Get default privacy policy for all calls routed through this proxy.

Returns

Privacy mode as LinphonePrivacyMask

publish_enabled: bool

Tell if the PUBLISH is enabled.

Returns

True if PUBLISH request is enabled for this proxy.

publish_expires: int

Get the publish expiration time in second. Default value is the registration expiration value.

Returns

The expire time in seconds.

push_notification_allowed: bool

Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates for VOIP push notification.

Returns

True if push notification informations should be added, False otherwise.

push_notification_config: PushNotificationConfig

Returns the push notification configuration.

Returns

The PushNotificationConfig object.

quality_reporting_collector: str | None

Get the route of the collector end-point when using quality reporting. This SIP address should be used on server-side to process packets directly before discarding packets. Collector address should be a non existing account and will not receive any messages. If None, reports will be send to the proxy domain.

Returns

The SIP address of the collector end-point.

quality_reporting_enabled: bool

Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035.

Returns

True if quality repotring is enabled, False otherwise.

quality_reporting_interval: int

Get the interval between interval reports when using quality reporting.

Returns

The interval in seconds, 0 means interval reports are disabled.

realm: str | None

Get the realm of the given account params.

Returns

The realm of the account params.

ref_key: str | None

Get the persistent reference key associated to the account params. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.

Returns

The reference key string that has been associated to the account params, or None if none has been associated.

register_enabled: bool

Returns whether the account params is enabled or not.

Returns

True if registration to the proxy is enabled.

remote_push_notification_allowed: bool

Indicates whether to add to the contact parameters the push notification information.

Returns

True if remote push notification informations should be added, False otherwise.

routes_addresses: list[Address]

Gets the list of the routes set for this account params.

If linphone_account_params_is_outbound_proxy_enabled is True then

it will only return the proxy address.

Returns

The list of routes.

rtp_bundle_assumption_enabled: bool

Returns whether RTP bundle mode is assumed. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.

Returns

a boolean indicating when rtp bundle support is assumed.

rtp_bundle_enabled: bool

Returns whether RTP bundle mode (also known as Media Multiplexing) is enabled. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.

Returns

a boolean indicating the enablement of rtp bundle mode.

server_addr: str | None

Get the account params proxy address.

Returns

The proxy's SIP address.
Deprecated since version 01/03/2021 Use AccountParams.server_address instead..

server_address: Address | None

Get the account params proxy address.

Returns

The proxy's SIP Address.

transport: TransportType

Returns the transport type of the server address.

Returns

The TransportType of the server address.

use_international_prefix_for_calls_and_chats: bool

Return whether or not the international prefix will automaticaly be used for calls and chats.

Returns

Whether we should use international prefix automatically for calls.

def new_with_config(lc: Core, index: int) -> AccountParams:

Create a new AccountParams object from a configuration.

Parameters
  • lc: The Core object.
  • index: The index of the configuration.
Returns

The newly created AccountParams object.

def add_custom_param(self, key: str, value: str):

Set one custom parameter to this AccountParams.

Parameters
  • key: key of the searched parameter.
  • value: value of the searched parameter.
def clone(self) -> AccountParams:

Instantiate a new account params with values from source.

Returns

The newly created AccountParams object.

def get_custom_param(self, key: str) -> str:

Get the custom parameter with key to this AccountParams.

Parameters
  • key: key of the searched parameter.
Returns

The value of the parameter with key if found or an empty string otherwise.

class Address:

Object that represents a parsed SIP address. A SIP address is made of display name, username, domain name, port, and various uri headers (such as tags). It looks like 'Alice '. You can create an address using Factory.create_address or Core.interpret_url and both will return a None object if it doesn't match the grammar defined by the standard. This object is used in almost every other major objects to identity people (including yourself) & servers. The Address has methods to extract and manipulate all parts of the address.

display_name: str | None

Returns the display name.

Returns

the display name if any, None otherwise.

domain: str | None

Returns the domain name.

Returns

the domain name if any, None otherwise.

is_sip: bool

returns whether the address is a routable SIP address or not

Returns

True if it is a routable SIP address, False otherwise

is_valid: bool | None

Returns if address is valid.

Returns

the scheme if any, None otherwise.

method_param: str | None

Get the value of the method parameter.

Returns

the value of the parameter or None.

password: str | None

Get the password encoded in the address. It is used for basic authentication (not recommended).

Returns

the password if any, None otherwise.

port: int

Get port number as an integer value, 0 if not present.

Returns

the port set in the address or 0 if not present.

scheme: str | None

Returns the address scheme, normally "sip".

Returns

the scheme if any, None otherwise.

secure: bool

Returns whether the address refers to a secure location (sips) or not.

Returns

True if address refers to a secure location, False otherwise

transport: TransportType

Get the transport.

Returns

a TransportType, default value if not set is UDP.

username: str | None

Returns the username.

Returns

the username name if any, None otherwise.

def set_uri_params(self, params: str):

Set the value of the parameters of the URI of the address.

Parameters
  • params: The parameters string
def as_string(self) -> str:

Returns the address as a string. The returned char * must be freed by the application. Use ms_free().

Returns

a string representation of the address.

def as_string_uri_only(self) -> str:

Returns the SIP uri only as a string, that is display name is removed. The returned char * must be freed by the application. Use ms_free().

Returns

a string representation of the address.

def clean(self):

Removes address's tags and uri headers so that it is displayable to the user.

def clone(self) -> Address:

Clones a Address object.

Returns

a new Address object.

def equal(self, address2: Address) -> bool:

Compare two Address taking the tags and headers into account.

Parameters
Returns

Boolean value telling if the Address objects are equal. seealso Address.weak_equal.

def get_header(self, header_name: str) -> str | None:

Get the header encoded in the address.

Parameters
  • header_name: the header name.
Returns

the header value or None if it doesn't exists.

def get_param(self, param_name: str) -> str | None:

Get the value of a parameter of the address.

Parameters
  • param_name: The name of the parameter.
Returns

The value of the parameter or None if it doesn't exists.

def get_uri_param(self, uri_param_name: str) -> str | None:

Get the value of a parameter of the URI of the address.

Parameters
  • uri_param_name: The name of the parameter.
Returns

The value of the parameter or None if it doesn't exists.

def has_param(self, param_name: str) -> bool:

Tell whether a parameter is present in the address.

Parameters
  • param_name: The name of the parameter.
Returns

A boolean value telling whether the parameter is present in the address

def has_uri_param(self, uri_param_name: str) -> bool:

Tell whether a parameter is present in the URI of the address.

Parameters
  • uri_param_name: The name of the parameter.
Returns

A boolean value telling whether the parameter is present in the URI of the address

def lesser(self, other: Address) -> bool:

Compare two addresses.

Parameters
def remove_uri_param(self, uri_param_name: str):

Removes the value of a parameter of the URI of the address.

Parameters
  • uri_param_name: The name of the parameter.
def set_header(self, header_name: str, header_value: str | None):

Set a header into the address. Headers appear in the URI with '?', such as .

Parameters
  • header_name: the header name.
  • header_value: the header value.
def set_param(self, param_name: str, param_value: str | None):

Set the value of a parameter of the address.

Parameters
  • param_name: The name of the parameter.
  • param_value: The new value of the parameter.
def set_uri_param(self, uri_param_name: str, uri_param_value: str | None):

Set the value of a parameter of the URI of the address.

Parameters
  • uri_param_name: The name of the parameter.
  • uri_param_value: The new value of the parameter.
def weak_equal(self, address2: Address) -> bool:

Compare two Address ignoring tags and headers, basically just domain, username, and port.

Parameters
Returns

Boolean value telling if the Address objects are equal. seealso Address.equal.

class Alert:

Object that represents an alert. Alerts are raised at run-time when particular conditions are met, for example bad network quality. The full list of available alert types is described by the AlertType enum. An application is notified of new alerts through the CoreListener interface. Once raised, the application may use the AlertListener interface to get notified when the alert stops. For each kind of alert, a Dictionary is filled with relevant informations, returned by Alert.informations. The keys available are documented per-type in AlertType enum.

call: Call | None

Return the call from the alert.

Returns

A Call from the alert.

current_callbacks: AlertListener | None

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

Returns

The AlertListener that has called the last callback.

end_time: int

Return the end time of the alert.

Returns

the end time of the alert.

informations: Dictionary | None

Return more informations about the alerts.

Returns

A Dictionary containing informations about the current alert.

start_time: int

Return the start time of the alert.

Returns

the start time of the alert.

state: bool

Return the state of the alert.

Returns

true if and only if the alert is active.

type: AlertType

Return the type of the alert.

Returns

A AlertType corresponding to the current alert.

def add_listener(self, listener: AlertListener):

Adds a listener to this Alert object

Parameters
def remove_listener(self, listener: AlertListener):

Removes a listener from this this Alert object

Parameters
def type_to_string(_type: AlertType) -> str:

Provide a string describing the alert type.

Parameters
Returns

a string

def clone(self) -> Alert:

Clone the given alert.

Returns

A new alert with exactly same informations that param.

def notify_on_terminated(self):

Notify the alert if it is terminated.

class AudioDevice:

Object holding audio device information. It contains the name of the device, it's type if available (Earpiece, Speaker, Bluetooth, etc..) and capabilities (input, output or both) the name of the driver that created it (filter in mediastreamer). You can use the AudioDevice objects to configure default input/output devices or do it dynamically during a call. To get the list of available devices, use Core.audio_devices. This list will be limited to one device of each type. Use Core.extended_audio_devices for a complete list.

capabilities: AudioDeviceCapabilities

Returns the capabilities of the device.

Returns

the AudioDeviceCapabilities of the audio device (RECORD, PLAY or both) as a bit mask

device_name: str

Returns the name of the audio device.

Returns

the name of the audio device.

driver_name: str

Returns the driver name used by the device.

Returns

the name of the driver used by this audio device.

id: str

Returns the id of the audio device.

Returns

the id of the audio device.

Returns the type of the device.

Returns

the AudioDeviceType of the audio device (microphone, speaker, earpiece, bluetooth, etc...)

def has_capability(self, capability: AudioDeviceCapabilities) -> bool:

Returns whether or not the audio device has the given capability.

Parameters
Returns

True if the audio device has the capability, False otherwise

class AuthInfo:

Object holding authentication information. In most case, authentication information consists of a username and password. If realm isn't set, it will be deduced automatically from the first authentication challenge as for the hash algorithm. Sometimes, a userid is required by the proxy and then domain can be useful to discriminate different credentials. You can also use this object if you need to use a client certificate. Once created and filled, a AuthInfo must be added to the Core in order to become known and used automatically when needed. Use Core.add_auth_info for that purpose. The Core object can take the initiative to request authentication information when needed to the application through the authentication_requested() callback of it's CoreListener. The application can respond to this information request later using Core.add_auth_info. This will unblock all pending authentication transactions and retry them with authentication headers.

access_token: BearerToken | None

Return a previously set access token.

Returns

the access token, as a BearerToken object

algorithm: str | None

Gets the algorithm.

Returns

The algorithm.

authorization_server: str | None

Get the previously set authorization server uri.

Returns

the authorization server uri.

available_algorithms: list

Gets all available algorithms.

Returns

A list of available algorithms.

client_id: str | None

Get the previously set OAUTH2 client_id.

Returns

the client_id.

domain: str | None

Gets the domain.

Returns

The domain.

ha1: str | None

Gets the ha1.

Returns

The ha1.

password: str | None

Gets the password.

Returns

The password.

realm: str | None

Gets the realm.

Returns

The realm.

refresh_token: BearerToken | None

Return a previously set refresh token.

Returns

the refresh token, as a BearerToken object.

tls_cert: str | None

Gets the TLS certificate.

Returns

The TLS certificate.

tls_cert_path: str | None

Gets the TLS certificate path.

Returns

The TLS certificate path.

tls_key: str | None

Gets the TLS key.

Returns

The TLS key.

tls_key_path: str | None

Gets the TLS key path.

Returns

The TLS key path.

token_endpoint_uri: str | None

Get the previously set token endpoint https uri (OAUTH2).

Returns

the token endpoint uri.

userid: str | None

Gets the user id.

Returns

The user id.

username: str | None

Gets the username.

Returns

The username.

def add_available_algorithm(self, algorithm: str | None):

Add an unique algorithm in the the available algorithms list : Algorithms that already exist will not be added.

Parameters
  • algorithm: The algorithm to add.
def clear_available_algorithms(self):

Remove all algorithms from the available algorithms list.

def clone(self) -> AuthInfo:

Instantiates a new auth info with values from source.

Returns

The newly created AuthInfo object.

def is_equal_but_algorithms(self, auth_info_2: AuthInfo | None) -> bool:

Check if Authinfos are the same without taking account algorithms.

Parameters
  • auth_info_2: The second AuthInfo object.
Returns

True if all fields (Username, UserId, Realm, Domain) are the same.

class BearerToken:

Object that represents a bearer token (eg OAUTH). SIP servers may support "bearer" kind of authentication, in which case an authentication token needs to be supplied in order to authenticate to the SIP service. Applications are responsible to obtain the token from an authentication server. In order to pass it to liblinphone for usage, the token needs to be encapsulated into a BearerToken, together with its expiration time and target server name for which it is intended to use, then passed into a AuthInfo object. Both access and refresh tokens may be represented. If both are provided to the AuthInfo, then liblinphone automatically uses the refresh token to obtain a new access token when the latter is expired.

expiration_time: int

Get the token exiration time, as a number of seconds since EPOCH.

Returns

the expiration time

token: str

Get the token as a string.

Returns

the token.

class Buffer:

The object representing a data buffer.

is_empty: bool

Tell whether the Buffer is empty.

Returns

A boolean value telling whether the Buffer is empty or not.

size: int

Get the size of the content of the data buffer.

Returns

The size of the content of the data buffer.

string_content: str

Get the string content of the data buffer.

Returns

The string content of the data buffer.

def new_from_string(data: str) -> Buffer:

Create a new Buffer object from a string.

Parameters
  • data: The initial string content of the LinphoneBuffer.
Returns

A new Buffer object.

class Call:

This object represents a call issued or received by the Core. Linphone only allows at most one active call at any given time and it will be in CallState.StreamsRunning. However, if the core is locally hosting a Conference, you may have some or all the calls in the conference in CallState.StreamsRunning as well as an additional active call outside of the conference in CallState.StreamsRunning if the local participant of the Conference is not part of it. You can get the CallState of the call using Call.state, it's current CallParams with Call.current_params and the latest statistics by calling Call.audio_stats or Call.video_stats.

audio_stats: CallStats | None

Returns a copy of the call statistics for the audio stream.

Returns

a CallStats object for the audio stream or None if it isn't available.

authentication_token: str | None

Returns the ZRTP authentication token to verify.

Returns

the authentication token to verify or None if ZRTP isn't enabled.

authentication_token_verified: bool

Returns whether ZRTP authentication token is verified. If not, it must be verified by users as described in ZRTP procedure. Once done, the application must inform of the results with Call.authentication_token_verified.

Returns

True if authentication token is verifed, false otherwise.

average_quality: float

Returns call quality averaged over all the duration of the call. See Call.current_quality for more details about quality measurement.

Returns

the call average quality since tbe beginning of the call.

call_log: CallLog

Gets the call log associated to this call.

Returns

The CallLog associated with the specified Call.

camera_enabled: bool

Returns if camera pictures are allowed to be sent to the remote party.

Returns

True if local video stream is being sent, False otherwise.

chat_room: ChatRoom | None

Create a new chat room for real time messaging from a call if not already existing, else return existing one. No reference is given to the caller: the chat room will be deleted when the call is ended.

Returns

ChatRoom where real time messaging can take place or None if chat room couldn't be created.

conference: Conference | None

Return the associated conference object.

Returns

A pointer on Conference or None if the call is not part of any conference.

core: Core

Get the core that has created the specified call.

Returns

The Core object that has created the specified call.

current_callbacks: CallListener | None

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

Returns

The CallListener that has called the last callback

current_params: CallParams

Returns current parameters associated to the call.

Returns

the current CallParams of this call.

current_quality: float

Obtain real-time quality rating of the call. Based on local RTP statistics and RTCP feedback, a quality rating is computed and updated during all the duration of the call. This function returns its value at the time of the function call. It is expected that the rating is updated at least every 5 seconds or so. The rating is a floating point number comprised between 0 and 5. 4-5 = good quality 3-4 = average quality 2-3 = poor quality 1-2 = very poor quality 0-1 = can't be worse, mostly unusable

Returns

The function returns -1 if no quality measurement is available, for example if no active audio stream exist. Otherwise it returns the quality rating.

dir: CallDir

Returns direction of the call (incoming or outgoing).

Returns

the CallDir

diversion_address: Address | None

Returns the diversion address associated to this call.

Returns

the diversion address as Address or None.

duration: int

Returns call's duration in seconds.

Returns

the call's duration in seconds.

echo_cancellation_enabled: bool

Returns if echo cancellation is enabled.

Returns

True if echo cancellation is enabled, False otherwise.

echo_limiter_enabled: bool

Returns if echo limiter is enabled.

Returns

True if echo limiter is enabled, False otherwise.

error_info: ErrorInfo

Returns full details about call errors or termination reasons.

Returns

ErrorInfo object holding the reason error.

input_audio_device: AudioDevice | None

Gets the current input device for this call.

Returns

the AudioDevice used by this call as input or None if there is currently no soundcard configured (depending on the state of the call)

is_recording: bool

Returns whether or not the call is currently being recorded.

Returns

True if recording is in progress, False otherwise Deprecated since version 15/09/2021 Use CallParams.is_recording instead..

microphone_muted: bool

Get microphone muted state. Note that the microphone may be disabled globally if False was given to Core.mic_enabled.

Returns

The microphone muted state.

This method returns state of the mute capability of the call

passed as argument. If this call is part of a conference, it is strongly recommended to call Conference.microphone_muted to know whether this device is muted or not.

microphone_volume_gain: float

Get microphone volume gain. If the sound backend supports it, the returned gain is equal to the gain set with the system mixer.

Returns

double Percentage of the max supported volume gain. Valid values are in [ 0.0 : 1.0 ]. In case of failure, a negative value is returned

native_video_window_id: object | None

Get the native window handle of the video window, casted as an unsigned long.

Returns

the native video window id (type may vary depending on platform).

output_audio_device: AudioDevice | None

Gets the current output device for this call.

Returns

the AudioDevice used by this call as output or None if there is currently no soundcard configured (depending on the state of the call)

params: CallParams

Returns local parameters associated with the call. This is typically the parameters passed at call initiation to Core.invite_address_with_params or Call.accept_with_params, or some default parameters if no CallParams was explicitely passed during call initiation.

Returns

the call's local parameters.

play_volume: float

Get the mesured playback volume level (received from remote) in dbm0.

Returns

float Volume level in percentage.

player: Player | None

Gets a player associated with the call to play a local file and stream it to the remote peer.

Returns

A Player object.

reason: Reason

Returns the reason for a call termination (either error or normal termination)

Returns

the Reason of the call termination.

record_volume: float

Get the mesured record volume level (sent to remote) in dbm0.

Returns

float Volume level in percentage.

refer_to: str | None

Gets the refer-to uri (if the call was transfered).

Returns

The refer-to uri of the call (if it was transfered).

remote_address: Address

Returns the remote address associated to this call.

Returns

The Address of the remote end of the call.

remote_address_as_string: str | None

Returns the remote address associated to this call as a string. The result string must be freed by user using ms_free().

Returns

the remote address as a string.
Deprecated since version 06/07/2020 use Call.remote_address instead..

remote_contact: str | None

Returns the far end's sip contact as a string, if available.

Returns

the remote contact or None.

remote_contact_address: Address | None

Returns the far end's sip contact as an address, if available.

Returns

the remote contact as a Address or None.

remote_params: CallParams | None

Returns call parameters proposed by remote. This is useful when receiving an incoming call, to know whether the remote party supports video, encryption or whatever.

Returns

the CallParams suggested by the remote or None.

remote_user_agent: str | None

Returns the far end's user agent description string, if available.

Returns

the remote user agent or None.

replaced_call: Call | None

Returns the call object this call is replacing, if any. Call replacement can occur during call transfers. By default, the core automatically terminates the replaced call and accept the new one. This function allows the application to know whether a new incoming call is a one that replaces another one.

Returns

the Call object this call is replacing or None.

request_address: Address

The address to which the call has been sent, taken directly from the SIP URI of the INVITE. Usually equal to the To field, except when e.g. using a fallback contact address. You should probably use getToAddress() instead, unless you know what you're doing.

Returns

the Address matching the URI of the INVITE request.

speaker_muted: bool

Get speaker muted state.

Returns

The speaker muted state.

speaker_volume_gain: float

Get speaker volume gain. If the sound backend supports it, the returned gain is equal to the gain set with the system mixer.

Returns

Percentage of the max supported volume gain. Valid values are in [ 0.0 : 1.0 ]. In case of failure, a negative value is returned

state: CallState

Retrieves the call's current state.

Returns

the current CallState of this call.

stream_count: int

Returns the number of stream for the given call.

Returns

the amount of streams for this call.

text_stats: CallStats | None

Returns a copy of the call statistics for the text stream.

Returns

a CallStats object for the text stream or None if it isn't available.

to_address: Address

Returns the to address with its headers associated to this call.

Returns

the Address matching the TO of the call.

transfer_state: CallState

Returns the current transfer state, if a transfer has been initiated from this call. seealso linphone_core_transfer_call ,.

linphone_core_transfer_call_to_another

Returns

the CallState.

transfer_target_call: Call | None

When this call has received a transfer request, returns the new call that was automatically created as a result of the transfer.

Returns

the transfer Call created.

transferer_call: Call | None

Gets the transferer if this call was started automatically as a result of an incoming transfer request. The call in which the transfer request was received is returned in this case.

Returns

The transferer Call if the specified call was started automatically as a result of an incoming transfer request, None otherwise.

video_source: VideoSourceDescriptor | None

Gets the video source of a call.

Returns

The VideoSourceDescriptor describing the video source that is set

video_stats: CallStats | None

Returns a copy of the call statistics for the video stream.

Returns

a CallStats object for the video stream or None if it isn't available.

def add_listener(self, listener: CallListener):

Adds a listener to this Call object

Parameters
def remove_listener(self, listener: CallListener):

Removes a listener from this this Call object

Parameters
def accept(self) -> int:

Accept an incoming call. Basically the application is notified of incoming calls within the call_state_changed callback of the LinphoneCoreVTable structure, where it will receive a CallDir.Incoming event with the associated Call object. The application can later accept the call using this method.

Returns

0 on success, -1 on failure

def accept_early_media(self) -> int:

Accept an early media session for an incoming call. This is identical as calling Call.accept_early_media_with_params with None parameters.

Returns

0 if successful, -1 otherwise seealso Call.accept_early_media_with_params.

def accept_early_media_with_params(self, params: CallParams | None) -> int:

When receiving an incoming, accept to start a media session as early-media. This means the call is not accepted but audio & video streams can be established if the remote party supports early media. However, unlike after call acceptance, mic and camera input are not sent during early-media, though received audio & video are played normally. The call can then later be fully accepted using Call.accept or Call.accept_with_params.

Parameters
  • params: The call parameters to use (can be None).
Returns

0 if successful, -1 otherwise

def accept_update(self, params: CallParams | None) -> int:

Accept call modifications initiated by other end. This call may be performed in response to a #LinphoneCallUpdatedByRemote state notification. When such notification arrives, the application can decide to call Call.defer_update so that it can have the time to prompt the user. Call.remote_params can be used to get information about the call parameters requested by the other party, such as whether a video stream is requested. When the user accepts or refuse the change, Call.accept_update can be done to answer to the other party. If params is None, then the same call parameters established before the update request will continue to be used (no change). If params is not None, then the update will be accepted according to the parameters passed. Typical example is when a user accepts to start video, then params should indicate that video stream should be used (see CallParams.video_enabled).

Parameters
  • params: A CallParams object describing the call parameters to accept.
Returns

0 if successful, -1 otherwise (actually when this function call is performed outside ot #LinphoneCallUpdatedByRemote state)

def accept_with_params(self, params: CallParams | None) -> int:

Accept an incoming call, with parameters. Basically the application is notified of incoming calls within the call_state_changed callback of the LinphoneCoreVTable structure, where it will receive a CallDir.Incoming event with the associated Call object. The application can later accept the call using this method.

Parameters
  • params: The specific parameters for this call, for example whether video is accepted or not. Use None to use default parameters.
Returns

0 on success, -1 on failure

def asked_to_autoanswer(self) -> bool:

Tell whether a call has been asked to autoanswer.

Returns

A boolean value telling whether the call has been asked to autoanswer

def cancel_dtmfs(self):

Stop current DTMF sequence sending. Please note that some DTMF could be already sent, depending on when this function call is delayed from Call.send_dtmfs. This function will be automatically called if call state change to anything but LinphoneCallStreamsRunning.

def confirm_go_clear(self):

Method to be called after the user confirm that he/she is notifed of the on going Go Clear procedure.

this operation must be imperatevely initiate by a user action on

sending of the GoClear ACK

def create_native_video_window_id(self) -> object | None:

Create a native video window id where the video is to be displayed.

Returns

the native video window id (type may vary depending on platform).

def decline(self, reason: Reason) -> int:

Decline a pending incoming call, with a reason.

Parameters
  • reason: The reason for rejecting the call: Reason.Declined or Reason.Busy
Returns

0 on success, -1 on failure

def decline_with_error_info(self, ei: ErrorInfo | None) -> int:

Decline a pending incoming call, with a ErrorInfo object.

Parameters
  • ei: ErrorInfo containing more information on the call rejection.
Returns

0 on success, -1 on failure

def defer_update(self) -> int:

When receiving a #LinphoneCallUpdatedByRemote state notification, prevent Core from performing an automatic answer. When receiving a #LinphoneCallUpdatedByRemote state notification (ie an incoming reINVITE), the default behaviour of Core is defined by the "defer_update_default" option of the "sip" section of the config. If this option is 0 (the default) then the Core automatically answers the reINIVTE with call parameters unchanged. However when for example when the remote party updated the call to propose a video stream, it can be useful to prompt the user before answering. This can be achieved by calling linphone_core_defer_call_update during the call state notification, to deactivate the automatic answer that would just confirm the audio but reject the video. Then, when the user responds to dialog prompt, it becomes possible to call Call.accept_update to answer the reINVITE, with eventually video enabled in the CallParams argument. The #LinphoneCallUpdatedByRemote notification can also arrive when receiving an INVITE without SDP. In such case, an unchanged offer is made in the 200Ok, and when the ACK containing the SDP answer is received,

LinphoneCallUpdatedByRemote is triggered to notify the application of possible

changes in the media session. However in such case defering the update has no meaning since we just generating an offer.

Returns

0 if successful, -1 if the Call.defer_update was done outside a valid #LinphoneCallUpdatedByRemote notification

def get_stats(self, _type: StreamType) -> CallStats | None:

Returns a copy of the call statistics for a particular stream type.

Parameters
Returns

a CallStats object for the given stream or None if stream isn't available.

def get_to_header(self, header_name: str) -> str | None:

Returns the value of the header name.

Parameters
  • header_name: the name of the header to check.
Returns

the value of the header if exists.
Deprecated since version 27/10/2020. Use CallParams.custom_header on.

Call.remote_params instead.

def has_transfer_pending(self) -> bool:

Returns if this calls has received a transfer that has not been executed yet. Pending transfers are executed when this call is being paused or closed, locally or by remote endpoint. If the call is already paused while receiving the transfer request, the transfer immediately occurs.

Returns

True if transfer is pending, False otherwise.

def media_in_progress(self) -> bool:

Indicates whether an operation is in progress at the media side. It can be a bad idea to initiate signaling operations (adding video, pausing the call, removing video, changing video parameters) while the media is busy in establishing the connection (typically ICE connectivity checks). It can result in failures generating loss of time in future operations in the call. Applications are invited to check this function after each call state change to decide whether certain operations are permitted or not.

Returns

True if media is busy in establishing the connection, False otherwise.

def notify_ringing(self):

Starts the process of replying 180 Ringing. This function is used in conjonction with Core.auto_send_ringing_enabled. If the automatic sending of the 180 Ringing is disabled, this function needs to be called manually before the call timeouts.

def ogl_render(self):

Calls generic OpenGL render for a given call.

def pause(self) -> int:

Pauses the call. If a music file has been setup using Core.play_file, this file will be played to the remote user. The only way to resume a paused call is to call Call.resume.

Returns

0 on success, -1 on failure seealso Call.resume.

def redirect(self, redirect_uri: str) -> int:

Redirect the specified call to the given redirect URI.

Parameters
  • redirect_uri: The URI to redirect the call to
Returns

0 if successful, -1 on error. Deprecated since version 27/10/2020. Use Call.redirect_to instead..

def redirect_to(self, redirect_address: Address) -> int:

Redirect the specified call to the given redirect Address.

Parameters
  • redirect_address: The Address to redirect the call to
Returns

0 if successful, -1 on error.

def request_notify_next_video_frame_decoded(self):

Request the callback passed to linphone_call_cbs_set_next_video_frame_decoded to be called the next time the video decoder properly decodes a video frame.

def resume(self) -> int:

Resumes a call. The call needs to have been paused previously with Call.pause.

Returns

0 on success, -1 on failure seealso Call.pause.

def send_dtmf(self, dtmf: str) -> int:

Send the specified dtmf. The dtmf is automatically played to the user.

Parameters
  • dtmf: The dtmf name specified as a char, such as '0', '#' etc...
Returns

0 if successful, -1 on error.

def send_dtmfs(self, dtmfs: str) -> int:

Send a list of dtmf. The dtmfs are automatically sent to remote, separated by some needed customizable delay. Sending is canceled if the call state changes to something not LinphoneCallStreamsRunning.

Parameters
  • dtmfs: A dtmf sequence such as '123#123123'
Returns

-2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise.

def send_info_message(self, info: InfoMessage) -> int:

Sends an info message through an established call.

Parameters
def send_vfu_request(self):

Request remote side to send us a Video Fast Update.

def start_recording(self):

Starts call recording. Video record is only available if this function is called in state StreamRunning. The output file where audio is recorded must be previously specified with CallParams.record_file.

def stop_recording(self):

Stops call recording.

def take_preview_snapshot(self, file_path: str) -> int:

Take a photo of currently captured video and write it into a jpeg file. Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns.

Parameters
  • file_path: a path where to write the jpeg content.
Returns

0 if successful, -1 otherwise (typically if jpeg format is not supported).

def take_video_snapshot(self, file_path: str) -> int:

Take a photo of currently received video and write it into a jpeg file. Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns.

Parameters
  • file_path: a path where to write the jpeg content.
Returns

0 if successful, -1 otherwise (typically if jpeg format is not supported).

def terminate(self) -> int:

Terminates a call.

Returns

0 on success, -1 on failure

def terminate_with_error_info(self, ei: ErrorInfo | None) -> int:

Terminates a call.

Parameters
Returns

0 on success, -1 on failure

def transfer(self, refer_to: str) -> int:

Performs a simple call transfer to the specified destination. The remote endpoint is expected to issue a new call to the specified destination. The current call remains active and thus can be later paused or terminated. It is possible to follow the progress of the transfer provided that transferee sends notification about it. In this case, the transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify of the state of the new call at the other party. The notified states are

LinphoneCallOutgoingInit , #LinphoneCallOutgoingProgress,

LinphoneCallOutgoingRinging and #LinphoneCallConnected.

Parameters
  • refer_to: The destination the call is to be refered to.
Returns

0 on success, -1 on failure Deprecated since version 27/10/2020. Use Call.transfer_to instead..

def transfer_to(self, refer_to: Address) -> int:

Performs a simple call transfer to the specified destination. The remote endpoint is expected to issue a new call to the specified destination. The current call remains active and thus can be later paused or terminated. It is possible to follow the progress of the transfer provided that transferee sends notification about it. In this case, the transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify of the state of the new call at the other party. The notified states are

LinphoneCallOutgoingInit , #LinphoneCallOutgoingProgress,

LinphoneCallOutgoingRinging and #LinphoneCallConnected.

Parameters
  • refer_to: The Address the call is to be refered to.
Returns

0 on success, -1 on failure

def transfer_to_another(self, dest: Call) -> int:

Transfers a call to destination of another running call. This is used for "attended transfer" scenarios. The transfered call is supposed to be in paused state, so that it is able to accept the transfer immediately. The destination call is a call previously established to introduce the transfered person. This method will send a transfer request to the transfered person. The phone of the transfered is then expected to automatically call to the destination of the transfer. The receiver of the transfer will then automatically close the call with us (the 'dest' call). It is possible to follow the progress of the transfer provided that transferee sends notification about it. In this case, the transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify of the state of the new call at the other party. The notified states are #LinphoneCallOutgoingInit ,

LinphoneCallOutgoingProgress, #LinphoneCallOutgoingRinging and

LinphoneCallConnected.

Parameters
  • dest: A running call whose remote person will receive the transfer
Returns

0 on success, -1 on failure

def update(self, params: CallParams | None) -> int:

Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore. It triggers a SIP reINVITE in order to perform a new offer/answer of media capabilities. Changing the size of the transmitted video after calling linphone_core_set_preferred_video_size can be used by passing None as params argument. In case no changes are requested through the CallParams argument, then this argument can be omitted and set to None. WARNING: Updating a call in the #LinphoneCallPaused state will still result in a paused call even if the media directions set in the params are sendrecv. To resume a paused call, you need to call Call.resume.

Parameters
  • params: The new call parameters to use (may be None).
Returns

0 if successful, -1 otherwise.

def zoom(self, zoom_factor: float, cx: float, cy: float):

Perform a zoom of the video displayed during a call. The zoom ensures that all the screen is fullfilled with the video.

Parameters
  • zoom_factor: a floating point number describing the zoom factor. A value 1.0 corresponds to no zoom applied.
  • cx: a floating point number pointing the horizontal center of the zoom to be applied. This value should be between 0.0 and 1.0.
  • cy: a floating point number pointing the vertical center of the zoom to be applied. This value should be between 0.0 and 1.0.
class CallLog:

Object used to keep track of all calls initiated, received or missed. It contains the call ID, date & time at which the call took place and it's duration (0 if it wasn't answered). You can also know if video was enabled or not or if it was a conference, as well as it's average quality. If needed, you can also create a fake CallLog using Core.create_call_log, otherwise use Core.call_logs or even Call.call_log to get the log of an ongoing call.

call_id: str | None

Get the call ID used by the call.

Returns

The call ID used by the call as a string.

conference_info: ConferenceInfo | None

Retrieves the conference info associated to this call log in DB.

Returns

The ConferenceInfo associated.

dir: CallDir

Get the direction of the call.

Returns

The CallDir of the call.

duration: int

Get the duration of the call since connected.

Returns

The duration of the call in seconds.

error_info: ErrorInfo | None

When the call was failed, return an object describing the failure.

Returns

ErrorInfo about the error encountered by the call associated with this call log or None.

from_address: Address

Get the origin address (ie from) of the call.

Returns

The origin Address (ie from) of the call.

local_address: Address

Get the local address (that is from or to depending on call direction)

Returns

The local Address of the call

quality: float

Get the overall quality indication of the call.

Returns

The overall quality indication of the call.

ref_key: str | None

Get the persistent reference key associated to the call log. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.

Returns

The reference key string that has been associated to the call log, or None if none has been associated.

remote_address: Address

Get the remote address (that is from or to depending on call direction).

Returns

The remote Address of the call.

start_date: int

Get the start date of the call.

Returns

The date of the beginning of the call.

status: CallStatus

Get the status of the call.

Returns

The CallStatus of the call.

to_address: Address

Get the destination address (ie to) of the call.

Returns

The destination Address (ie to) of the call.

video_enabled: bool

Tell whether video was enabled at the end of the call or not.

Returns

A boolean value telling whether video was enabled at the end of the call.

def to_str(self) -> str:

Get a human readable string describing the call.

: the returned string must be freed by the application (use

ms_free()).

Returns

A human readable string describing the call.

def was_conference(self) -> bool:

Tells whether that call was part of a conference.

Returns

True if the call was part of a conference, False otherwise.

class CallParams:

An object containing various parameters of a Call. You can specify your params while answering an incoming call using Call.accept_with_params or while initiating an outgoing call with Core.invite_address_with_params. This object can be created using Core.create_call_params, using None for the call pointer if you plan to use it for an outgoing call. For each call, three CallParams are available: yours, your correspondent's and the one that describe the current state of the call that is the result of the negociation between the previous two. For example, you might enable a certain feature in your call param but this feature can be denied in the remote's configuration, hence the difference. seealso Call.current_params, Call.remote_params and Call.params..

account: Account | None

Get the Account that is used for the call.

Returns

The selected Account for the call, or None if none has been selected.

audio_direction: MediaDirection

Get the audio stream direction.

Returns

The audio stream MediaDirection associated with the call params.

audio_enabled: bool

Tell whether audio is enabled or not.

Returns

A boolean value telling whether audio is enabled or not.

audio_multicast_enabled: bool

Use to get multicast state of audio stream.

Returns

true if subsequent calls will propose multicast ip set by Core.audio_multicast_addr

avpf_enabled: bool

Whether or not the feedback extension will be used for AVP.

Returns

true if AVPF is enabled, false otherwise

camera_enabled: bool

Tell whether camera is enabled or not. The value returned by this function has a different meaning whether it is from local or remote parameters. The former states the will of the user to use the camera of his/her device. On the other hand, the latter is just a guess to know whether the remote party enabled its camera or not. For example, while the call is part of a conference a core will understand that the remote party disabled its camera if the thumbnail stream's direction is inactive.

Returns

A boolean value telling whether camera is enabled or not.

capability_negotiation_reinvite_enabled: bool

Check if the capability negotiation (RFC5939) reINVITE is enabled or not.

Returns

True if capability negotiation reINVITE is enabled; False otherwise. Deprecated since version 16/12/2021 Use.

CallParams.capability_negotiation_reinvite_enabled instead.

capability_negotiations_enabled: bool

Indicates whether capability negotiations (RFC5939) is enabled.

Returns

a boolean indicating the enablement of capability negotiations.

conference_video_layout: ConferenceLayout

Set video layout for conference.

custom_contents: list[Content]

Gets a list of Content set if exists.

Returns

A list of Content set if exists, None otherwise.

early_media_sending_enabled: bool

Indicate whether sending of early media was enabled.

Returns

A boolean value telling whether sending of early media was enabled.

from_header: str | None

Get the from header in the CallParams.

Returns

The content of the from header, may be null.

input_audio_device: AudioDevice | None

Gets the default input audio device for a call that will be created using this call params.

This method only concerns the call creation, it doesn't reflect

the currently used input audio device of the call. Instead use Call.input_audio_device when call has been created.

Returns

the AudioDevice that will be used by default as input when the call will be created

is_capability_negotiation_reinvite_enabled: bool

Check if the capability negotiation (RFC5939) reINVITE is enabled or not.

Returns

True if capability negotiation reINVITE is enabled; False otherwise. Deprecated since version 16/12/2021 Use.

CallParams.capability_negotiation_reinvite_enabled instead.

is_recording: bool

Indicates whether the call is being recorded.

Returns

True if the call is being recorded, False otherwise.

is_valid: bool

Check if call parameters are valid.

Returns

True if the parameters are valid; False otherwise.

local_conference_mode: bool

Tell whether the call is part of the locally managed conference.

If a conference server is used to manage conferences, that

function does not return True even if the conference is running. If you want to test whether the conference is running, you should test whether Core.conference return a non-null pointer.

Returns

A boolean value telling whether the call is part of the locally managed conference.

low_bandwidth_enabled: bool

Tell whether the call has been configured in low bandwidth mode or not. This mode can be automatically discovered thanks to a stun server when activate_edge_workarounds=1 in section [net] of configuration file. An application that would have reliable way to know network capacity may not use activate_edge_workarounds=1 but instead manually configure low bandwidth mode with CallParams.low_bandwidth_enabled. When enabled, this param may transform a call request with video in audio only mode.

Returns

A boolean value telling whether the low bandwidth mode has been configured/detected.

media_encryption: MediaEncryption

Get the kind of media encryption selected for the call.

Returns

The kind of MediaEncryption selected for the call.

mic_enabled: bool

Tells whether the microphone will be enabled when the call will be created.

This method only concerns the call creation, it doesn't reflect

the actual microphone status during a call. Instead use Call.microphone_muted when call has been created.

Returns

True if the microphone will be enabled, False if disabled.

output_audio_device: AudioDevice | None

Gets the default output audio device for a call that will be created using this call params.

This method only concerns the call creation, it doesn't reflect

the currently used output audio device of the call. Instead use Call.output_audio_device when call has been created.

Returns

the AudioDevice that will be used by default as output when the call will be created

privacy: int

Get requested level of privacy for the call.

Returns

The LinphonePrivacyMask used for the call.

proxy_config: ProxyConfig | None

Get the ProxyConfig that is used for the call.

Returns

The selected ProxyConfig for the call, or None if none has been selected.
Deprecated since version 28/02/2021 Use CallParams.account instead..

realtime_text_enabled: bool

Use to get real time text following rfc4103.

Returns

returns true if call rtt is activated.

realtime_text_keepalive_interval: int

Use to get keep alive interval of real time text following rfc4103.

Returns

returns keep alive interval of real time text.

received_framerate: float

Get the framerate of the video that is received.

Returns

The actual received framerate in frames per seconds, 0 if not available.

received_video_definition: VideoDefinition | None

Get the definition of the received video.

Returns

The received VideoDefinition or None.

record_file: str | None

Get the path for the audio recording of the call.

Returns

The path to the audio recording of the call or None.

rtp_bundle_enabled: bool

Indicates whether RTP bundle mode (also known as Media Multiplexing) is enabled. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.

Returns

a boolean indicating the enablement of rtp bundle mode.

rtp_profile: str

Get the RTP profile being used.

Returns

The RTP profile.

screen_sharing_enabled: bool

Tell whether screen sharing is enabled or not.

Returns

A boolean value telling whether screen sharing is enabled or not.

sent_framerate: float

Get the framerate of the video that is sent.

Returns

The actual sent framerate in frames per seconds, 0 if not available.

sent_video_definition: VideoDefinition | None

Get the definition of the sent video.

Returns

The sent VideoDefinition or None.

session_name: str | None

Get the session name of the media session (ie in SDP). Subject from the SIP message can be retrieved using CallParams.custom_header and is different.

Returns

The session name of the media session or None.

tone_indications_enabled: bool

Check if tone indications are enabled.

Returns

True if tone indications are enabled; False otherwise.

used_audio_payload_type: PayloadType | None

Get the audio payload type that has been selected by a call.

Returns

The selected PayloadType. None is returned if no audio payload type has been selected by the call.

used_text_payload_type: PayloadType | None

Get the text payload type that has been selected by a call.

Returns

The selected PayloadType. None is returned if no text payload type has been selected by the call.

used_video_payload_type: PayloadType | None

Get the video payload type that has been selected by a call.

Returns

The selected PayloadType. None is returned if no video payload type has been selected by the call.

video_direction: MediaDirection

Get the video stream direction.

Returns

The video stream MediaDirection associated with the call params.

video_enabled: bool

Tell whether video is enabled or not.

Returns

A boolean value telling whether video is enabled or not.

video_multicast_enabled: bool

Use to get multicast state of video stream.

Returns

true if subsequent calls will propose multicast ip set by Core.video_multicast_addr

def set_audio_bandwidth_limit(self, bandwidth: int):

Refine bandwidth settings for this call by setting a bandwidth limit for audio streams. As a consequence, codecs whose bitrates are not compatible with this limit won't be used.

Parameters
  • bandwidth: The audio bandwidth limit to set in kbit/s.
def enable_cfg_lines_merging(self, enabled: bool):

Enable merging of cfg lines with consecutive indexes if capability negotiations (RFC5939) is enabled.

Parameters
  • enabled: A boolean value telling whether to merge pcfg and acfg lines
def enable_tcap_line_merging(self, enabled: bool):

Enable merging of tcap lines with consecutive indexes if capability negotiations (RFC5939) is enabled.

Parameters
  • enabled: A boolean value telling whether to merge tcap lines
def add_custom_content(self, content: Content):

Adds a Content to be added to the INVITE SDP.

Parameters
  • content: The Content to be added.
def add_custom_header(self, header_name: str, header_value: str | None):

Add a custom SIP header in the INVITE for a call.

Parameters
  • header_name: The name of the header to add.
  • header_value: The content of the header to add.
def add_custom_sdp_attribute(self, attribute_name: str, attribute_value: str | None):

Add a custom attribute related to all the streams in the SDP exchanged within SIP messages during a call.

Parameters
  • attribute_name: The name of the attribute to add.
  • attribute_value: The content value of the attribute to add.
def add_custom_sdp_media_attribute( self, _type: StreamType, attribute_name: str, attribute_value: str | None):

Add a custom attribute related to a specific stream in the SDP exchanged within SIP messages during a call.

Parameters
  • _type: The type of the stream to add a custom SDP attribute to.
  • attribute_name: The name of the attribute to add.
  • attribute_value: The content value of the attribute to add.
def cfg_lines_merged(self) -> bool:

Indicates whether cfg lines with consecutive indexes are going to be merged or not if capability negotiations (RFC5939) is enabled.

Returns

a boolean indicating the enablement of pcfg and acfg line merging

def clear_custom_sdp_attributes(self):

Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.

def clear_custom_sdp_media_attributes(self, _type: StreamType):

Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.

Parameters
  • _type: The type of the stream to clear the custom SDP attributes from.
def copy(self) -> CallParams:

Copy an existing CallParams object to a new CallParams object. CallParams.copy is error-prone, leading to inconsistent parameters being passed to Core.invite_address_with_params or Call.accept_with_params. Deprecated since version use exclusively Core.create_call_params to create.

CallParams object.

Returns

A copy of the CallParams object.

def get_custom_header(self, header_name: str) -> str | None:

Get a custom SIP header.

Parameters
  • header_name: The name of the header to get.
Returns

The content of the header or None if not found.

def get_custom_sdp_attribute(self, attribute_name: str) -> str | None:

Get a custom SDP attribute that is related to all the streams.

Parameters
  • attribute_name: The name of the attribute to get.
Returns

The content value of the attribute or None if not found.

def get_custom_sdp_media_attribute(self, _type: StreamType, attribute_name: str) -> str | None:

Get a custom SDP attribute that is related to a specific stream.

Parameters
  • _type: The type of the stream to add a custom SDP attribute to.
  • attribute_name: The name of the attribute to get.
Returns

The content value of the attribute or None if not found.

def has_custom_sdp_attribute(self, attribute_name: str) -> bool:

Returns True if a custom SDP attribute that is related to all the streams is present.

Parameters
  • attribute_name: The name of the attribute to get.
Returns

Whether the attribute is present.

def has_custom_sdp_media_attribute(self, _type: StreamType, attribute_name: str) -> bool:

Indicates whether a custom SDP attribute that is related to a specific stream is present or not.

Parameters
  • _type: The type of the stream to add a custom SDP attribute to.
  • attribute_name: The name of the attribute to get.
Returns

Whether the attribute is present.

def is_media_encryption_supported(self, encryption: MediaEncryption) -> bool:

Returns the encryption is supported.

Parameters
Returns

a boolean indicating whether the encryption is supported

def tcap_lines_merged(self) -> bool:

Indicates whether tcap lines with consecutive indexes are going to be merged or not if capability negotiations (RFC5939) is enabled.

Returns

a boolean indicating the enablement of tcap line merging

class CallStats:

This object carry various statistic informations regarding the quality of an audio or video stream for a given Call. To receive these informations periodically and as soon as they are computed, implement the call_stats_updated() callback inside a CoreListener. At any time, the application can access latest computed statistics using Call.audio_stats and Call.video_stats.

download_bandwidth: float

Get the bandwidth measurement of the received stream, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The bandwidth measurement of the received stream in kbit/s.

estimated_download_bandwidth: float

Get the estimated bandwidth measurement of the received stream, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The estimated bandwidth measurement of the received stream in kbit/s.

fec_download_bandwidth: float

Get the bandwidth measurement of the part of the received stream dedicated to FEC, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The bandwidth measurement of the received FEC stream in kbit/s.

fec_upload_bandwidth: float

Get the bandwidth measurement of the part of the sent stream dedicated to FEC, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The bandwidth measurement of the sent stream in kbit/s.

ice_state: IceState

Get the state of ICE processing.

Returns

The IceState of ICE processing

ip_family_of_remote: AddressFamily

Get the IP address family of the remote peer.

Returns

The IP address family AddressFamily of the remote peer.

is_zrtp_key_agreement_algo_post_quantum: bool

Did ZRTP used a Post Quantum algorithm to perform a key exchange.

Returns

True if the ZRTP key exchange was performed using a PQ algo False otherwise: ZRTP exchange not completed or not using a PQ algo

jitter_buffer_size_ms: float

Get the jitter buffer size in ms.

Returns

The jitter buffer size in ms.

late_packets_cumulative_number: int

Gets the cumulative number of late packets.

Returns

The cumulative number of late packets

local_late_rate: float

Gets the local late rate since last report.

Returns

The local late rate

local_loss_rate: float

Get the local loss rate since last report.

Returns

The local loss rate

receiver_interarrival_jitter: float

Gets the remote reported interarrival jitter.

Returns

The interarrival jitter at last received receiver report

receiver_loss_rate: float

Gets the remote reported loss rate since last report.

Returns

The receiver loss rate

round_trip_delay: float

Get the round trip delay in s.

Returns

The round trip delay in s.

rtcp_download_bandwidth: float

Get the bandwidth measurement of the received RTCP, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The bandwidth measurement of the received RTCP in kbit/s.

rtcp_upload_bandwidth: float

Get the bandwidth measurement of the sent RTCP, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The bandwidth measurement of the sent RTCP in kbit/s.

sender_interarrival_jitter: float

Gets the local interarrival jitter.

Returns

The interarrival jitter at last emitted sender report

sender_loss_rate: float

Get the local loss rate since last report.

Returns

The sender loss rate

srtp_source: MediaEncryption

Get the method used for SRTP key exchange.

Returns

The MediaEncryption method used to exchange the SRTP keys

srtp_suite: SrtpSuite

Get the SRTP Cryto suite in use.

Returns

The SRTP crypto suite currently in use SrtpSuite

type: StreamType

Get the type of the stream the stats refer to.

Returns

The StreamType the stats refer to

upload_bandwidth: float

Get the bandwidth measurement of the sent stream, expressed in kbit/s, including IP/UDP/RTP headers.

Returns

The bandwidth measurement of the sent stream in kbit/s.

upnp_state: UpnpState

Get the state of uPnP processing.

Returns

The UpnpState of uPnP processing.

zrtp_auth_tag_algo: str

Get the ZRTP algorithm statistics details (authentication method)

Returns

The auth tag algo

zrtp_cipher_algo: str

Get the ZRTP algorithm statistics details (cipher)

Returns

The cipher algo

zrtp_hash_algo: str

Get the ZRTP algorithm statistics details (hash function)

Returns

The hash algo

zrtp_key_agreement_algo: str

Get the ZRTP algorithm statistics details (key agreeement)

Returns

The key agreement algo

zrtp_sas_algo: str

Get the ZRTP algorithm statistics details (SAS display)

Returns

The sas algo

class ChatMessage:

An chat message is the object that is sent or received through a ChatRoom. To create a ChatMessage, use ChatRoom.create_empty_message, then either add text using ChatMessage.add_utf8_text_content or a Content with file informations using ChatMessage.add_file_content. A valid Content for file transfer must contain a type and subtype, the name of the file and it's size. Finally call ChatMessage.send to send it. To send files through a ChatMessage, you need to have configured a file transfer server URL with Core.file_transfer_server. On the receiving side, either use ChatMessage.download_content to download received files or enable auto-download in the Core using Core.max_size_for_auto_download_incoming_files, -1 disabling the feature and 0 always downloading files no matter it's size. Keep in mind a ChatMessage created by a ChatRoomBackend.Basic ChatRoom can only contain one Content, either text or file.

appdata: str | None

Linphone message has an app-specific field that can store a text. The application might want to use it for keeping data over restarts, like thumbnail image path.

Returns

the application-specific data or None if none has been stored.

call_id: str

Gets the callId accociated with the message.

Returns

the call Id

chat_room: ChatRoom

Returns the chatroom this message belongs to.

Returns

the ChatRoom in which this message has been sent or received.

content_type: str

Get the content type of a chat message.

Returns

The content type of the chat message

contents: list[Content]

Returns the list of contents in the message.

Returns

The list of Content.

core: Core

Returns back pointer to Core object.

Returns

the Core object associated with this message.

current_callbacks: ChatMessageListener | None

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

Returns

The ChatMessageListener that has called the last callback.

ephemeral_expire_time: int

Returns the real time at which an ephemeral message expires and will be deleted. seealso ChatMessage.is_ephemeral.

Returns

the time at which an ephemeral message expires. 0 means the message has not been read.

ephemeral_lifetime: int

Returns lifetime of an ephemeral message. The lifetime is the duration after which the ephemeral message will disappear once viewed. seealso ChatMessage.is_ephemeral.

Returns

the lifetime of an ephemeral message, by default 0 (disabled).

error_info: ErrorInfo

Get full details about delivery error of a chat message.

Returns

a ErrorInfo describing the details.

external_body_url: str | None

Linphone message can carry external body as defined by rfc2017.

Returns

external body url or None if not present.

file_transfer_information: Content | None

Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer)

Returns

a pointer to the Content structure or None if not present.

forward_info: str | None

Gets the forward info if available as a string.

Returns

the original sender of the message if it has been forwarded, None otherwise.

from_address: Address

Get origin of the message.

Returns

the Address of the sender.

is_ephemeral: bool

Returns wether the chat message is an ephemeral message or not. An ephemeral message will automatically disappear from the recipient's screen after the message has been viewed.

Returns

True if it is an ephemeral message, False otherwise

is_file_transfer: bool

Return whether or not a chat message is a file transfer.

Returns

Whether or not the message is a file transfer Deprecated since version 06/07/2020 check if ChatMessage.contents contains a Content.

for which Content.is_file_transfer returns True.

is_file_transfer_in_progress: bool

Gets whether or not a file is currently being downloaded or uploaded.

Returns

True if download or upload is in progress, False otherwise

is_forward: bool

Returns wether the chat message is a forward message or not.

Returns

True if it is a forward message, False otherwise

is_outgoing: bool

Returns wehther the message has been sent or received.

Returns

True if message has been sent, False if it has been received.

is_read: bool

Returns wether the message has been read or not.

Returns

True if message has been marked as read, False otherwise.

is_reply: bool

Returns wether the chat message is a reply message or not.

Returns

True if it is a reply message, False otherwise

is_secured: bool

Get if the message was encrypted when transfered.

Returns

True if the message was encrypted when transfered, False otherwise.

is_text: bool

Return whether or not a chat message is a text.

Returns

Whether or not the message is a text Deprecated since version 06/07/2020 check if ChatMessage.contents contains a Content.

with a PlainText content type.

local_address: Address

Returns the local address the message was sent or received with.

Returns

the Address of the local address used to send/receive this message.

message_id: str

Get the message identifier. It is used to identify a message so that it can be notified as delivered and/or displayed.

Returns

The message identifier.

own_reaction: ChatMessageReaction | None

Returns our own reaction for a given chat message, if any.

Returns

Our own ChatMessageReaction for that message if any, None otherwise.

reactions: list[ChatMessageReaction]

Gets the list of reactions received for this chat message. Warning: list is ordered by content of reaction message, not by received timestamp!

Returns

The sorted list of reaction if any.

reply_message: ChatMessage | None

Returns the ChatMessage this message is a reply to.

Returns

the original message ChatMessage.

reply_message_id: str | None

Returns the ID of the message this is a reply to.

Returns

the original message id.

reply_message_sender_address: Address | None

Returns the address of the sender of the message this is a reply to.

Returns

the original message sender Address.

Get the state of the message.

Returns

the current ChatMessageState of the message.

text_content: str | None

Gets the text content if available as a string.

Returns

the Content buffer if available in System Locale, null otherwise.
Deprecated since version 01/07/2020. Use ChatMessage.utf8_text instead..

time: int

Get the time the message was sent.

Returns

the timestamp of when the message was sent.

to_address: Address

Get destination of the message.

Returns

the Address of the recipient.

to_be_stored: bool

Get if a chat message is to be stored.

Returns

Whether or not the message is to be stored

utf8_text: str | None

Get text part of this message. Introduced in 01/07/2020

Returns

The text in UTF8 or None if no text.

def add_listener(self, listener: ChatMessageListener):

Adds a listener to this ChatMessage object

Parameters
def remove_listener(self, listener: ChatMessageListener):

Removes a listener from this this ChatMessage object

Parameters
def add_content(self, content: Content):

Adds a content to the ChatMessage.

Parameters
  • content: the Content object to add.
def add_custom_header(self, header_name: str, header_value: str | None):

Add custom headers to the message.

Parameters
  • header_name: name of the header
  • header_value: header value
def add_file_content(self, content: Content):

Adds a file content to the ChatMessage.

Parameters
  • content: the Content object to add.
def add_text_content(self, text: str):

Creates a Content of type PlainText with the given text as body.

Parameters
def add_utf8_text_content(self, text: str):

Creates a Content of type PlainText with the given text as body. Introduced in 01/07/2020

Parameters
  • text: The text in UTF8 to add to the message.
def cancel_file_transfer(self):

Cancel an ongoing file transfer attached to this message. (upload or download)

def create_reaction(self, utf8_reaction: str) -> ChatMessageReaction:

Creates a emoji reaction for the given chat mesage. To send it, use ChatMessageReaction.send.

Parameters
  • utf8_reaction: the emoji character(s) as UTF-8.
Returns

a ChatMessageReaction object.

def download_content(self, content: Content) -> bool:

Start the download of the Content referenced in the ChatMessage from remote server.

Parameters
Returns

False if there is an error, True otherwise.

def get_custom_header(self, header_name: str) -> str | None:

Retrieve a custom header value given its name.

Parameters
  • header_name: header name searched
Returns

the custom header value or None if not found.

def get_participants_by_imdn_state( self, state: ChatMessageState) -> list[ParticipantImdnState]:

Gets the list of participants for which the imdn state has reached the specified state and the time at which they did.

Parameters
  • state: The LinphoneChatMessageState the imdn have reached (only use LinphoneChatMessageStateDelivered, LinphoneChatMessageStateDeliveredToUser, LinphoneChatMessageStateDisplayed and LinphoneChatMessageStateNotDelivered)
Returns

The list of participants.

def has_conference_invitation_content(self) -> bool:

Returns wether the chat message has a conference invitation content or not.

Returns

True if it has one, False otherwise.

def has_text_content(self) -> bool:

Returns wether the chat message has a text content or not.

Returns

True if it has one, False otherwise. Deprecated since version 27/10/2020. Check if ChatMessage.contents contains a.

Content for which it's content type is PlainText.

def put_char(self, character: int) -> int:

Fulfill a chat message char by char. Message linked to a Real Time Text Call send char in realtime following RFC 4103/T.140 To commit a message, use linphone_chat_room_send_message

Parameters
  • character: T.140 char
Returns

0 if succeed.

def remove_content(self, content: Content):

Removes a content from the ChatMessage.

Parameters
  • content: the Content object to remove.
def remove_custom_header(self, header_name: str):

Removes a custom header from the message.

Parameters
  • header_name: name of the header to remove
def send(self):

Send a chat message.

class ChatMessageReaction:

A chat message reaction is an emoji sent by someone in the same chat room to react to a specific ChatMessage. To create a ChatMessageReaction, use ChatMessage.create_reaction. Once you are ready, send the reaction using ChatMessageReaction.send. Reactions are available using ChatMessage.reactions and will be notified using dedicated callbacks either in #LinphoneCoreListener or

LinphoneChatMessageListener.

body: str

Returns the emoji(s) used for the reaction.

Returns

the emoji(s) used as UTF-8 characters.

call_id: str

Allows to get the Call ID associated with a ChatMessageReaction.

Returns

the Call ID associated with this reaction.

from_address: Address

Returns the Address of the participant that sent this reaction.

Returns

the Address that sent this reaction.

def send(self):
class ChatRoom:

A chat room is the place where ChatMessage are exchanged. To create (or find) a ChatRoom, you first need a ChatRoomParams object. A chat room is uniquely identified by it's local and remote SIP addresses, meaning you can only have one chat room between two accounts (unless the backend is ChatRoomBackend.FlexisipChat). Then you can call Core.search_chat_room or Core.create_chat_room. Be careful as a ChatRoomBackend.FlexisipChat backend ChatRoom will be created asynchronously, so make sure you add a ChatRoomListener to the returned object to be notified when it will be in state ChatRoomState.Created. All chat rooms are loaded from database when the Core starts, and you can get them using Core.chat_rooms. This method doesn't return empty chat rooms nor ones for which the local address doesn't match an existing ProxyConfig identity, unless you specify otherwise in the [misc] section of your configuration file by setting hide_empty_chat_rooms=0 and/or hide_chat_rooms_from_removed_proxies=0.

call: Call | None

Gets the current call associated to this chatroom if any To commit a message, use ChatMessage.send

Returns

Call or None.

capabilities: int

Get the capabilities of a chat room.

Returns

The capabilities of the chat room (as a LinphoneChatRoomCapabilitiesMask)

char: int

When realtime text is enabled CallParams.realtime_text_enabled, LinphoneCoreIsComposingReceivedCb is call everytime a char is received from peer. At the end of remote typing a regular ChatMessage is received with committed data from LinphoneCoreCbsMessageReceivedCb.

Returns

RFC 4103/T.140 char

composing_addresses: list[Address]

Gets the list of participants that are currently composing.

Returns

List of addresses that are in the is_composing state.

conference_address: Address | None

Get the conference address of the chat room.

Returns

The conference address of the chat room or None if this type of chat room is not conference based.

core: Core

Returns back pointer to Core object.

Returns

the Core object this chat room is attached to.

creation_time: int

Return the creation time for the chat room.

Returns

the time at which the chat room was created

current_callbacks: ChatRoomListener | None

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

Returns

The LinphoneChatRoomCbs that has called the last callback

current_params: ChatRoomParams

Returns current parameters associated with the chat room. This is typically the parameters passed at chat room chat_roomeation to linphone_core_chat_roomeate_chat_room() or some default parameters if no ChatRoomParams was explicitely passed during chat room chat_roomeation.

Returns

the current ChatRoomParams parameters.

document_contents: list[Content]

Gets all contents for which content-type starts with either text/ or application/.

Returns

A list of contents considered as "document".

ephemeral_enabled: bool

Returns whether or not the ephemeral message feature is enabled in the chat room.

Returns

True if ephemeral is enabled, False otherwise.

ephemeral_lifetime: int

Get lifetime (in seconds) for all new ephemeral messages in the chat room. After the message is read, it will be deleted after "time" seconds. seealso ChatRoom.ephemeral_enabled.

Returns

the ephemeral lifetime (in secoonds)

ephemeral_mode: ChatRoomEphemeralMode

Get the ephemeral mode of the chat room. seealso ChatRoom.ephemeral_enabled.

Returns

the ephemeral mode ChatRoomEphemeralMode

history_events_size: int

Gets the number of events in a chat room.

Returns

the number of events.

history_size: int

Gets the number of messages in a chat room.

Returns

the number of messages.

is_empty: bool

Returns whether or not a ChatRoom has at least one ChatMessage or not.

Returns

True if there are no ChatMessage, False otherwise.

is_read_only: bool

Return whether or not a message can be sent using this chat room. A chat room may be read only until it's created, or when it's a group you have left.

Returns

True if a chat message can't be sent in it, False otherwise.

is_remote_composing: bool

Tells whether the remote is currently composing a message.

Returns

True if the remote is currently composing a message, False otherwise.

last_message_in_history: ChatMessage | None

Gets the last chat message sent or received in this chat room.

Returns

the latest ChatMessage or None if no message.

last_update_time: int

Return the last updated time for the chat room.

Returns

the last updated time

local_address: Address

Get the local address associated to this chat room.

Returns

The local address.

me: Participant | None

Get the participant representing myself in the chat room.

Returns

The participant representing myself in the conference or None if me is not set.

media_contents: list[Content]

Gets all contents for which content-type starts with either video/, audio/ or image/.

Returns

A list of contents considered as "media".

muted: bool

Gets if a chat room has been flagged as muted (not by default). A muted chat room isn't used to compute unread messages total count.

Returns

True if the chat room is muted, False otherwise.

nb_participants: int

Get the number of participants in the chat room (that is without ourselves).

Returns

The number of participants in the chat room

participants: list[Participant]

Get the list of participants of a chat room.

Returns

A of the participants

peer_address: Address

Get the peer address associated to this chat room.

Returns

The peer address.

security_level: ChatRoomSecurityLevel

Get the security level of a chat room.

Returns

The current ChatRoomSecurityLevel of the chat room

state: ChatRoomState

Get the state of the chat room.

Returns

The current ChatRoomState of the chat room

subject: str | None

Get the subject of a chat room.

Returns

The subject of the chat room.

unread_history: list[ChatMessage]

Gets all unread messages for this chat room, sorted from oldest to most recent.

Returns

A list of unread chat messages.

unread_messages_count: int

Gets the number of unread messages in the chatroom.

Returns

the number of unread messages.

def add_listener(self, listener: ChatRoomListener):

Adds a listener to this ChatRoom object

Parameters
def remove_listener(self, listener: ChatRoomListener):

Removes a listener from this this ChatRoom object

Parameters
def state_to_string(state: ChatRoomState) -> str:

Converts a ChatRoomState enum to a string.

Parameters
Returns

the string representation of the ChatRoomState

def add_participant(self, addr: Address):

Add a participant to a chat room. This may fail if this type of chat room does not handle participants. Use ChatRoom.can_handle_participants to know if this chat room handles participants.

Parameters
  • addr: The address of the participant to add to the chat room
def add_participants(self, addresses: list[Address]) -> bool:

Add several participants to a chat room at once. This may fail if this type of chat room does not handle participants. Use ChatRoom.can_handle_participants to know if this chat room handles participants.

Parameters
  • addresses: The participants to add.
Returns

True if everything is OK, False otherwise

def allow_cpim(self):

Allow cpim on a basic chat room .

def allow_multipart(self):

Allow multipart on a basic chat room .

def can_handle_participants(self) -> bool:

Tells whether a chat room is able to handle participants.

Returns

True if the chat room can handle participants, False otherwise

def compose(self):

Notifies the destination of the chat message being composed that the user is typing a new message.

def create_empty_message(self) -> ChatMessage:

Creates an empty message attached to the given chat room.

Returns

a new ChatMessage

def create_file_transfer_message(self, initial_content: Content) -> ChatMessage:

Creates a message attached to the given chat room with a particular content. Use ChatMessage.send to initiate the transfer

Parameters
  • initial_content: Content initial content.
Returns

a new ChatMessage

def create_forward_message(self, message: ChatMessage) -> ChatMessage:

Creates a forward message attached to the given chat room with a particular message.

Parameters
Returns

a new ChatMessage

def create_message(self, message: str | None) -> ChatMessage:

Creates a message attached to the given chat room with a plain text content filled with the given message.

Parameters
  • message: text message, None if absent.
Returns

a new ChatMessage
Deprecated since version 01/07/2020. Use ChatRoom.create_message_from_utf8 instead..

def create_message_from_utf8(self, message: str | None) -> ChatMessage:

Creates a message attached to the given chat room with a plain text content filled with the given message. Introduced in 01/07/2020

Parameters
  • message: text message in UTF8, None if absent.
Returns

a new ChatMessage

def create_reply_message(self, message: ChatMessage) -> ChatMessage:

Creates a reply message attached to the given chat room with a particular message.

Parameters
Returns

a new ChatMessage

def create_voice_recording_message(self, recorder: Recorder) -> ChatMessage:

Creates a chat message with a voice recording attached to the given chat room.

If the recorder isn't in Closed state, it will return an empty

message!

Parameters
  • recorder: the Recorder object used to record the voice message.
Returns

a new ChatMessage

def delete_history(self):

Delete all messages from the history.

def delete_message(self, message: ChatMessage):

Delete a message from the chat room history.

Parameters
def ephemeral_supported_by_all_participants(self) -> bool:

Uses linphone spec to check if all participants support ephemeral messages. It doesn't prevent to send ephemeral messages in the room but those who don't support it won't delete messages after lifetime has expired. seealso ChatRoom.ephemeral_enabled.

Returns

True if all participants in the chat room support ephemeral messages, False otherwise

def find_message(self, message_id: str) -> ChatMessage | None:

Gets the chat message sent or received in this chat room that matches the message_id.

Parameters
  • message_id: The id of the message to find
Returns

the ChatMessage if found or None.

def find_participant(self, address: Address) -> Participant | None:

Find a participant of a chat room from its address.

Parameters
  • address: The Address to search in the list of participants of the chat room
Returns

The participant if found, None otherwise.

def get_history(self, nb_message: int) -> list[ChatMessage]:

Gets nb_message most recent messages from chat_room chat room, sorted from oldest to most recent.

Parameters
  • nb_message: Number of message to retrieve. 0 means everything.
Returns

A list of chat messages.

def get_history_events(self, nb_events: int) -> list[EventLog]:

Gets nb_events most recent events from chat_room chat room, sorted from oldest to most recent.

Parameters
  • nb_events: Number of events to retrieve. 0 means everything.
Returns

The list of the most recent events.

def get_history_message_events(self, nb_events: int) -> list[EventLog]:

Gets nb_events most recent chat message events from chat_room chat room, sorted from oldest to most recent.

Parameters
  • nb_events: Number of events to retrieve. 0 means everything.
Returns

A list

def get_history_range(self, begin: int, end: int) -> list[ChatMessage]:

Gets the partial list of messages in the given range, sorted from oldest to most recent.

Parameters
  • begin: The first message of the range to be retrieved. History most recent message has index 0.
  • end: The last message of the range to be retrieved. History oldest message has index of history size - 1 (use ChatRoom.history_size to retrieve history size)
Returns

A list of chat messages.

def get_history_range_events(self, begin: int, end: int) -> list[EventLog]:

Gets the partial list of events in the given range, sorted from oldest to most recent.

Parameters
  • begin: The first event of the range to be retrieved. History most recent event has index 0.
  • end: The last event of the range to be retrieved. History oldest event has index of history size - 1
Returns

The list of the found events.

def get_history_range_message_events(self, begin: int, end: int) -> list[EventLog]:

Gets the partial list of chat message events in the given range, sorted from oldest to most recent.

Parameters
  • begin: The first event of the range to be retrieved. History most recent event has index 0.
  • end: The last event of the range to be retrieved. History oldest event has index of history size - 1
Returns

The list of chat message events.

def has_been_left(self) -> bool:

Return whether or not the chat room has been left.

Returns

True if the chat room has been left, False otherwise. Deprecated since version 16/03/2022 use ChatRoom.is_read_only instead..

def has_capability(self, mask: int) -> bool:

Check if a chat room has given capabilities.

Parameters
  • mask: a LinphoneChatRoomCapabilitiesMask mask
Returns

True if the mask matches, False otherwise

def leave(self):

Leave a chat room.

def mark_as_read(self):

Mark all messages of the conversation as read.

def notify_participant_device_registration(self, participant_device: Address):

Notify the chatroom that a participant device has just registered. This function is meaningful only for server implementation of chatroom, and shall not by used by client applications.

Parameters
  • participant_device: list of the participant devices to be used by the group chat room
def receive_chat_message(self, message: ChatMessage):

Used to receive a chat message when using async mechanism with IM enchat_roomyption engine.

Parameters
def remove_participant(self, participant: Participant):

Remove a participant of a chat room.

Parameters
  • participant: The participant to remove from the chat room
def remove_participants(self, participants: list[Participant]):

Remove several participants of a chat room at once.

Parameters
  • participants: The participants to remove.
def set_participant_admin_status(self, participant: Participant, is_admin: bool):

Change the admin status of a participant of a chat room (you need to be an admin yourself to do this).

Parameters
  • participant: The Participant for which to change the admin status
  • is_admin: A boolean value telling whether the participant should now be an admin or not
def set_participant_devices( self, participant_address: Address, device_identities: list[ParticipantDeviceIdentity]):

Set the list of participant devices in the form of SIP URIs with GRUUs for a given participant. This function is meaningful only for server implementation of chatroom, and shall not by used by client applications.

Parameters
  • participant_address: The participant address
  • device_identities: List of the participant devices to be used by the group chat room
class ChatRoomParams:

Object defining parameters for a ChatRoom. Can be created with Core.create_default_chat_room_params. You can use ChatRoomParams.is_valid to check if your configuration is valid or not. If the ChatRoom backend is ChatRoomBackend.Basic, then no other parameter is required, but ChatMessage sent and received won't benefit from all features a ChatRoomBackend.FlexisipChat can offer like conversation with multiple participants and a subject, end-to-end encryption, ephemeral messages, etc... but this type is the only one that can interoperate with other SIP clients or with non-flexisip SIP proxies.

backend: ChatRoomBackend

Get the backend implementation of the chat room associated with the given parameters.

Returns

the ChatRoomBackend

encryption_backend: ChatRoomEncryptionBackend

Get the encryption implementation of the chat room associated with the given parameters.

Returns

the ChatRoomEncryptionBackend

encryption_enabled: bool

Get the encryption status of the chat room associated with the given parameters.

Returns

True if encryption is enabled, False otherwise

ephemeral_lifetime: int

Get lifetime (in seconds) for all new ephemeral messages in the chat room. After the message is read, it will be deleted after "time" seconds. seealso linphone_chat_room_params_ephemeral_enabled().

Returns

the ephemeral lifetime (in seconds)

ephemeral_mode: ChatRoomEphemeralMode

Get the ephemeral message mode of the chat room associated with the given parameters.

Returns

the ephemeral message mode ChatRoomEphemeralMode

group_enabled: bool

Get the group chat status of the chat room associated with the given parameters.

Returns

True if group chat is enabled, False if one-to-one

is_valid: bool

Returns whether the given parameters are valid or not.

Returns

True if the given parameters are valid, False otherwise

rtt_enabled: bool

Get the real time text status of the chat room associated with the given parameters.

Returns

True if real time text is enabled, False otherwise

subject: str | None

Get the subject of the chat room.

Returns

The subject.

class Conference:

A conference is the object that allow to make calls when there are 2 or more participants. To create (or find) a Conference, you first need a ConferenceParams object. Core.create_conference_with_params allows you to create a conference. A conference is uniquely identified by a conference address, meaning you can have more than one conference between two accounts. As of now, each Core can host only 1 conference but it can be part of many conferences as a remote participant. To find a conference among those a core is part of, you can call Core.search_conference.

active_speaker_participant_device: ParticipantDevice | None

Get the currently active speaker participant device.

Returns

the ParticipantDevice currently displayed as active speaker.

call: Call | None

Gets the call that is controlling a conference.

Returns

the Call controlling the conference or None if none or local conference

conference_address: Address | None

Get the conference address of the conference. This function may be return a None pointer if called before the conference switches to the Created state

Returns

The conference address of the conference.

core: Core

Returns core for a Conference.

Returns

back pointer to Core object. Returns back pointer to Core object.

current_callbacks: ConferenceListener

Sets the current LinphoneConferenceCbs. This is meant only to be called from a callback to be able to get the user_data associated with the LinphoneConferenceCbs that is calling the callback.

Returns

The ConferenceListener that has called the last callback.

current_params: ConferenceParams

Get current parameters of the conference.

Returns

a ConferenceParams .

duration: int | None

Get the conference duration.

Returns

conference duration.

ID: str

Get the conference id as string.

Returns

the conference id
Deprecated since version 10/07/2020 Use Conference.conference_address instead..

input_audio_device: AudioDevice | None

Gets the current input device for this conference.

Returns

the AudioDevice used by this conference as input or None if there is currently no soundcard configured (depending on the state of the conference)

input_volume: float

Retrieves the volume of a specific participant.

Returns

The volume of the participant expressed in dbm0.

is_in: bool

For a local conference, it returns whether the local participant is enabled For a remote conference, it return whether the remote participant has left the conference without bein removed from it.

Returns

True if the local participant is in a conference, False otherwise.

is_recording: bool

Gets whether the conference is currently being recorded.

Returns

True if conference is being recorded, False otherwise.

For a local audio video conference, this function returns the participant hosting the conference For a remote audio video conference, this function returns the local participant of the conference.

Returns

a Participant .

microphone_muted: bool

Retrieves the volume of a specific participant.

Returns

The volume of the participant expressed in dbm0.

output_audio_device: AudioDevice | None

Gets the current output device for this conference.

Returns

the AudioDevice used by this conference as output or None if there is currently no soundcard configured (depending on the state of the conference)

participant_count: int

Get number of participants without me.

Returns

the number of participants excluding me in a Conference

participant_device_list: list[ParticipantDevice]

Get list of all participant devices of a conference including me if it is in.

Returns

The list of participant devices of the conference.

participant_list: list[Participant]

Get list of all participants of a conference.

The returned list does not include me.
Returns

The list of participants of the conference.

participants: list[Address]

Get URIs of all participants of one conference The returned bctbx_list_t contains URIs of all participants. That list must be freed after use and each URI must be unref with linphone_address_unref

The returned list does not include me.
Returns

The list of the participants' address active in the conference.

Deprecated since version 10/07/2020 Use Conference.participant_list instead..

player: Player | None

Gets a player associated with the conference to play a local file and stream it to the remote peers.

Returns

A Player object.

screen_sharing_participant: Participant | None

Get the participant that is currently screen sharing.

Returns

a pointer to the participant found or nullptr.

screen_sharing_participant_device: ParticipantDevice | None

Get the participant device that is currently screen sharing.

Returns

a pointer to the participant device found or nullptr.

start_time: int | None

Get the conference start time.

Returns

conference start time.

Get the current state of the conference.

Returns

the ConferenceState of the conference.

subject: str | None

Get the conference subject.

Returns

conference subject.

username: str | None

Get the conference username.

Returns

conference subject.

def add_listener(self, listener: ConferenceListener):

Adds a listener to this Conference object

Parameters
def remove_listener(self, listener: ConferenceListener):

Removes a listener from this this Conference object

Parameters
def add_participant(self, uri: Address) -> int:

Join a participant to the conference.

Parameters
  • uri: a Address that has to be added to the conference.
This function guarantees that the local endpoint is added to the

conference only if there is a call state StreamsRunning towards one of the addresses. It is highly recommended to call linphone_confererence_enter() to guarantee that the local endpoint is added to the conference.

def add_participants(self, addresses: list[Address]) -> int:

Add participants to the conference, by supplying a list of Address.

Parameters
  • addresses: A list of calls to add to the conference.
def enter(self) -> int:

For a local conference, the local participant joins the conference For a remote conference, the participant rejoins the conference after leaving it earlier on.

Returns

0 if succeeded. Negative number if failed

def find_participant(self, uri: Address) -> Participant | None:

Find a participant from a conference.

Parameters
  • uri: SIP URI of the participant to search.
Returns

a pointer to the participant found or nullptr.

def get_participant_device_volume(self, device: ParticipantDevice) -> int:

Retrieves the volume of a specific participant.

Parameters
  • device: The Participant
Returns

The volume of the participant expressed in dbm0.

def invite_participants( self, addresses: list[Address], params: CallParams | None) -> int:

Invite participants to the conference, by supplying a list of Address If the conference is in the state LinphoneConferenceStateCreationPending, then the conference will start on the input and output audio devices used for the currently active call, if any.

Parameters
  • addresses: A list of SIP addresses to invite.
  • params: CallParams to use for inviting the participants.
def is_me(self, uri: Address) -> bool:

For a local audio video conference, this function compares the address provided as argument with that of participant hosting the conference For a remote audio video conference, this function compares the address provided as argument with that of the local participant of the conference.

Parameters
Returns

True if the participant is me, False otherwise.

def leave(self) -> int:

For a local conference, the local participant leaves the conference For a remote conference, the participant leaves the conference after joining it earlier on.

Returns

0 if succeeded. Negative number if failed

def remove_participant(self, call: Call) -> int:
Parameters
  • call: call to remove
Returns

0 if succeeded, -1 if failed Deprecated since version 10/07/2020 Use Conference.remove_participant instead..

def set_local_participant_stream_capability( self, direction: MediaDirection, _type: StreamType):

Set stream capability on me device of a local conference.

Parameters
  • direction: the direction of stream of type stream_type
def set_participant_admin_status(self, participant: Participant, is_admin: bool):

Change the admin status of a participant of a conference (you need to be an admin yourself to do this).

Parameters
  • participant: The Participant for which to change the admin status
  • is_admin: A boolean value telling whether the participant should now be an admin or not
def start_recording(self, path: str) -> int:

Starts recording the conference.

Parameters
  • path: Where to record the conference
Returns

0 if succeeded. Negative number in case of failure.

def stop_recording(self) -> int:

Stops the conference recording.

Returns

0 if succeeded. Negative number in case of failure.

def terminate(self) -> int:

Terminates conference.

Returns

0 if the termination is successful, -1 otherwise.

def update_params(self, params: ConferenceParams) -> int:

Update parameters of the conference. This is typically used enable or disable the video stream in the conference.

Parameters
  • params: the new parameters to apply.
class ConferenceInfo:

Object defining all information related to a conference.

date_time: int

Retrieve the date and time of the conference.

Returns

The date and time of the conference.

description: str | None

Retrieve the description of the conference.

Returns

The description of the conference.

duration: int

Retrieve the duration (in minutes) of the conference.

Returns

The duration of the conference.

icalendar_string: str | None

Retrieve the conference as an Icalendar string.

Returns

The conference as an Icalendar string. The returned char* must be freed by the caller.

organizer: Address | None

Retrieve the organizer of the conference.

Returns

The Address of the conference's organizer.

participant_infos: list[ParticipantInfo]

Retrieve the list of participants as list of participant infos.

Returns

The list of participant informations.

participants: list[Address]

Retrieve the list of participants as list of addresses.

Returns

The list of participants.
Deprecated since version 24/08/2023 use linphone_conference_info_get_participant_infos.

instead

security_level: ConferenceSecurityLevel

Retrieve the desired security level of the conference.

Returns

The desired security level of the conference.

state: ConferenceInfoState | None

Retrieve the state of the conference info.

Returns

ConferenceInfoState object.

subject: str | None

Retrieve the subject of the conference.

Returns

The subject of the conference.

uri: Address | None

Retrieve the URI of the conference.

Returns

The URI of the conference (Address).

def add_participant(self, participant_info: ParticipantInfo):

Add a participant to the conference.

Parameters
  • participant_info: The participant information (ParticipantInfo) to add. This method can be called to set attributes such as the role to the organizer of the conference
def add_participant_infos(self, participant_infos: list[ParticipantInfo] | None):

Add a list of participants.

Parameters
  • participant_infos: The list of participant informations to add.
def clone(self) -> ConferenceInfo:

Clone an object ConferenceInfo.

Returns

the cloned ConferenceInfo object.

def find_participant( self, participant: Address) -> ParticipantInfo | None:

Find a participant information in the conference information.

Parameters
  • participant: The participant (Address) to search.
Returns

The participant information (ParticipantInfo).

def remove_participant(self, participant: Address):

Remove a participant from the conference.

Parameters
  • participant: The participant (Address) to remove.
def update_participant(self, participant_info: ParticipantInfo):

Update the participant information in the conference informations.

Parameters
  • participant_info: The participant information (ParticipantInfo) to update. This method can be called to change attributes such as the role to the organizer of the conference
class ConferenceParams:

Object defining parameters for a Conference. Can be created by calling function Core.create_conference_params.

account: Account | None

Returns the account for the conference.

Returns

a pointer to the account or None if it is not set.

audio_enabled: bool

Check whether audio capabilities are enabled.

Returns

True if the conference supports audio capabilities, False otherwise

chat_enabled: bool

Check whether chat capabilities are enabled.

Returns

True if the conference supports chat capabilities, False otherwise

conference_factory_address: Address | None

Get the conference factory address of the conference that has been set.

Returns

the factory address conference description.

description: str | None

Get conference description.

Returns

the conference description.

end_time: int

Get the end time of the conference.

Returns

end time of a conference as time_t type or 0 for open end of a conference. For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

is_audio_enabled: bool

Check whether audio capabilities are enabled.

Returns

True if the conference supports audio capabilities, False otherwise Deprecated since version 16/12/2021 Use ConferenceParams.audio_enabled instead..

is_chat_enabled: bool

Check whether chat capabilities are enabled.

Returns

True if the conference supports chat capabilities, False otherwise Deprecated since version 16/12/2021 Use ConferenceParams.chat_enabled instead..

is_hidden: bool

Get the value of the hidden flag.

Returns

whether the conference is hidden or not

is_local_participant_enabled: bool

Returns whether local participant has to enter the conference.

Returns

True if local participant is by default part of the conference, False otherwise Deprecated since version 16/12/2021 Use ConferenceParams.local_participant_enabled.

instead.

is_one_participant_conference_enabled: bool

Returns whether conference can have only one participant.

Returns

True if the conference can have only one participant, False otherwise Deprecated since version 16/12/2021 Use.

ConferenceParams.one_participant_conference_enabled instead.

is_video_enabled: bool

Check whether video capabilities are enabled.

Returns

True if the conference supports video capabilities, False otherwise Deprecated since version 16/12/2021 Use ConferenceParams.video_enabled instead..

local_participant_enabled: bool

Returns whether local participant has to enter the conference.

Returns

True if local participant is by default part of the conference, False otherwise

one_participant_conference_enabled: bool

Returns whether conference can have only one participant.

Returns

True if the conference can have only one participant, False otherwise

participant_list_type: ConferenceParticipantListType

Get the participant list type.

Returns

participant list type ConferenceParticipantListType.

proxy_cfg: ProxyConfig | None

Returns the proxy configuration for the conference.

Returns

a pointer to the proxy configuration or None if it is not set.
Deprecated since version 11/01/2022 Use ConferenceParams.account instead..

security_level: ConferenceSecurityLevel

Retrieve the desired security level of the conference.

Returns

The desired security level of the conference.

start_time: int

Get the start time of the conference.

Returns

start time of a conference as time_t type or 0 for immediate start of a conference. For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

subject: str | None

Get conference subject.

Returns

the conference subject.

video_enabled: bool

Check whether video capabilities are enabled.

Returns

True if the conference supports video capabilities, False otherwise

def set_hidden(self, hidden: bool):

Set the conference as hidden. This means that the contact address will not have any conference releated attribute such as isfocus, the conference ID and the admin status.

Parameters
  • hidden: Boolean that states whether the conference is hidden or not
def clone(self) -> ConferenceParams:

Clone a ConferenceParams.

Returns

An allocated ConferenceParams with the same parameters than params

class ConferenceScheduler:

Object used to create remote conferences and send ICS to notify participants.

account: Account | None

Get the Account that is used for the conference scheduler.

Returns

The selected Account for the call, or None if none has been selected.

core: Core

Gets the Core from a ConferenceScheduler object.

Returns

the Core object.

current_callbacks: ConferenceSchedulerListener | None

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

Returns

The ConferenceSchedulerListener that has called the last callback.

info: ConferenceInfo | None

Returns the ConferenceInfo currently set in this scheduler.

Returns

the currently configured ConferenceInfo or None if none is set.

def add_listener(self, listener: ConferenceSchedulerListener):

Adds a listener to this ConferenceScheduler object

Parameters
def remove_listener(self, listener: ConferenceSchedulerListener):

Removes a listener from this this ConferenceScheduler object

Parameters
def cancel_conference(self, conference_info: ConferenceInfo | None):

Cancel the conference linked to the ConferenceInfo provided as argument.

Parameters
  • conference_info: the ConferenceInfo object to linked to the conference to cancel.
def send_invitations(self, chat_room_params: ChatRoomParams):

Sends an invitation to the scheduled conference to each participant by chat, using given chat rooms params to use/create the chat room in which to send it.

Parameters
  • chat_room_params: the ChatRoomParams object to use to use/create the ChatRoom that will be used to send the invite.
class Config:

This object is used to manipulate a configuration file. The format of the configuration file is a .ini like format: Various types can be used: strings and lists of strings, integers, floats, booleans (written as 0 or 1) and range of integers. Usually a Core is initialized using two Config, one default (where configuration changes through API calls will be saved) and one named 'factory' which is read-only and overwrites any setting that may exists in the default one. It is also possible to use only one (either default or factory) or even none.

is_readonly: bool

Indicates whether the LinphoneConfig object is readonly, in other words it has no file backend or file is opened without write permission.

Returns

a boolean.

sections_names_list: list

Returns the list of sections' names in the LinphoneConfig.

Returns

A list of strings.

def new_for_shared_core( app_group_id: str, config_filename: str | None, factory_config_filename: str | None) -> Config | None:

Instantiates a Config object from a user config file name, group id and a factory config file. The "group id" is the string that identify the "App group" capability of the iOS application. App group gives access to a shared file system where all the configuration files for shared core are stored. Both iOS application and iOS app extension that need shared core must activate the "App group" capability with the SAME "group id" in the project settings. The caller of this constructor owns a reference. linphone_config_unref must be called when this object is no longer needed.

Parameters
  • app_group_id: used to compute the path of the config file in the file system shared by the shared Cores
  • config_filename: the filename of the user config file to read to fill the instantiated Config
  • factory_config_filename: the filename of the factory config file to read to fill the instantiated Config
    seealso linphone_config_new.
Returns

a Config object
The user config file is read first to fill the Config and then the factory config file is read. Therefore the configuration parameters defined in the user config file will be overwritten by the parameters defined in the factory config file.

def new_from_buffer(buffer: str) -> Config:

Instantiates a Config object from a user provided buffer. The caller of this constructor owns a reference. linphone_config_unref must be called when this object is no longer needed.

Parameters

seealso linphone_config_new.

Returns

a Config object

def new_with_factory( config_filename: str | None, factory_config_filename: str | None) -> Config | None:

Instantiates a Config object from a user config file and a factory config file. The caller of this constructor owns a reference. linphone_config_unref must be called when this object is no longer needed.

Parameters
  • config_filename: the filename of the user config file to read to fill the instantiated Config
  • factory_config_filename: the filename of the factory config file to read to fill the instantiated Config
    seealso linphone_config_new.
Returns

a Config object
The user config file is read first to fill the Config and then the factory config file is read. Therefore the configuration parameters defined in the user config file will be overwritten by the parameters defined in the factory config file.

def clean_entry(self, section: str, key: str):

Removes entries for key,value in a section.

Parameters
  • section: the section for which to clean the key entry
  • key: the key to clean
def clean_section(self, section: str):

Removes every pair of key,value in a section and remove the section.

Parameters
  • section: the section to clean
def dump(self) -> str:

Dumps the Config as INI into a buffer.

Returns

The buffer that contains the config dump

def dump_as_xml(self) -> str:

Dumps the Config as XML into a buffer.

Returns

The buffer that contains the XML dump

def get_bool(self, section: str, key: str, default_value: bool) -> bool:

Retrieves a configuration item as a boolean, given its section, key, and default value. The default boolean value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found value or default_value if not found.

def get_default_float(self, section: str, key: str, default_value: float) -> float:

Retrieves a default configuration item as a float, given its section, key, and default value. The default float value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve the default value
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found default value or default_value if not found.

def get_default_int(self, section: str, key: str, default_value: int) -> int:

Retrieves a default configuration item as an integer, given its section, key, and default value. The default integer value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve the default value
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found default value or default_value if not found.

def get_default_int64(self, section: str, key: str, default_value: int) -> int:

Retrieves a default configuration item as a 64 bit integer, given its section, key, and default value. The default integer value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve the default value
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found default value or default_value if not found.

def get_default_string(self, section: str, key: str, default_value: str) -> str:

Retrieves a default configuration item as a string, given its section, key, and default value. The default value string is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve the default value
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found default value or default_value if not found.

def get_float(self, section: str, key: str, default_value: float) -> float:

Retrieves a configuration item as a float, given its section, key, and default value. The default float value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found value or default_value if not found.

def get_int(self, section: str, key: str, default_value: int) -> int:

Retrieves a configuration item as an integer, given its section, key, and default value. The default integer value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found value or default_value if not found.

def get_int64(self, section: str, key: str, default_value: int) -> int:

Retrieves a configuration item as a 64 bit integer, given its section, key, and default value. The default integer value is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found
Returns

the found value or default_value if not found.

def get_keys_names_list(self, section: str) -> list:

Returns the list of keys' names for a section in the LinphoneConfig.

Parameters
  • section: The section name
Returns

A list of strings.

def get_overwrite_flag_for_entry(self, section: str, key: str) -> bool:

Retrieves the overwrite flag for a config item.

Parameters
  • section: The section from which to retrieve the overwrite flag
  • key: The name of the configuration item to retrieve the overwrite flag from.
Returns

True if overwrite flag is set, False otherwise.

def get_overwrite_flag_for_section(self, section: str) -> bool:

Retrieves the overwrite flag for a config section.

Parameters
  • section: The section from which to retrieve the overwrite flag
Returns

True if overwrite flag is set, False otherwise.

def get_section_param_string(self, section: str, key: str, default_value: str | None) -> str | None:

Retrieves a section parameter item as a string, given its section and key. The default value string is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve the default value
  • key: The name of the configuration item to retrieve
  • default_value: The default value to return if not found.
Returns

the found default value or default_value if not found.

def get_skip_flag_for_entry(self, section: str, key: str) -> bool:

Retrieves the skip flag for a config item.

Parameters
  • section: The section from which to retrieve the skip flag
  • key: The name of the configuration item to retrieve the skip flag from
Returns

True if skip flag is set, False otherwise.

def get_skip_flag_for_section(self, section: str) -> bool:

Retrieves the skip flag for a config section.

Parameters
  • section: The section from which to retrieve the skip flag
Returns

True if skip flag is set, False otherwise.

def get_string(self, section: str, key: str, default_string: str | None) -> str | None:

Retrieves a configuration item as a string, given its section, key, and default value. The default value string is returned if the config item isn't found.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • default_string: The default value to return if not found.
Returns

the found value or the default one if not found.

def get_string_list(self, section: str, key: str, default_list: list | None) -> list:

Retrieves a configuration item as a list of strings, given its section, key, and default value. The default value is returned if the config item is not found.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • default_list: The list to return when the key doesn't exist.
Returns

A list of strings.

def has_entry(self, section: str, key: str) -> int:

Returns if a given section with a given key is present in the configuration.

Parameters
  • section: to check if the given entry exists
  • key: to check if it exists
Returns

1 if it exists, 0 otherwise

def has_section(self, section: str) -> int:

Returns if a given section is present in the configuration.

Parameters
  • section: the section to check if exists
Returns

1 if it exists, 0 otherwise

def load_from_xml_file(self, filename: str) -> str:

Reads a xml config file and fill the Config with the read config dynamic values.

Parameters
  • filename: The filename of the config file to read to fill the Config
def load_from_xml_string(self, buffer: str) -> int:

Reads a xml config string and fill the Config with the read config dynamic values.

Parameters
  • buffer: The string of the config file to fill the Config
Returns

0 in case of success

def read_file(self, filename: str) -> int:

Reads a user config file and fill the Config with the read config values.

Parameters
  • filename: The filename of the config file to read to fill the Config
def relative_file_exists(self, filename: str) -> bool:

Check if given file name exists relatively to the current location.

Parameters
  • filename: The file name to check if exists
Returns

True if file exists relative to the to the current location

def reload(self):

Reload the config from the file.

def set_bool(self, section: str, key: str, value: bool):

Sets a boolean config item.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • value: the value to set
def set_float(self, section: str, key: str, value: float):

Sets a float config item.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • value: the value to set
def set_int(self, section: str, key: str, value: int):

Sets an integer config item.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • value: the value to set
def set_int64(self, section: str, key: str, value: int):

Sets a 64 bits integer config item.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • value: the value to set
def set_int_hex(self, section: str, key: str, value: int):

Sets an integer config item, but store it as hexadecimal.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • value: the value to set
def set_overwrite_flag_for_entry(self, section: str, key: str, value: bool):

Sets the overwrite flag for a config item (used when dumping config as xml)

Parameters
  • section: The section from which to set the overwrite flag
  • key: The name of the configuration item to set the overwrite flag from

  • value: The overwrite flag value to set

def set_overwrite_flag_for_section(self, section: str, value: bool):

Sets the overwrite flag for a config section (used when dumping config as xml)

Parameters
  • section: The section from which to set the overwrite flag
  • value: The overwrite flag value to set
def set_range(self, section: str, key: str, min_value: int, max_value: int):

Sets a range config item.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • min_value: the min value to set
  • max_value: the max value to set
def set_skip_flag_for_entry(self, section: str, key: str, value: bool):

Sets the skip flag for a config item (used when dumping config as xml)

Parameters
  • section: The section from which to set the skip flag
  • key: The name of the configuration item to set the skip flag from
  • value: The skip flag value to set
def set_skip_flag_for_section(self, section: str, value: bool):

Sets the skip flag for a config section (used when dumping config as xml)

Parameters
  • section: The section from which to set the skip flag
  • value: The skip flag value to set
def set_string(self, section: str, key: str, value: str | None):

Sets a string config item.

Parameters
  • section: The section from which to retrieve a configuration item
  • key: The name of the configuration item to retrieve
  • value: The value to set
def set_string_list(self, section: str, key: str, value: list | None):

Sets a string list config item.

Parameters
  • section: The name of the section to put the configuration item into
  • key: The name of the configuration item to set
  • value: The value to set.
def sync(self) -> int:

Writes the config file to disk.

Returns

0 if successful, -1 otherwise

def write_relative_file(self, filename: str, data: str):

Write a string in a file placed relatively with the Linphone configuration file.

Parameters
  • filename: Name of the file where to write data. The name is relative to the place of the config file
  • data: String to write
class Content:

This object holds data that can be embedded in a signaling message. Use Core.create_content to create it, and then you should set at least it's type and subtype and fill the buffer with your data. A Content can be multipart (contain other contents), have file information (name, path, size), be encrypted, have custom headers, etc... It is mainly used to send information through a ChatMessage.

creation_timestamp: int

Returns the creation timestamp if this content is a FileContent (received or sent by chat).

Returns

The timestamp at which this content was created if available, -1 otherwise.

disposition: str | None

Get the disposition of the Content, for example "recipient-list".

Returns

The disposition of the Content.

encoding: str | None

Get the encoding of the data buffer, for example "gzip".

Returns

The encoding of the data buffer.

file_duration: int

Gets the file duration in seconds, if information is available.

file_path: str | None

Get the file transfer filepath set for this content (replace linphone_chat_message_get_file_transfer_filepath).

Returns

The file path set for this content if it has been set, None otherwise.

file_size: int

Get the file size if content is either a FileContent or a FileTransferContent.

Returns

The represented file size.

is_file: bool

Tells whether or not this content contains a file.

Returns

True if this content contains a file, False otherwise.

is_file_encrypted: bool

Tells whether or not this content contains an encrypted file.

Returns

True is this content contains a file and this file is encrypted, false otherwise.

is_file_transfer: bool

Tells whether or not this content is a file transfer.

Returns

True if this content is a file transfer, False otherwise.

is_icalendar: bool

Tells whether or not this content contains an icalendar by checking it's content type.

Returns

True if this content type is 'text/calendar;conference-event=yes', False otherwise.

is_multipart: bool

Tell whether a content is a multipart content.

Returns

A boolean value telling whether the content is multipart or not.

is_text: bool

Tells whether or not this content contains text.

Returns

True if this content contains plain text, False otherwise.

is_voice_recording: bool

Tells whether or not this content contains a voice recording by checking it's content type.

Returns

True if this content type is 'audio/wav;voice-recording=yes', False otherwise.

key: str | None

Get the key associated with a RCS file transfer message if encrypted.

Returns

The key to encrypt/decrypt the file associated to this content.

key_size: int

Get the size of key associated with a RCS file transfer message if encrypted.

Returns

The key size in bytes

name: str | None

Get the name associated with a RCS file transfer message. It is used to store the original filename of the file to be downloaded from server.

Returns

The name of the content.

parts: list[Content]

Get all the parts from a multipart content.

Returns

A object holding the part if found, None otherwise.

plain_file_path: str

Generates a temporary plain copy of the file and returns its paths The caller is responsible to then delete this temporary copy and the returned string.

Returns

The file path set for this content if it has been set, None otherwise.

Deprecated since version 2022-01-07. Use Content.export_plain_file instead..

size: int

Get the content data buffer size, excluding null character despite null character is always set for convenience.

Returns

The content data buffer size.

string_buffer: str

Get the string content data buffer.

Returns

The string content data buffer.
Deprecated since version 2020-07-01. Use Content.utf8_text instead..

subtype: str

Get the mime subtype of the content data.

Returns

The mime subtype of the content data, for example "html".

type: str

Get the mime type of the content data.

Returns

The mime type of the content data, for example "application".

utf8_text: str | None

Get the string content data buffer. Introduced in 01/07/2020

Returns

The string content data buffer in UTF8.

def add_content_type_parameter(self, name: str, value: str | None):

Adds a parameter to the ContentType header.

Parameters
  • name: the name of the parameter to add.
  • value: the value of the parameter to add.
def add_custom_header(self, header_name: str, header_value: str):

Adds a custom header in a content.

Parameters
  • header_name: The name of the header to add.
  • header_value: The value of the header to add.
def export_plain_file(self) -> str:

Generates a temporary plain copy of the file and returns its paths The caller is responsible to then delete this temporary copy and the returned string.

Returns

The file path set for this content if it has been set, None otherwise.

def find_part_by_header(self, header_name: str, header_value: str) -> Content | None:

Find a part from a multipart content looking for a part header with a specified value.

Parameters
  • header_name: The name of the header to look for.
  • header_value: The value of the header to look for.
Returns

A Content object object the part if found, None otherwise.

def get_custom_header(self, header_name: str) -> str | None:

Get a custom header value of a content.

Parameters
  • header_name: The name of the header to get the value from.
Returns

The value of the header if found, None otherwise.

def get_part(self, index: int) -> Content | None:

Get a part from a multipart content according to its index.

Parameters
  • index: The index of the part to get.
Returns

A Content object holding the part if found, None otherwise.

def set_key(self, key: str, key_length: int):

Set the key associated with a RCS file transfer message if encrypted.

Parameters
  • key: The key to be used to encrypt/decrypt file associated to this content.
  • key_length: The lengh of the key.
class Core:

Main object to instanciate and on which to keep a reference. This object is the first object to instanciante, and will allow you to perform all kind of tasks. To create it, use either Factory.create_core or Factory.create_core_with_config, see Config for more information about factory and default config. On some platforms like Android or iOS you will need to give it the Context of your application. Once the Core is in state GlobalState.Ready, use Core.start. It will then go to state GlobalState.On and from that you can start using it for calls and chat messages. It is recommended to add a CoreListener listener using Core.add_callbacks to monitor different events. To be able to receive events from the network, you must schedule a call Core.iterate often, like every 20ms. On Android & iOS Core.is_auto_iterate_enabled is enabled by default so you don't have to worry about that unless you disable it using Core.auto_iterate_enabled or by setting in the [misc] section of your configuration auto_iterate=0.

Our API isn't thread-safe but also isn't blocking, so it is

strongly recommend to always call our methods from the main thread. Once you don't need it anymore, call Core.stop and release the reference on it so it can gracefully shutdown.

account_creator_backend: AccountCreatorBackend

Get the AccountCreator backend set for the Core.

Returns

The AccountCreatorBackend

account_creator_url: str | None

Get the AccountCreator url on the Core.

Returns

url The URL to reach.

account_list: list[Account]

Returns an unmodifiable list of entered accounts.

Returns
adaptive_rate_algorithm: str

Returns which adaptive rate algorithm is currently configured for future calls. seealso Core.adaptive_rate_algorithm.

Returns

the adaptive rate algorithm. Currently two values are supported: 'advanced', which is the default value, or 'basic'.

adaptive_rate_control_enabled: bool

Returns whether adaptive rate control is enabled. seealso Core.adaptive_rate_control_enabled.

Returns

True if adaptive rate control is enabled, False otherwise

agc_enabled: bool

Tells whether the experimental software Automatic Gain Control is activated. This algorithm is very experimental, not usable in its current state.

Returns

True if the AGC is enabled, False otherwise.

alerts_enabled: bool

Returns whether alert reporting is enabled. See Alert for more details.

Returns

whether alert reporting is enabled.

audio_adaptive_jittcomp_enabled: bool

Tells whether the audio adaptive jitter compensation is enabled.

Returns

True if the audio adaptive jitter compensation is enabled, False otherwise.

audio_devices: list[AudioDevice]

Returns a list of audio devices, with only the first device for each type To have the list of all audio devices, use Core.extended_audio_devices

Returns

A list with the first AudioDevice of each type

audio_dscp: int

Get the DSCP field for outgoing audio streams. The DSCP defines the quality of service in IP packets.

Returns

The current DSCP value

audio_jittcomp: int

Returns the nominal audio jitter buffer size in milliseconds.

Returns

The nominal audio jitter buffer size in milliseconds

audio_multicast_addr: str | None

Use to get multicast address to be used for audio stream.

Returns

an ipv4/6 multicast address or default value.

audio_multicast_enabled: bool

Use to get multicast state of audio stream.

Returns

True if subsequent calls will propose multicast ip set by Core.audio_multicast_addr

audio_multicast_ttl: int

Use to get multicast ttl to be used for audio stream.

Returns

a time to leave value

audio_payload_types: list[PayloadType]

Return the list of the available audio payload types.

Returns

A freshly allocated list of the available payload types.

audio_port: int

Gets the UDP port used for audio streaming.

Returns

The UDP port used for audio streaming

audio_ports_range: Range

Get the audio port range from which is randomly chosen the UDP port used for audio streaming.

Returns

a Range object

auth_info_list: list[AuthInfo]

Returns an unmodifiable list of currently entered AuthInfo.

Returns

A list of AuthInfo.

auto_download_icalendars_enabled: bool

Gets if the auto download for incoming icalendars is enabled or not.

Returns

True if icalendars will be automatically downloaded, False otherwise.

auto_download_voice_recordings_enabled: bool

Gets if the auto download for incoming voice recordings is enabled or not.

Returns

True if voice recordings will be automatically downloaded, False otherwise.

auto_iterate_background_schedule: int

Gets the timer used to schedule the call to core.iterate() method when in background (Android only). This is only used when Core.auto_iterate_enabled returns True.

Returns

The timing in milliseconds used to schedule the call while in background (default is 500ms).

auto_iterate_enabled: bool

Gets whether auto iterate is enabled or not (Android & iOS only).

Returns

True if Core.iterate is scheduled automatically, False otherwise

auto_iterate_foreground_schedule: int

Gets the timer used to schedule the call to core.iterate() method when in foreground (Android only). This is only used when Core.auto_iterate_enabled returns True.

Returns

The timing in milliseconds used to schedule the call while in foreground (default is 20ms).

auto_send_ringing_enabled: bool

Gets if the automatic sending of 180 Ringing is enabled or not.

Returns

True if the automatic sending of 180 Ringing is enabled, False otherwise.

automatic_http_proxy_detection_enabled: bool

Returns whether automatic http proxy is enabled.

Returns

True if automatic http proxy is enabled or False.

avpf_mode: AVPFMode

Return AVPF enablement. See Core.avpf_mode .

Returns

The current AVPFMode mode

avpf_rr_interval: int

Return the avpf report interval in seconds.

Returns

The current AVPF report interval in seconds

call_logs: list[CallLog]

Get the list of call logs (past calls).

Returns

A list of CallLog.

call_logs_database_path: str | None

Gets the database filename where call logs will be stored.

Returns

filesystem path.
Deprecated since version 07/12/2021: Use only for migration purposes.

call_tone_indications_enabled: bool

Check whether tone indications of calls are enabled.

Returns

True if call tone indications are enabled

callkit_enabled: bool

Special function to check if the callkit is enabled, False by default.

Returns

True if callkit is enabled, False otherwise.

calls: list[Call]

Gets the current list of calls. Note that this list is read-only and might be changed by the core after a function call to Core.iterate. Similarly the Call objects inside it might be destroyed without prior notice. To hold references to Call object into your program, you must use linphone_call_ref.

Returns

A list of Call

calls_nb: int

Get the number of Call.

Returns

The current number of calls

camera_sensor_rotation: int

Get the camera sensor rotation. This is needed on some mobile platforms to get the number of degrees the camera sensor is rotated relative to the screen.

Returns

The camera sensor rotation in degrees (0 to 360) or -1 if it could not be retrieved

camera_whitebalance: int

Gets the whitebalance of the camera (currently only supported by Android).

Returns

The whitebalance of the camera, default is -1 (disabled).

capability_negociation_enabled: bool

Check if the capability negotiation (RFC5939) is supported or not.

Returns

True if capability negotiation is supported; False otherwise.

capability_negotiation_reinvite_enabled: bool

Check if the capability negotiation (RFC5939) reINVITE is enabled or not.

Returns

True if capability negotiation reINVITE is enabled; False otherwise.

capture_device: str | None

Gets the name of the currently assigned sound device for capture.

Returns

The name of the currently assigned sound device for capture.

cfg_lines_merging_enabled: bool

Check if cfg lines are going to the merged if the capability negotiation (RFC5939) is supported or not.

Returns

True if acfg and pcfg lines with consecutive indexes are going to be merged; False otherwise.

chat_enabled: bool

Returns whether chat is enabled.

Returns

True if chat is enabled, False otherwise

chat_messages_aggregation_enabled: bool

Returns whether chat messages grouping is enabled or not.

Returns

True if received chat messages will be notified as a bundle, False otherwise.

chat_rooms: list[ChatRoom]

Returns a list of chat rooms.

Returns

List of chat rooms.

conference: Conference | None

Get a pointer on the internal conference object.

Returns

A pointer on Conference or None if no conference are going on.
Deprecated since version 10/08/2023 Use Core.search_conference instead..

conference_ics_in_message_body_enabled: bool

Gets wether conference invitations will be sent in the chat message body or as a file attachment.

Returns

True if ICS will be sent in the message body (by default), False if it will be sent as a file attachment.

conference_information_list: list[ConferenceInfo]

Retrieve the list of conference information on DB.

Returns

The list of conference infos .

conference_local_input_volume: float

Get the set input volume of the local participant.

Returns

A value inside [0.0 ; 1.0]

conference_max_thumbnails: int

Gets the maximum number of thumbnails requested in the SDP during a conference call Account.call_logs.

Returns

the maximum number of thumbnails requested in the SDP during a conference call

conference_participant_list_type: ConferenceParticipantListType

Tells whether the default conference participant list is open or closed.

Returns

A ConferenceParticipantListType participant list type

conference_server_enabled: bool

Tells whether the conference server feature is enabled.

Returns

A boolean value telling whether the conference server feature is enabled or not

conference_size: int

Get the number of participants including me, if it in, in the running conference. The local participant is included in the count only if it is in the conference.

Returns

The number of participants including me, if it in. Deprecated since version 16/04/2021 Use Conference.participant_count instead..

config: Config

Returns the config object used to manage the storage (config) file.

Returns

a Config object.

consolidated_presence: ConsolidatedPresence

Get my consolidated presence.

Returns

My ConsolidatedPresence presence

current_call: Call | None

Gets the current call.

Returns

The current call or None if no call is running.

current_call_remote_address: Address | None

Get the remote address of the current call.

Returns

The remote address of the current call or None if there is no current call.

current_callbacks: CoreListener | None

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

Returns

the CoreListener that has called the last callback

current_preview_video_definition: VideoDefinition

Get the effective video definition provided by the camera for the captured video. When preview is disabled or not yet started this function returns a 0x0 video definition.

Returns

The captured VideoDefinition.
seealso Core.preview_video_definition.

default_account: Account | None

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

Returns

The default account.

default_conference_layout: ConferenceLayout

Gets the default conference layout @core core the linphone core.

Returns

conference layout

default_ephemeral_lifetime: int

Gets the default lifetime of ephemeral messages in seconds @core core the linphone core.

Returns

lifetime of ephemeral messages in seconds

default_friend_list: FriendList | None

Retrieves the first list of Friend from the core.

Returns

the first FriendList object or None.

default_input_audio_device: AudioDevice | None

Gets the default input audio device.

Returns

The default input audio device

default_output_audio_device: AudioDevice | None

Gets the default output audio device.

Returns

The default output audio device

default_proxy_config: ProxyConfig | None

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

Returns

The default proxy configuration.

default_video_display_filter: str

Get the name of the default mediastreamer2 filter used for rendering video on the current platform. This is for advanced users of the library, mainly to expose mediastreamer video filter name and status.

Returns

The default video display filter.

delayed_timeout: int

Gets the delayed timeout See Core.delayed_timeout for details.

Returns

The current delayed timeout in seconds

device_rotation: int

Gets the current device orientation.

Returns

The current device orientation seealso Core.device_rotation.

digest_authentication_policy: DigestAuthenticationPolicy

Get the current digest authentication policy applicable for SIP and HTTP. Get the current digest authentication policy applicable for SIP and HTTP.

Returns

The current digest authentication policy.

disable_record_on_mute: bool

Get whether the microphone will be completely deactivated when muted. Please refer to Core.disable_record_on_mute.

Returns

True if you wish to entirely stop the audio recording when muting the microphone.

dns_search_enabled: bool

Tells whether DNS search (use of local domain if the fully qualified name did return results) is enabled.

Returns

True if DNS search is enabled, False if disabled.

dns_set_by_app: bool

Tells if the DNS was set by an application.

Returns

True if DNS was set by app, False otherwise.

dns_srv_enabled: bool

Tells whether DNS SRV resolution is enabled.

Returns

True if DNS SRV resolution is enabled, False if disabled.

download_bandwidth: int

Retrieve the maximum available download bandwidth. This value was set by Core.download_bandwidth.

Returns

the download bandiwdth in kbits/s, 0 for infinite

download_ptime: int

Get audio packetization time linphone expects to receive from peer. A value of zero means that ptime is not specified.

Returns

the download packetization time set

echo_cancellation_calibration: int

Gets the currently stored calibration delay for the software echo cancellation.

Returns

the current calibration value, -1 if it failed, 0 if not done or not needed, a positive value if a software echo canceller is required after running Core.start_echo_canceller_calibration.

echo_cancellation_enabled: bool

Returns True if echo cancellation is enabled.

Returns

A boolean value telling whether echo cancellation is enabled or disabled

echo_canceller_filter_name: str | None

Get the name of the mediastreamer2 filter used for echo cancelling.

Returns

The name of the mediastreamer2 filter used for echo cancelling.

echo_limiter_enabled: bool

Tells whether echo limiter is enabled. Enables or disable echo limiter. "Echo limiter" refers to an algorithm that creates half-duplex conversation in order to suppress echo. It is experimental and shall be used only in rare cases where echo cancellation cannot perform because of non-linear speaker/mic coupling. You shall not expected good audio quality with the echo limiter.

Returns

True if the echo limiter is enabled, False otherwise.

extended_audio_devices: list[AudioDevice]

Returns the list of all audio devices.

Returns

A list of all AudioDevice

fec_enabled: bool

Tells whether the flexible FEC feature is enabled. If true, the lost packets in video calls are protected by 1D or 2D parity codes as described in RFC8627.

Returns

A boolean value telling whether the flexible FEC feature is enabled or not

file_transfer_server: str | None

Get the globaly set http file transfer server to be used for content type application/vnd.gsma.rcs-ft-http+xml. Url may be like: "https://file.linphone.org/upload.php".

Returns

URL of the file server.

forced_ice_relay_enabled: bool

Indicates whether the ICE relay path is forcibly selected.

Returns

a boolean value indicating whether forced relay is enabled. seealso Core.forced_ice_relay_enabled..

friend_list_subscription_enabled: bool

Returns whether or not friend lists subscription are enabled.

Returns

whether or not the feature is enabled

friends_database_path: str | None

Gets the database filename where friends will be stored.

Returns

filesystem path.
Deprecated since version 27/10/2023 Friends are now stored in the main db.

friends_lists: list[FriendList]

Retrieves the list of FriendList from the core.

Returns

A list of FriendList.

future_conference_information_list: list[ConferenceInfo]

Retrieve the list of future conference information on DB.

Returns

The list of future conference infos .

generic_comfort_noise_enabled: bool

Returns enablement of RFC3389 generic comfort noise algorithm.

Returns

True if generic comfort noise is enabled, False otherwise.

global_state: GlobalState

Returns the global state of core.

Returns

a GlobalState enum.

guess_hostname: bool

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

Returns

True if guess hostname enabled, False otherwise.

http_proxy_host: str | None

Get http proxy address to be used for signaling.

Returns

hostname of IP adress of the http proxy (can be None to disable).

http_proxy_port: int

Get http proxy port to be used for signaling.

Returns

port of the http proxy.

identity: str

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

Returns

The default identity SIP address.

im_notif_policy: ImNotifPolicy | None

Get the ImNotifPolicy object controlling the instant messaging notifications.

Returns

A ImNotifPolicy object.

in_call_timeout: int

Gets the in call timeout See Core.in_call_timeout for details.

Returns

The current in call timeout in seconds

inc_timeout: int

Returns the incoming call timeout See Core.inc_timeout for details.

Returns

The current incoming call timeout in seconds

input_audio_device: AudioDevice | None

Gets the input audio device for the current call.

Returns

The input audio device for the current or first call, None if there is no call.

ipv6_enabled: bool

Tells whether IPv6 is enabled or not.

Returns

A boolean value telling whether IPv6 is enabled or not seealso Core.ipv6_enabled for more details on how IPv6 is supported in.

liblinphone.

is_auto_download_icalendars_enabled: bool

Gets if the auto download for incoming icalendars is enabled or not.

Returns

True if icalendars will be automatically downloaded, False otherwise. Deprecated since version 16/12/2021 Use Core.auto_download_icalendars_enabled instead..

is_auto_download_voice_recordings_enabled: bool

Gets if the auto download for incoming voice recordings is enabled or not.

Returns

True if voice recordings will be automatically downloaded, False otherwise. Deprecated since version 16/12/2021 Use Core.auto_download_voice_recordings_enabled.

instead.

is_auto_iterate_enabled: bool

Gets whether auto iterate is enabled or not (Android & iOS only).

Returns

True if Core.iterate is scheduled automatically, False otherwise Deprecated since version 16/12/2021 Use Core.auto_iterate_enabled instead..

is_echo_canceller_calibration_required: bool

Check whether the device is echo canceller calibration is required.

Returns

True if it is required, False otherwise

is_friend_list_subscription_enabled: bool

Returns whether or not friend lists subscription are enabled.

Returns

whether or not the feature is enabled Deprecated since version 16/12/2021 Use Core.friend_list_subscription_enabled instead..

is_in_background: bool

Gets whether the Core is considering itself in background or not. The Core foreground/background state depends on the last call made to Core.enter_background or Core.enter_foreground.

Returns

True if the Core is in background, False otherwise.

is_in_conference: bool

Indicates whether the local participant is part of a conference.

That function automatically fails in the case of conferences using

a conferencet server (focus). If you use such a conference, you should use Conference.remove_participant instead.

Returns

True if the local participant is in a conference, False otherwise. Deprecated since version 09/03/2021 Use Conference.is_in instead..

is_incoming_invite_pending: bool

Tells whether there is an incoming invite pending.

Returns

A boolean telling whether an incoming invite is pending or not.

is_media_encryption_mandatory: bool

Check if the configured media encryption is mandatory or not.

Returns

True if media encryption is mandatory; False otherwise.

is_native_ringing_enabled: bool

Returns whether the native ringing is enabled or not.

Returns

True if we use the native ringing, false otherwise Deprecated since version 16/12/2021 Use Core.native_ringing_enabled instead..

is_network_reachable: bool

return network state either as positioned by the application or by linphone itself.

Returns

True if network is reachable, False otherwise

is_push_notification_available: bool

Gets whether push notifications are available or not (Android & iOS only).

Returns

True if push notifications are available, False otherwise

is_push_notification_enabled: bool

Gets whether push notifications are enabled or not (Android & iOS only). If not, the app will have to handle all the push-related settings for each accounts

Returns

True if push notifications are enabled, False otherwise Deprecated since version 16/12/2021 Use Core.push_notification_enabled instead..

is_record_aware_enabled: bool

Gets if the record aware feature is enabled or not.

Returns

True if the record aware feature is enabled, False otherwise. Deprecated since version 16/12/2021 Use Core.record_aware_enabled instead..

is_sender_name_hidden_in_forward_message: bool

Returns whether or not sender name is hidden in forward message.

Returns

whether or not the feature

is_verify_server_certificates: bool

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

Returns

True if the tls server certificate must be verified

is_verify_server_cn: bool

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

Returns

True if the tls server certificate common name must be verified

is_vibration_on_incoming_call_enabled: bool

Gets whether the device will vibrate while an incoming call is ringing (Android only).

Returns

True if the device will vibrate (if possible), False otherwise Deprecated since version 16/12/2021 Use Core.vibration_on_incoming_call_enabled.

instead.

keep_alive_enabled: bool

Is signaling keep alive enabled.

Returns

A boolean value telling whether signaling keep alive is enabled

label: str

Get the label assigned to the LinphoneCore. The default value is None (no label).

Returns

the assigned label.

last_outgoing_call_log: CallLog | None

Get the latest outgoing call log. Conference calls are not returned by this function! Requires ENABLE_DB_STORAGE to work.

Returns

The last outgoing call log if any.

ldap_list: list[Ldap]

Returns a list of entered LDAPs. Items must be freed with linphone_ldap_unref

Returns
lime_x3dh_enabled: bool

Tells wether LIME X3DH is enabled or not.

Returns

The current lime state

lime_x3dh_server_url: str | None

Get the x3dh server url.

Returns

The x3dh server url.
Deprecated since version 26/08/2022 Use AccountParams.lime_server_url instead..

linphone_specs_list: list

Get the list of linphone specs string values representing what functionalities the linphone client supports.

Returns

A list of supported specs. The list must be freed with bctbx_list_free() after usage.

loaded_plugins: list

Return the list of loaded plugins.

Returns

the list of loaded plugins

local_permission_enabled: bool

Special function to check if the local network permission has been granted by the user (useful for iOS). The test performed by this function may popup the local network permission dialog, for that reason it could be a good idea to check it twice to conclude that the user has deny the permission.

Returns

True if local permission request is granted, False otherwise.

log_collection_upload_server_url: str | None

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

Returns

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

max_call_logs: int

Gets the maximum number of call logs retrieved when using Core.call_logs or Account.call_logs.

Returns

the maximum number of call logs that will be returned. -1 will return them all.

max_calls: int

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

Returns

max number of simultaneous calls

max_size_for_auto_download_incoming_files: int

Gets the size under which incoming files in chat messages will be downloaded automatically.

Returns

The size in bytes, -1 if autodownload feature is disabled, 0 to download them all no matter the size

media_device: str | None

Gets the name of the currently assigned sound device for media.

Returns

The name of the currently assigned sound device for capture.

media_encryption: MediaEncryption

Get the media encryption policy being used for RTP packets.

Returns

The MediaEncryption policy being used.

media_resource_mode: MediaResourceMode

This function returns the media resource mode for this core.

Returns

The media resource mode

mic_enabled: bool

Tells whether the microphone is enabled.

Returns

True if the microphone is enabled, False if disabled.

mic_gain_db: float

Get microphone gain in db.

Returns

The current microphone gain

missed_calls_count: int

Get the number of missed calls. Once checked, this counter can be reset with Core.reset_missed_calls_count.

Returns

The number of missed calls.

mtu: int

Returns the maximum transmission unit size in bytes.

nat_address: str | None

Deprecated. Get the public IP address of NAT being used.

Returns

The public IP address of NAT being used.
Deprecated since version 12/10/2022.

nat_policy: NatPolicy | None

Get The policy that is used to pass through NATs/firewalls. It may be overridden by a NAT policy for a specific proxy config.

Returns

NatPolicy object in use.
seealso AccountParams.nat_policy.

native_preview_window_id: object | None

Get the native window handle of the video preview window. see Core.native_video_window_id for details about window_id There is a special case for Qt : Core.native_preview_window_id returns a

QQuickFramebufferObject::Renderer. Note : Qt blocks GUI thread when calling

createRenderer(), so it is safe to call linphone functions there if needed.

Returns

The native window handle of the video preview window.

native_ringing_enabled: bool

Returns whether the native ringing is enabled or not.

Returns

True if we use the native ringing, false otherwise

native_video_window_id: object | None

Get the native window handle of the video window. see linphone_core_set_native_video_window_id for details about window_id There is a special case for Qt : Core.native_video_window_id returns a

QQuickFramebufferObject::Renderer. Note : Qt blocks GUI thread when calling

createRenderer(), so it is safe to call linphone functions there if needed.

Returns

The native window handle of the video window.

nortp_timeout: int

Gets the value of the no-rtp timeout. When no RTP or RTCP packets have been received for a while Core will consider the call is broken (remote end crashed or disconnected from the network), and thus will terminate the call. The no-rtp timeout is the duration above which the call is considered broken.

Returns

The value of the no-rtp timeout in seconds

output_audio_device: AudioDevice | None

Gets the output audio device for the current call.

Returns

The output audio device for the current or first call, None if there is no call.

play_file: str | None

Get the wav file that is played when putting somebody on hold, or when files are used instead of soundcards (see Core.use_files). The file is a 16 bit linear wav file.

Returns

The path to the file that is played when putting somebody on hold.

playback_device: str | None

Gets the name of the currently assigned sound device for playback.

Returns

The name of the currently assigned sound device for playback.

playback_gain_db: float

Get playback gain in db before entering sound card.

Returns

The current playback gain

preferred_framerate: float

Returns the preferred video framerate, previously set by Core.preferred_framerate.

Returns

frame rate in number of frames per seconds.

preferred_video_definition: VideoDefinition

Get the preferred video definition for the stream that is captured and sent to the remote party.

Returns

The preferred VideoDefinition

presence_model: PresenceModel | None

Get my presence model.

Returns

A PresenceModel object, or None if no presence model has been set.

preview_video_definition: VideoDefinition | None

Get the definition of the captured video.

Returns

The captured VideoDefinition if it was previously set by Core.preview_video_definition, otherwise a 0x0 LinphoneVideoDefinition.
seealso Core.preview_video_definition.

primary_contact: str

Returns the default identity when no proxy configuration is used.

Returns

the primary contact identity

primary_contact_parsed: Address | None

Same as Core.primary_contact but the result is a Address object instead of const char *.

Returns

a Address object.
Deprecated since version 22/10/2018 Use Core.create_primary_contact_parsed instead..

provisioning_uri: str | None

Get provisioning URI.

Returns

the provisioning URI.

proxy_config_list: list[ProxyConfig]

Returns an unmodifiable list of entered proxy configurations.

Returns

A list of ProxyConfig.

push_incoming_call_timeout: int

Returns the push incoming call timeout See Core.push_incoming_call_timeout for details.

Returns

The current push incoming call timeout in seconds

push_notification_config: PushNotificationConfig | None

Gets the push notification configuration object if it exists.

Returns

the PushNotificationConfig if it exists, None otherwise.

push_notification_enabled: bool

Gets whether push notifications are enabled or not (Android & iOS only). If not, the app will have to handle all the push-related settings for each accounts

Returns

True if push notifications are enabled, False otherwise

qrcode_video_preview_enabled: bool

Tells whether QRCode is enabled in the preview.

Returns

A boolean value telling whether QRCode is enabled in the preview.

realtime_text_enabled: bool

Gets if realtime text is enabled or not.

Returns

True if realtime text is enabled, False otherwise

record_aware_enabled: bool

Gets if the record aware feature is enabled or not.

Returns

True if the record aware feature is enabled, False otherwise.

record_file: str | None

Get the wav file where incoming stream is recorded, when files are used instead of soundcards (see Core.use_files). This feature is different from call recording (CallParams.record_file) The file is a 16 bit linear wav file.

Returns

The path to the file where incoming stream is recorded.

remote_ringback_tone: str | None

Get the ring back tone played to far end during incoming calls.

Returns

the path to the remote ring back tone to be played.

retransmission_on_nack_enabled: bool

Tells whether NACK context is enabled or not.

Returns

A boolean value telling whether NACK context is enabled or not

ring: str | None

Returns the path to the wav file used for ringing.

Returns

The path to the wav file used for ringing.

ring_during_incoming_early_media: bool

Tells whether the ring play is enabled during an incoming early media call.

ringback: str | None

Returns the path to the wav file used for ringing back.

Returns

The path to the wav file used for ringing back.

ringer_device: str | None

Gets the name of the currently assigned sound device for ringing.

Returns

The name of the currently assigned sound device for ringing.

root_ca: str | None

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

Returns

The path to a file or folder containing the trusted root CAs.

rtp_bundle_enabled: bool

Returns whether RTP bundle mode (also known as Media Multiplexing) is enabled. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.

Returns

a boolean indicating the enablement of rtp bundle mode.

sdp_200_ack_enabled: bool

Media offer control param for SIP INVITE.

Returns

true if INVITE has to be sent whitout SDP.

self_view_enabled: bool

Tells whether video self view during call is enabled or not.

Returns

A boolean value telling whether self view is enabled seealso Core.self_view_enabled for details..

session_expires_enabled: bool

Check if the Session Timers feature is enabled.

session_expires_min_value: int

Returns the session expires min value, 90 by default.

session_expires_refresher_value: SessionExpiresRefresher

Returns the session expires refresher value.

session_expires_value: int

Returns the session expires value.

sip_dscp: int

Get the DSCP field for SIP signaling channel. The DSCP defines the quality of service in IP packets.

Returns

The current DSCP value

sip_transport_timeout: int

Get the SIP transport timeout, which represents the maximum time permitted to establish a connection to a SIP server.

Returns

The SIP transport timeout in milliseconds.

sound_devices_list: list

Gets the list of the available sound devices.

Returns

An unmodifiable array of strings contanining the names of the available sound devices that is None terminated.
Deprecated since version 10/04/2021 Use Core.audio_devices instead..

srtp_crypto_suites: str

Get the crypto suites available to the core.

Returns

a comma separated list of supported suites

static_picture: str | None

Get the path to the image file streamed when "Static picture" is set as the video device.

Returns

The path to the image file streamed when "Static picture" is set as the video device.

static_picture_fps: float

Get the frame rate for static picture.

Returns

The frame rate used for static picture.

stun_server: str | None

Get the STUN server address being used.

Returns

The STUN server address being used.

supported_file_formats_list: list

Returns a null terminated table of strings containing the file format extension supported for call recording.

Returns

The supported formats, typically 'wav' and 'mkv'.

tag_100rel_support_level: pylinphone.SupportLevel

Get the support level of the 100rel attribute.

Returns

The 100 rel support level

tcap_lines_merging_enabled: bool

Check if tcap lines are going to the merged if the capability negotiation (RFC5939) is supported or not.

Returns

True if tcap lines with consecutive indexes are going to be merged; False otherwise.

text_payload_types: list[PayloadType]

Return the list of the available text payload types.

Returns

A freshly allocated list of the available payload types. The list must be destroyed with bctbx_list_free() after usage. The elements of the list haven't to be unref.

text_port: int

Gets the UDP port used for text streaming.

Returns

The UDP port used for text streaming

text_ports_range: Range

Get the text port range from which is randomly chosen the UDP port used for text streaming.

Returns

a Range object

tls_cert: str | None

Gets the TLS certificate.

Returns

the TLS certificate or None if not set yet.

tls_cert_path: str | None

Gets the path to the TLS certificate file.

Returns

the TLS certificate path or None if not set yet.

tls_key: str | None

Gets the TLS key.

Returns

the TLS key or None if not set yet.

tls_key_path: str | None

Gets the path to the TLS key file.

Returns

the TLS key path or None if not set yet.

transports: Transports

Retrieves the port configuration used for each transport (udp, tcp, tls). A zero value port for a given transport means the transport is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be chosen randomly by the system. A value of LC_SIP_TRANSPORT_DONTBIND (-2) means that the socket will not be bound explicitely, in other words liblinphone won't listen for incoming connections at all. This mode is suitable for a pure client application (ex: a mobile application).

Returns

A Transports structure with the configured ports

transports_used: Transports

Retrieves the real port number assigned for each sip transport (udp, tcp, tls). A zero value means that the transport is not activated. If LC_SIP_TRANSPORT_RANDOM was passed to linphone_core_set_sip_transports, the random port choosed by the system is returned.

Returns

A Transports structure with the ports being used

tunnel: Tunnel | None

get tunnel instance if available

Returns

Tunnel or None if not available.

unread_chat_message_count: int

Return the global unread chat message count.

Returns

The global unread chat message count.

unread_chat_message_count_from_active_locals: int

Return the unread chat message count for all active local address. (Primary contact + proxy configs.)

Returns

The unread chat message count.

upload_bandwidth: int

Retrieve the maximum available upload bandwidth. This value was set by Core.upload_bandwidth.

Returns

the upload bandiwdth in kbits/s, 0 for infinite

upload_ptime: int

Set audio packetization time linphone will send (in absence of requirement from peer) A value of 0 stands for the current codec default packetization time.

Returns

the upload packetization time set

upnp_external_ipaddress: str | None

Return the external ip address of router. In some cases the uPnP can have an external ip address but not a usable uPnP (state different of Ok).

Returns

a null terminated string containing the external ip address. If the the external ip address is not available return null.

upnp_state: UpnpState

Return the internal state of uPnP.

Returns

an LinphoneUpnpState.

use_files: bool

Gets whether linphone is currently streaming audio from and to files, rather than using the soundcard.

Returns

A boolean value representing whether linphone is streaming audio from and to files or not.

use_info_for_dtmf: bool

Indicates whether SIP INFO is used to send digits.

Returns

A boolean value telling whether SIP INFO is used to send digits

use_rfc2833_for_dtmf: bool

Indicates whether RFC2833 is used to send digits.

Returns

A boolean value telling whether RFC2833 is used to send digits

user_agent: str

Gets the user-agent as a string.

Returns

liblinphone's user agent as a string.

user_certificates_path: str | None

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

Returns

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

vibration_on_incoming_call_enabled: bool

Gets whether the device will vibrate while an incoming call is ringing (Android only).

Returns

True if the device will vibrate (if possible), False otherwise

video_activation_policy: VideoActivationPolicy

Get the default policy for video. See Core.video_activation_policy for more details.

Returns

The currently used video policy

video_adaptive_jittcomp_enabled: bool

Tells whether the video adaptive jitter compensation is enabled.

Returns

True if the video adaptive jitter compensation is enabled, False otherwise.

video_capture_enabled: bool

Tells whether video capture is enabled.

Returns

True if video capture is enabled, False if disabled.

video_codec_priority_policy: CodecPriorityPolicy

Get the current priority policy for video codecs (payload types). See CodecPriorityPolicy for more details.

Returns

the current CodecPriorityPolicy

video_device: str | None

Returns the name of the currently active video device.

Returns

The name of the currently active video device.

video_devices_list: list

Gets the list of the available video capture devices.

Returns

An unmodifiable array of strings contanining the names of the available video capture devices that is None terminated.

video_display_enabled: bool

Tells whether video display is enabled.

Returns

True if video display is enabled, False if disabled.

video_display_filter: str | None

Get the name of the mediastreamer2 filter used for rendering video.

Returns

The currently selected video display filter.

video_dscp: int

Get the DSCP field for outgoing video streams. The DSCP defines the quality of service in IP packets.

Returns

The current DSCP value

video_enabled: bool

Returns True if either capture or display is enabled, False otherwise. same as ( Core.video_capture_enabled | Core.video_display_enabled )

Returns

True if either capture or display is enabled, False otherwise.

video_jittcomp: int

Returns the nominal video jitter buffer size in milliseconds.

Returns

The nominal video jitter buffer size in milliseconds

video_multicast_addr: str | None

Use to get multicast address to be used for video stream.

Returns

an ipv4/6 multicast address, or default value.

video_multicast_enabled: bool

Use to get multicast state of video stream.

Returns

True if subsequent calls will propose multicast ip set by Core.video_multicast_addr

video_multicast_ttl: int

Use to get multicast ttl to be used for video stream.

Returns

a time to leave value

video_payload_types: list[PayloadType]

Return the list of the available video payload types.

Returns

A freshly allocated list of the available payload types.

video_port: int

Gets the UDP port used for video streaming.

Returns

The UDP port used for video streaming

video_ports_range: Range

Get the video port range from which is randomly chosen the UDP port used for video streaming.

Returns

a Range object

video_preset: str | None

Get the video preset used for video calls.

Returns

The name of the video preset used for video calls (can be None if the default video preset is used).

video_preview_enabled: bool

Tells whether video preview is enabled.

Returns

A boolean value telling whether video preview is enabled

wifi_only_enabled: bool

Tells whether Wifi only mode is enabled or not.

Only works for Android platform.
Returns

A boolean value telling whether Wifi only mode is enabled or not

zero_rtp_port_for_stream_inactive_enabled: bool

Check if RTP port is set to 0 when a stream is inactive.

Returns

True if the RTP port is set to 0 if the stream direction is inactive; False otherwise.

zrtp_go_clear_enabled: bool

Check if the ZRTP go clear is enabled or not.

Returns

True if ZTRP go clear is enabled; False otherwise.

zrtp_secrets_file: str | None

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

Returns

The path to the file storing the zrtp secrets cache.

def add_listener(self, listener: CoreListener):

Adds a listener to this Core object

Parameters
def remove_listener(self, listener: CoreListener):

Removes a listener from this this Core object

Parameters
def compress_log_collection() -> str:

Compress the log collection in a single file.

Returns

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

def enable_log_collection(state: LogCollectionState):

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

Parameters
def get_log_collection_max_file_size() -> int:

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.

def get_log_collection_path() -> str:

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

Returns

The path where the log files will be written.

def get_log_collection_prefix() -> str:

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

Returns

The prefix of the filenames used for log collection.

def get_post_quantum_available() -> bool:

Are PostQuantum algoritms available.

Returns

True if Post Quantum algorithms are available False otherwise

def get_version() -> str:

Returns liblinphone's version as a string.

Returns

the current version of the Core

def log_collection_enabled() -> LogCollectionState:

Tells whether the linphone core log collection is enabled.

Returns

The LogCollectionState of the Core log collection.

def reset_log_collection():

Reset the log collection by removing the log files.

def serialize_logs():

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

def set_log_collection_max_file_size(size: int):

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 Core.log_collection_enabled. If you increase max size on runtime, logs chronological order COULD be broken.

Parameters
  • size: The max file size in bytes of the files used for log collection.
def set_log_collection_path(path: str):

Set the path of a directory where the log files will be written for log collection. When log collection is enabled, the function will close the file with the current prefix in the old path and it will open the new file with current prefix in the new path. If you need to change the path and the file at the same time, then you should deactivate log collection with Core.log_collection_enabled before doing modifications.

Parameters
  • path: The path where the log files will be written.
def set_log_collection_prefix(prefix: str):

Set the prefix of the filenames that will be used for log collection. When log collection is enabled, the function will close the old file and it will open the new one in the current path. If you need to change the path and the file at the same time, then you should deactivate log collection with Core.log_collection_enabled before doing modifications.

Parameters
  • prefix: The prefix to use for the filenames for log collection.
def tunnel_available() -> bool:

True if tunnel support was compiled.

Returns

True if library was built with tunnel, False otherwise

def upnp_available() -> bool:

Return the availability of uPnP.

Returns

true if uPnP is available otherwise return false.

def vcard_supported() -> bool:

Tells whether VCARD support is builtin.

Returns

True if VCARD is supported, False otherwise.

def set_dns_servers(self, servers: list | None):

Forces liblinphone to use the supplied list of dns servers, instead of system's ones.

Parameters
  • servers: A list of strings containing the IP addresses of DNS servers to be used. Setting to None restores default behaviour, which is to use the DNS server list provided by the system. The list is copied internally.
def set_dns_servers_app(self, servers: list | None):

Forces liblinphone to use the supplied list of dns servers, instead of system's ones and set dns_set_by_app at true or false according to value of servers list.

Parameters
  • servers: A list of strings containing the IP addresses of DNS servers to be used. Setting to None restores default behaviour, which is to use the DNS server list provided by the system. The list is copied internally.
def set_enable_sip_update(self, value: int):

Enable or disable the UPDATE method support.

Parameters
  • value: Enable or disable it
def set_expected_bandwidth(self, bandwidth: int):

Sets expected available upload bandwidth This is IP bandwidth, in kbit/s. This information is used by liblinphone together with remote side available bandwidth signaled in SDP messages to properly configure audio & video codec's output bitrate.

Parameters
  • bandwidth: the bandwidth in kbits/s, 0 for infinite
def set_media_encryption_mandatory(self, mandatory: bool):

Define whether the configured media encryption is mandatory, if it is and the negotation cannot result in the desired media encryption then the call will fail. If not an INVITE will be resent with encryption disabled.

Parameters
  • mandatory: True to set it mandatory; False otherwise.
def set_media_network_reachable(self, reachable: bool):

This method is called by the application to notify the linphone core library when the media (RTP) network is reachable. This is for advanced usage, when SIP and RTP layers are required to use different interfaces. Most applications just need Core.network_reachable.

Parameters
  • reachable: True if network is reachable, False otherwise
def set_network_reachable(self, reachable: bool):

This method is called by the application to notify the linphone core library when network is reachable. Calling this method with true trigger linphone to initiate a registration process for all proxies. Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes.

Parameters
  • reachable: True if network is reachable, False otherwise
def set_preferred_video_definition_by_name(self, name: str):

Sets the preferred video definition by its name. Call Factory.supported_video_definitions to have a list of supported video definitions.

Parameters
  • name: The name of the definition to set
def set_preview_video_definition_by_name(self, name: str):
Parameters
  • name: The name of the definition to set
def set_root_ca_data(self, data: str | None):

Sets the trusted root CAs (PEM format)

Parameters
  • data: The trusted root CAs as a string
def enable_sender_name_hidden_in_forward_message(self, enable: bool):

Enable whether or not to hide sender name in forward message.

Parameters
  • enable: whether or not to enable the feature
def set_sip_network_reachable(self, reachable: bool):

This method is called by the application to notify the linphone core library when the SIP network is reachable. This is for advanced usage, when SIP and RTP layers are required to use different interfaces. Most applications just need Core.network_reachable.

Parameters
  • reachable: True if network is reachable, False otherwise
def set_supported_tag(self, tags: str):

Set the supported tags.

def enable_tcap_line_merging(self, merge: bool):

Define whether tcap lines are going to be merged if capability negotiation (RFC5939) is supported.

Parameters
  • merge: True to merge tcap lines with consecutive indexes; False otherwise.
def enable_video_source_reuse(self, enable: bool):

Enable or disable video source reuse when switching from preview to actual video call. This source reuse is useful when you always display the preview, even before calls are initiated. By keeping the video source for the transition to a real video call, you will smooth out the source close/reopen cycle. This function does not have any effect durfing calls. It just indicates the Core to initiate future calls with video source reuse or not. Also, at the end of a video call, the source will be closed whatsoever for now.

Parameters
  • enable: True to enable video source reuse. False to disable it for subsequent calls.
def activate_audio_session(self, actived: bool):

Special function to indicate if the audio session is activated. Must be called when ProviderDelegate of the callkit notifies that the audio session is activated or deactivated.

def add_account(self, account: Account) -> int:

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

Parameters
Returns

0 if successful, -1 otherwise

def add_all_to_conference(self) -> int:

Add all current calls into the conference. If no conference is running a new internal conference context is created and all current calls are added to it.

Returns

0 if succeeded. Negative number if failed

This function guarantees that the local endpoint is added to the

conference.

def add_auth_info(self, info: AuthInfo):

Adds authentication information to the Core. That piece of information will be used during all SIP transactions that require authentication.

Parameters
def add_content_type_support(self, content_type: str):

Add support for the specified content type. It is the application responsibility to handle it correctly afterwards.

Parameters
  • content_type: The content type to add support for
def add_friend_list(self, _list: FriendList):

Add a friend list.

Parameters
def add_ldap(self, ldap: Ldap):

Add or update a LDAP server and save it to the configuration.

Parameters
  • ldap: The LDAP to add/update.
def add_linphone_spec(self, spec: str):

Add the given linphone specs to the list of functionalities the linphone client supports.

Parameters
  • spec: The spec to add
def add_provisioning_header(self, header_name: str, value: str):

Add an extra header for retrieving the remote provisioning (check Core.provisioning_uri). This can also be set from configuration file or factory config file, from[misc] section, item "config-uri-headers_X" where X is the index of the header starting by 0.

Parameters
  • header_name: the header to use when downloading the configuration.
  • value: the value to use when downloading the configuration.
def add_proxy_config(self, config: ProxyConfig) -> int:

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

Parameters
Returns

0 if successful, -1 otherwise

def add_supported_tag(self, tag: str):

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

Parameters
  • tag: The feature tag name
def add_to_conference(self, call: Call) -> int:

Add a participant to the conference. If no conference is going on a new internal conference context is created and the participant is added to it.

Parameters
  • call: The current call with the participant to add
Returns

0 if succeeded. Negative number if failed

def audio_route_changed(self):

Special function to indicate if the audio route is changed. Must be called in the callback of AVAudioSessionRouteChangeNotification. Deprecated since version 07/01/2020 now handled in the linphone SDK directly.

def chat_room_get_default_ephemeral_mode(self) -> ChatRoomEphemeralMode:

Gets the default ephemeral message mode @core core the linphone core.

Returns

the default ephemeral message mode ChatRoomEphemeralMode

def chat_room_set_default_ephemeral_mode(self, mode: ChatRoomEphemeralMode):

Sets the default ephemeral message mode.

Parameters
def check_for_update(self, current_version: str):

Checks if a new version of the application is available.

Parameters
  • current_version: The current version of the application
def clear_accounts(self):

Erase all account from config.

def clear_all_auth_info(self):

Clear all authentication information.

def clear_call_logs(self):

Erase the call log.

def clear_ldaps(self):

Erase all LDAP from the configuration.

def clear_provisioning_headers(self):

Clear all headers that were added with Core.add_provisioning_header.

def clear_proxy_config(self):

Erase all proxies from config.

def config_sync(self) -> int:

Writes the config file to disk.

Returns

0 if successful, -1 otherwise

def configure_audio_session(self):

Special function to configure audio session with default settings. Must be called in ProviderDelegate's callbacks when answer an incoming call and start an outgoing call.

def create_account(self, params: AccountParams) -> Account:

Create an account using given parameters, see Core.create_account_params.

Parameters
Returns

Account with default values set

def create_account_creator(self, xmlrpc_url: str | None) -> AccountCreator:

Create a AccountCreator and set Linphone Request callbacks.

Parameters
  • xmlrpc_url: The URL to the XML-RPC server.
Returns

The new AccountCreator object.

def create_account_params(self) -> AccountParams:

Create an account params using default values from Linphone core.

Returns

AccountParams with default values set

def create_address(self, address: str | None) -> Address | None:

Create a Address object by parsing the user supplied address, given as a string.

Parameters
  • address: String containing the user supplied address
Returns

The create Address object

def create_call_log( self, _from: Address, to: Address, _dir: CallDir, duration: int, start_time: int, connected_time: int, status: CallStatus, video_enabled: bool, quality: float) -> CallLog:

Creates a fake CallLog.

Parameters
  • _from: Address of caller
  • to: Address of callee
  • _dir: CallDir of call
  • duration: call length in seconds
  • start_time: timestamp of call start time
  • connected_time: timestamp of call connection
  • status: CallStatus of call
  • video_enabled: whether video was enabled or not for this call
  • quality: call quality
Returns

a CallLog object

def create_call_params(self, call: Call | None) -> CallParams | None:

Create a CallParams suitable for Core.invite_with_params, linphone_core_accept_call_with_params, linphone_core_accept_early_media_with_params or linphone_core_accept_call_update. The parameters are initialized according to the current Core configuration and the last used local CallParams, the ones passed through Call.update, Call.accept_with_params or linphone_call_accept_update_with_params().

Parameters
  • call: Call for which the parameters are to be build, or None in the case where the parameters are to be used for a new outgoing call.
Returns

A new CallParams object.

def create_chat_room(self, participant: Address) -> ChatRoom | None:
Parameters
  • participant: Address representing the initial participant to add to the chat room
Returns

The newly created chat room.
Deprecated since version 02/07/2020, use Core.create_chat_room instead.

def create_client_group_chat_room( self, subject: str, fallback: bool, encrypted: bool) -> ChatRoom | None:

Create a client-side group chat room. When calling this function the chat room is only created at the client-side and is empty. You need to call ChatRoom.add_participants to create at the server side and add participants to it. Also, the created chat room will not be a one-to-one chat room even if ChatRoom.add_participants is called with only one participant.

Parameters
  • subject: The subject of the group chat room
  • fallback: Boolean value telling whether we should plan on being able to fallback to a basic chat room if the client-side group chat room creation fails
  • encrypted: Boolean value telling whether we should apply encryption or not on chat messages sent and received on this room.
Returns

The newly created client-side group chat room.
Deprecated since version 02/07/2020, use Core.create_chat_room instead.

def create_conference_params( self, conference: Conference | None) -> ConferenceParams:

Create some default conference parameters for instanciating a conference with Core.create_conference_with_params.

Parameters
  • conference: Conference for which the parameters are to be build, or None in the case where the parameters are to be used for a new conference.
Returns

a ConferenceParams object.

def create_conference_scheduler(self) -> ConferenceScheduler:

Create a conference scheduler that can be used to create remote conferences for now or later and then send conference info as an ICS through chat.

Returns

A pointer on the freshly created ConferenceScheduler.

def create_conference_with_params( self, params: ConferenceParams) -> Conference | None:

Create a conference. Local or remote conference is determinated from the 'conference_type' variable in the 'misc' section of the configuration, or by the factory address parameter. See ConferenceParams.conference_factory_address for more details.

Parameters
Returns

A pointer on the freshly created conference Conference. That object will be automatically freed by the core after calling Core.terminate_conference.

def create_config(self, filename: str | None) -> Config:

Create a Config object from a user config file.

Parameters
  • filename: The filename of the config file to read to fill the instantiated Config
Returns

a Config object.

def create_content(self) -> Content:

Create a content with default values from Linphone core.

Returns

Content object with default values set

def create_default_chat_room_params(self) -> ChatRoomParams:

Creates and returns the default chat room parameters.

Returns

A ChatRoomParams object

def create_ekt_info_from_xml(self, xml_body: str) -> EktInfo | None:

Gets a EktInfo from an XML body.

Parameters
  • xml_body: the string containing the XML body
Returns

The EktInfo

def create_friend(self) -> Friend:

Create a default LinphoneFriend.

Returns

The created Friend object

def create_friend_from_vcard(self, vcard: Vcard) -> Friend | None:

Create a Friend from ai Vcard.

Parameters
Returns

A new Friend object which has its vCard attribute initialized from the given vCard, accessible using Friend.vcard.

def create_friend_list(self) -> FriendList:

Create a new empty FriendList object.

Returns

A new FriendList object.

def create_friend_with_address(self, address: str) -> Friend | None:

Create a Friend from the given address.

Parameters
  • address: A string containing the address to create the Friend from
Returns

The created Friend object.

def create_info_message(self) -> InfoMessage:

Creates an empty info message.

Returns

a new LinphoneInfoMessage.
The info message can later be filled with information using InfoMessage.add_header or InfoMessage.content, and finally sent with linphone_core_send_info_message().

def create_ldap(self) -> Ldap:

Create an empty LDAP search. Ldap.params must be call to save the parameters in the configuration file.

Returns

Ldap with default values set

def create_ldap_params(self) -> LdapParams:

Create a LDAP params using default values from Linphone core. Check #linphone_ldap_params to update values. In order to add a new LDAP configuration to Magic search, these parameters must be passed to linphone_core_create_ldap_with_params. Or, use Ldap.params. The newly created LDAP from Core.create_ldap.

Returns

LdapParams with default values set.

def create_ldap_with_params(self, params: LdapParams) -> Ldap:

Create a LDAP search using given parameters and store them in the configuration file.

Parameters
Returns

Ldap with default values set

def create_local_player( self, sound_card_name: str | None, video_display_name: str | None, window_id: object | None) -> Player | None:

Create an independent media file player. This player support WAVE and MATROSKA formats.

Parameters
  • sound_card_name: Playback sound card. If None, the ringer sound card set in Core will be used
  • video_display_name: Video display. If None, the video display set in Core will be used
  • window_id: Id of the drawing window. Depend of video out
Returns

A pointer on the new instance. None if failed.

def create_nat_policy(self) -> NatPolicy:

Create a new NatPolicy object with every policies being disabled.

Returns

A new NatPolicy object.

def create_native_preview_window_id(self) -> object | None:

Create a native window handle for the video preview window. see Core.native_video_window_id for details about window_id MSQOgl can be used for the creation. Core.create_native_preview_window_id returns a #QQuickFramebufferObject::Renderer. This object must be returned by your QQuickFramebufferObject::createRenderer() overload for Qt. Core.native_preview_window_id must be called with this object after the creation. Note : Qt blocks GUI thread when calling createRenderer(), so it is safe to call linphone functions there if needed.

Returns

The native window handle of the video preview window.

def create_native_video_window_id(self) -> object | None:

Create a native window handle for the video window. see Core.native_video_window_id for details about window_id MSQOgl can be used for the creation. Core.create_native_video_window_id returns a #QQuickFramebufferObject::Renderer. This object must be returned by your QQuickFramebufferObject::createRenderer() overload for Qt. Core.native_video_window_id must be called with this object after the creation. Note : Qt blocks GUI thread when calling createRenderer(), so it is safe to call linphone functions there if needed.

Returns

The native window handle of the video window.

def create_notify(self, resource: Address, event: str) -> Event:

Create an out-of-dialog notification, specifying the destination resource, the event name. The notification can be send with Event.notify.

Parameters
  • resource: the destination resource
  • event: the event name
Returns

a Event holding the context of the notification.

def create_one_shot_publish(self, resource: Address, event: str) -> Event:

Create a publish context for a one-shot publish. After being created, the publish must be sent using Event.send_publish. The Event is automatically terminated when the publish transaction is finished, either with success or failure. The application must not call Event.terminate for such one-shot publish.

Parameters
  • resource: the resource uri for the event
  • event: the event name
Returns

the Event holding the context of the publish.

def create_presence_activity( self, acttype: PresenceActivityType, description: str | None) -> PresenceActivity:

Create a PresenceActivity with the given type and description.

Parameters
  • acttype: The PresenceActivityType to set for the activity.
  • description: An additional description of the activity to set for the activity. Can be None if no additional description is to be added.
Returns

The created PresenceActivity object.

def create_presence_model(self) -> PresenceModel:

Create a default LinphonePresenceModel.

Returns

The created PresenceModel object.

def create_presence_model_with_activity( self, acttype: PresenceActivityType, description: str | None) -> PresenceModel:

Create a PresenceModel with the given activity type and activity description.

Parameters
  • acttype: The PresenceActivityType to set for the activity of the created model.
  • description: An additional description of the activity to set for the activity. Can be None if no additional description is to be added.
Returns

The created PresenceModel object.

def create_presence_model_with_activity_and_note( self, acttype: PresenceActivityType, description: str | None, note: str, lang: str | None) -> PresenceModel:

Create a PresenceModel with the given activity type, activity description, note content and note language.

Parameters
  • acttype: The PresenceActivityType to set for the activity of the created model.
  • description: An additional description of the activity to set for the activity. Can be None if no additional description is to be added.
  • note: The content of the note to be added to the created model.
  • lang: The language of the note to be added to the created model.
Returns

The created PresenceModel object.

def create_presence_note(self, content: str, lang: str | None) -> PresenceNote:

Create a PresenceNote with the given content and language.

Parameters
  • content: The content of the note to be created.
  • lang: The language of the note to be created.
Returns

The created PresenceNote object.

def create_presence_person(self, _id: str) -> PresencePerson:

Create a PresencePerson with the given id.

Parameters
  • _id: The id of the person to be created.
Returns

The created PresencePerson object.

def create_presence_service( self, _id: str, basic_status: PresenceBasicStatus, contact: str) -> PresenceService:

Create a PresenceService with the given id, basic status and contact.

Parameters
  • _id: The id of the service to be created.
  • basic_status: The basic status of the service to be created.
  • contact: A string containing a contact information corresponding to the service to be created.
Returns

The created PresenceService object.

def create_primary_contact_parsed(self) -> Address | None:

Same as Core.primary_contact but the result is a Address object instead of const char *.

Returns

a Address object.

def create_proxy_config(self) -> ProxyConfig:

Create a proxy config with default values from Linphone core.

Returns

ProxyConfig with default values set

def create_publish( self, resource: Address, event: str, expires: int) -> Event:

Create a publish context for an event state. After being created, the publish must be sent using Event.send_publish. After expiry, the publication is refreshed unless it is terminated before.

Parameters
  • resource: the resource uri for the event
  • event: the event name
  • expires: the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
Returns

the Event holding the context of the publish.

def create_recorder(self, params: RecorderParams) -> Recorder:

Create a media file recorder. This recorder support WAVE and MATROSKA formats.

Parameters
  • params: The RecorderParams that will contains all recorder parameters.
Returns

A pointer on the new instance. None if failed.

def create_recorder_params(self) -> RecorderParams:

Create a recorder params that will hold parameters. This recorder support WAVE and MATROSKA formats.

Returns

A pointer on the newly created instance.

def create_subscribe( self, resource: Address, proxy: ProxyConfig, event: str, expires: int) -> Event:

Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body. If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before. Unlike Core.subscribe the subscription isn't sent immediately. It will be send when calling Event.send_subscribe.

Parameters
  • resource: the destination resource
  • proxy: the proxy configuration to use
  • event: the event name
  • expires: the whished duration of the subscription
Returns

a Event holding the context of the created subcription.

def create_xml_from_ekt_info(self, ekt_info: EktInfo) -> str | None:

Gets an XML body.

Parameters
Returns

The XML body

def create_xml_rpc_session(self, url: str) -> XmlRpcSession:

Create a XmlRpcSession for a given url.

Parameters
  • url: The URL to the XML-RPC server. Must be NON None.
Returns

The new XmlRpcSession object.

def delete_chat_room(self, chat_room: ChatRoom):

Removes a chatroom including all message history from the LinphoneCore.

Parameters
def delete_conference_information(self, conference_info: ConferenceInfo):

Deletes a conference information from DB.

Parameters
def did_register_for_remote_push(self, device_token: object | None):

Sets device_token when application didRegisterForRemoteNotificationsWithDeviceToken (IOS only).

Parameters
  • device_token: (NSData *).
def did_register_for_remote_push_with_stringified_token(self, device_token_str: str | None):

Sets device_token when application didRegisterForRemoteNotificationsWithDeviceToken (IOS only).

Parameters
  • device_token_str: extracted from the Data objectf received in didRegisterForRemoteNotificationsWithDeviceToken ios function. Append ":remote" after data formating..
def disable_chat(self, deny_reason: Reason):

Inconditionnaly disable incoming chat messages.

Parameters
  • deny_reason: the deny reason (Reason.None has no effect).
def enable_chat(self):

Enable reception of incoming chat messages. By default it is enabled but it can be disabled with Core.disable_chat.

def ensure_registered(self):

Call this method when you receive a push notification (if you handle push notifications manually). It will ensure the proxy configs are correctly registered to the proxy server, so the call or the message will be correctly delivered. Deprecated since version 09/03/2022 See Core.process_push_notification instead..

def enter_background(self):

This method is called by the application to notify the linphone core library when it enters background mode.

def enter_conference(self) -> int:

Join the local participant to the running conference.

Returns

0 if succeeded. Negative number if failed Deprecated since version 09/03/2021 Use Conference.enter instead..

def enter_foreground(self):

This method is called by the application to notify the linphone core library when it enters foreground mode.

def file_format_supported(self, fmt: str) -> bool:

Returns whether a specific file format is supported. seealso linphone_core_get_supported_file_formats.

Parameters
  • fmt: The format extension (wav, mkv).
Returns

True if the file format is supported, False otherwise

def find_auth_info( self, realm: str | None, username: str, sip_domain: str | None) -> AuthInfo | None:

Find authentication info matching realm, username, domain criteria. First of all, (realm,username) pair are searched. If multiple results (which should not happen because realm are supposed to be unique), then domain is added to the search.

Parameters
  • realm: the authentication 'realm' (optional)
  • username: the SIP username to be authenticated (mandatory)
  • sip_domain: the SIP domain name (optional)
Returns

a AuthInfo if found.

def find_call_from_uri(self, uri: str) -> Call | None:

Search from the list of current calls if a remote address match uri.

Parameters
  • uri: which should match call remote uri
Returns

Call or None if no match is found.
Deprecated since version 27/10/2020. Use Core.call_by_remote_address2 instead..

def find_call_log(self, call_id: str, limit: int) -> CallLog | None:

Get the call log matching the call id, or None if can't be found.

Parameters
  • call_id: Call id of the call log to find
  • limit: Search limit of the most recent call logs to find
Returns

A call log matching the call id if any.

def find_call_log_from_call_id(self, call_id: str) -> CallLog | None:

Get the call log matching the call id, or None if can't be found.

Parameters
  • call_id: Call id of the call log to find
Returns

A call log matching the call id if any.

def find_chat_room( self, peer_addr: Address, local_addr: Address) -> ChatRoom | None:

Find a chat room. No reference is transfered to the application. The Core keeps a reference on the chat room.

Parameters
  • peer_addr: a linphone address.
  • local_addr: a linphone address.
Returns

ChatRoom where messaging can take place.
Deprecated since version 02/07/2020, use Core.search_chat_room instead.

def find_conference_information_from_uri(self, uri: Address) -> ConferenceInfo | None:

Retrieve the conference information linked to the provided URI if any.

Parameters
Returns

The ConferenceInfo found if any, None otherwise.

def find_contacts_by_char(self, _filter: str, sip_only: bool) -> list[Address]:

Retrieves a list of Address sort and filter.

Parameters
  • _filter: Chars used for the filter*
  • sip_only: Only sip address or not
Returns

A list of filtered Address + the Address created with the filter.

def find_friend(self, address: Address) -> Friend | None:

Search a Friend by its address.

Parameters
  • address: The Address to use to search the friend.
Returns

The Friend object corresponding to the given address or None if not found.

def find_friend_by_phone_number(self, phone_number: str) -> Friend | None:

Search a Friend by its phone number.

Parameters
  • phone_number: The phone number to use to search the friend.
Returns

The Friend object corresponding to the given phone number or None if not found.

def find_friends(self, address: Address) -> list[Friend]:

Search all Friend matching an address.

Parameters
  • address: The address to use to search the friends.
Returns

A list of Friend corresponding to the given address.

def find_one_to_one_chat_room( self, local_addr: Address, participant_addr: Address, encrypted: bool) -> ChatRoom | None:

Find a one to one chat room. No reference is transfered to the application. The Core keeps a reference on the chat room.

Parameters
  • local_addr: a linphone address.
  • participant_addr: a linphone address.
  • encrypted: whether to look for an encrypted chat room or not
Returns

ChatRoom where messaging can take place.
Deprecated since version 02/07/2020, use Core.search_chat_room instead.

def get_account_by_idkey(self, idkey: str | None) -> Account | None:

Search for a Account by it's idkey.

Parameters
  • idkey: An arbitrary idkey string associated to an account.
Returns

the Account object for the given idkey value, or None if none found

def get_call_by_callid(self, call_id: str) -> Call | None:

Get the call by callid.

Returns

call Call, return null if there is no call find.

def get_call_by_remote_address(self, remote_address: str) -> Call | None:

Get the call with the remote_address specified.

Parameters
  • remote_address: The remote address of the call that we want to get
Returns

The call if it has been found, None otherwise.
Deprecated since version 08/07/2020 use Core.call_by_remote_address2 instead.

def get_call_by_remote_address2(self, remote_address: Address) -> Call | None:

Get the call with the specified Address.

Parameters
  • remote_address: the Address for which the call remote address must match
Returns

the Call of the call if found.

def get_call_history( self, peer_address: Address, local_address: Address) -> list[CallLog]:

Get the list of call logs (past calls). At the contrary of linphone_core_get_call_logs, it is your responsibility to unref the logs and free this list once you are done using it. Requires ENABLE_DB_STORAGE to work.

Parameters
  • peer_address: The remote Address object.
  • local_address: The local Address object
Returns

A list of CallLog.

def get_chat_room( self, peer_addr: Address, local_addr: Address) -> ChatRoom | None:

Get a chat room. If it does not exist yet, it will be created as a basic chat room. No reference is transfered to the application. The Core keeps a reference on the chat room.

This method is prone to errors, use Core.search_chat_room

instead

Parameters
  • peer_addr: a linphone address.
  • local_addr: a linphone address.
Returns

ChatRoom where messaging can take place.
Deprecated since version 02/07/2020, use Core.search_chat_room instead.

def get_chat_room_from_uri(self, to: str) -> ChatRoom | None:

Get a chat room for messaging from a sip uri like sip:joe@sip.linphone.org. If it does not exist yet, it will be created as a basic chat room. No reference is transfered to the application. The Core keeps a reference on the chat room.

This method is prone to errors, use Core.search_chat_room

instead

Parameters
  • to: The destination address for messages.
Returns

ChatRoom where messaging can take place.
Deprecated since version 02/07/2020, use Core.search_chat_room instead.

def get_conference_information_list_after_time(self, time: int) -> list[ConferenceInfo]:

Retrieve the list of conference information on DB after a certain time.

Parameters
  • time: Time to retrieve conference info.
Returns

The list of conference infos .

def get_friend_by_ref_key(self, key: str) -> Friend | None:

Search a Friend by its reference key.

Parameters
  • key: The reference key to use to search the friend.
Returns

The Friend object corresponding to the given reference key.

def get_friend_list_by_name(self, name: str) -> FriendList | None:

Retrieves the list of Friend from the core that has the given display name.

Parameters
  • name: the name of the list
Returns

the first FriendList object or None.

def get_new_chat_room_from_conf_addr(self, chat_room_addr: str) -> ChatRoom | None:

Get the chat room we have been added into using the chat_room_addr included in the push notification body This will start the core given in parameter, iterate until the new chat room is received and return it. By default, after 25 seconds the function returns because iOS kills the app extension after 30 seconds.

Parameters
  • chat_room_addr: The sip address of the chat room
Returns

The ChatRoom object.

def get_new_message_from_callid(self, call_id: str) -> PushNotificationMessage | None:

Get the chat message with the call_id included in the push notification body This will start the core given in parameter, iterate until the message is received and return it. By default, after 25 seconds the function returns because iOS kills the app extension after 30 seconds.

Parameters
  • call_id: The callId of the Message SIP transaction
Returns

The ChatMessage object.

def get_payload_type( self, _type: str, rate: int, channels: int) -> PayloadType | None:

Get payload type from mime type and clock rate. This function searches in audio and video codecs for the given payload type name and clockrate.

Parameters
  • _type: payload mime type (I.E SPEEX, PCMU, VP8)
  • rate: can be LINPHONE_FIND_PAYLOAD_IGNORE_RATE
  • channels: number of channels, can be LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
Returns

Returns None if not found. If a PayloadType is returned, it must be released with linphone_payload_type_unref after using it.

def get_proxy_config_by_idkey(self, idkey: str) -> ProxyConfig | None:

Search for a ProxyConfig by it's idkey.

Parameters
  • idkey: An arbitrary idkey string associated to a proxy configuration
Returns

the ProxyConfig object for the given idkey value, or None if none found

def get_unread_chat_message_count_from_local(self, address: Address) -> int:

Return the unread chat message count for a given local address.

Parameters
Returns

The unread chat message count.

def get_zrtp_status(self, addr: str) -> ZrtpPeerStatus:

Get the zrtp sas validation status for a peer uri. Once the SAS has been validated or rejected, the status will never return to Unknown (unless you delete your cache)

Parameters
  • addr: the peer uri
Returns
  • LinphoneZrtpPeerStatusUnknown: this uri is not present in cache OR during calls with the active device, SAS never was validated or rejected
def has_builtin_echo_canceller(self) -> bool:

Check whether the device has a hardware echo canceller.

Returns

True if it does, False otherwise

def has_crappy_opengl(self) -> bool:

Check whether the device is flagged has crappy opengl.

Returns

True if crappy opengl flag is set, False otherwise

def in_call(self) -> bool:

Tells whether there is a call running.

Returns

A boolean value telling whether a call is currently running or not

def interpret_url( self, url: str, apply_international_prefix: bool) -> Address | None:

Constructs a Address from the given string if possible. In case of just a username, characters will be unescaped. If a phone number is detected, it will be flattened. sip: or sips: prefix will be added if not present. Finally, @domain will be added if not present using default proxy config. seealso ProxyConfig.normalize_sip_uri for documentation..

Parameters
  • url: the url to parse
  • apply_international_prefix: whether or not to try to format url as phone number using default account prefix if it set (and if url is a number).
Returns

the Address matching the url or None in case of failure.

def invite(self, url: str) -> Call | None:

Initiates an outgoing call. The application doesn't own a reference to the returned LinphoneCall object. Use linphone_call_ref to safely keep the LinphoneCall pointer valid within your application.

Parameters
  • url: The destination of the call (sip address, or phone number).
Returns

A Call object or None in case of failure.

def invite_address(self, addr: Address) -> Call | None:

Initiates an outgoing call given a destination Address The Address can be constructed directly using Factory.create_address, or created by Core.interpret_url. The application doesn't own a reference to the returned Call object. Use linphone_call_ref to safely keep the Call pointer valid within your application.

Parameters
  • addr: The destination of the call (sip address).
Returns

A Call object or None in case of failure.

def invite_address_with_params( self, addr: Address, params: CallParams, subject: str | None, content: Content | None) -> Call | None:

Initiates an outgoing call given a destination Address The Address can be constructed directly using Factory.create_address, or created by Core.interpret_url. The application doesn't own a reference to the returned Call object. Use linphone_call_ref to safely keep the Call pointer valid within your application. If the proxy is not specified in parameters, the caller proxy will be automatically selected by finding what is the best to reach the destination of the call.

Parameters
  • addr: The destination of the call (sip address).
  • params: Call parameters
  • subject: Subject of the call
  • content: Body of the SIP INVITE
Returns

A Call object or None in case of failure.

def invite_with_params(self, url: str, params: CallParams) -> Call | None:

Initiates an outgoing call according to supplied call parameters The application doesn't own a reference to the returned Call object. Use linphone_call_ref to safely keep the Call pointer valid within your application.

Parameters
  • url: The destination of the call (sip address, or phone number).
  • params: the CallParams call parameters
Returns

A Call object or None in case of failure.

def is_content_type_supported(self, content_type: str) -> bool:

Tells whether a content type is supported.

Parameters
  • content_type: The content type to check
Returns

A boolean value telling whether the specified content type is supported or not.

def is_media_encryption_supported(self, menc: MediaEncryption) -> bool:

Check if media encryption is supported.

Parameters
  • menc: The media encryption policy to be used.
Returns

True if the media encryption is supported, False otherwise

def is_media_filter_supported(self, filtername: str) -> bool:

Checks if the given media filter is loaded and usable. This is for advanced users of the library, mainly to expose mediastreamer video filter status.

Parameters
  • filtername: the filter name
Returns

True if the filter is loaded and usable, False otherwise

def is_plugin_loaded(self, name: str) -> bool:

Tells whether a plugin is loaded or not.

Parameters
  • name: name of the plugin
Returns

A boolean value telling whether the plugin has been loaded

def iterate(self):

Main loop function. It is crucial that your application call it periodically. Core.iterate performs various backgrounds tasks:

def ldap_available(self) -> bool:

Tells if LDAP is available.

Returns

True if LDAP is available, False otherwise

def leave_conference(self) -> int:

Make the local participant leave the running conference.

Returns

0 if succeeded. Negative number if failed Deprecated since version 09/03/2021 Use Conference.leave instead..

def lime_x3dh_available(self) -> bool:

Tells if LIME X3DH is available.

def load_config_from_xml(self, xml_uri: str):

Update current config with the content of a xml config file.

Parameters
  • xml_uri: the path to the xml file
def media_encryption_supported(self, menc: MediaEncryption) -> bool:

Check if a media encryption type is supported.

Parameters
Returns

whether a media encryption scheme is supported by the Core engine

def migrate_logs_from_rc_to_db(self):

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

def migrate_to_multi_transport(self) -> int:

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 Core.iterate

Returns

1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error.

def notify_all_friends(self, presence: PresenceModel):

Notify all friends that have subscribed.

Parameters
def notify_notify_presence_received(self, linphone_friend: Friend):

Notifies the upper layer that a presence status has been received by calling the appropriate callback if one has been set. This method is for advanced usage, where customization of the liblinphone's internal behavior is required.

Parameters
  • linphone_friend: the Friend whose presence information has been received.
def notify_notify_presence_received_for_uri_or_tel( self, linphone_friend: Friend, uri_or_tel: str, presence_model: PresenceModel):

Notifies the upper layer that a presence model change has been received for the uri or telephone number given as a parameter, by calling the appropriate callback if one has been set. This method is for advanced usage, where customization of the liblinphone's internal behavior is required.

Parameters
  • linphone_friend: the Friend whose presence information has been received.
  • uri_or_tel: telephone number or sip uri
  • presence_model: the PresenceModel that has been modified
def pause_all_calls(self) -> int:

Pause all currently running calls.

Returns

0

def play_dtmf(self, dtmf: str, duration_ms: int):

Plays a dtmf sound to the local user.

Parameters
  • dtmf: DTMF to play ['0'..'16'] | '#' | '#'
  • duration_ms: Duration in ms, -1 means play until next further call to Core.stop_dtmf
def play_local(self, audiofile: str) -> int:

Plays an audio file to the local user. This function works at any time, during calls, or when no calls are running. It doesn't request the underlying audio system to support multiple playback streams.

Parameters
  • audiofile: The path to an audio file in wav PCM 16 bit format
Returns

0 on success, -1 on error

def preempt_sound_resources(self) -> int:

Empties sound resources to allow a new call to be accepted. This function is autyomatically called by the core if the media resource mode is set to unique.

Returns

An integer returning the exit value. If it is 0, sound resources have been emptied. Otherwise, sound resources are busy and cannot be freed immediately.

def preview_ogl_render(self):

Call generic OpenGL render for a given core.

def process_push_notification(self, call_id: str | None):

Call this method when you receive a push notification (if you handle push notifications manually). It will ensure the proxy configs are correctly registered to the proxy server, so the call or the message will be correctly delivered.

Parameters
  • call_id: the Call-ID of the MESSAGE or INVITE for which the push was received and to wait for.
def publish( self, resource: Address, event: str, expires: int, body: Content) -> Event | None:

Publish an event state. This first create a Event with Core.create_publish and calls Event.send_publish to actually send it. After expiry, the publication is refreshed unless it is terminated before.

Parameters
  • resource: the resource uri for the event
  • event: the event name
  • expires: the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
  • body: the actual published data
Returns

the Event holding the context of the publish.

def realtime_text_get_keepalive_interval(self) -> int:

Gets keep alive interval of real time text.

Returns

keep alive interval of real time text.

def realtime_text_set_keepalive_interval(self, interval: int):

Set keep alive interval for real time text.

Parameters
  • interval: The keep alive interval of real time text, 25000 by default.
def refresh_registers(self):

force registration refresh to be initiated upon next iterate

def reject_subscriber(self, linphone_friend: Friend):

Black list a friend. same as Friend.inc_subscribe_policy with SubscribePolicy.SPDeny policy;

Parameters
  • linphone_friend: Friend to reject
def reload_ms_plugins(self, path: str | None):

Reload mediastreamer2 plugins from specified directory.

Parameters
  • path: the path from where plugins are to be loaded, pass None to use default (compile-time determined) plugin directory.
def reload_sound_devices(self):

Update detection of sound devices. Use this function when the application is notified of USB plug events, so that list of available hardwares for sound playback and capture is updated.

def reload_video_devices(self):

Update detection of camera devices. Use this function when the application is notified of USB plug events, so that list of available hardwares for video capture is updated.

def remove_account(self, account: Account):

Removes an account. Core will then automatically unregister and place the account on a deleted list. For that reason, a removed account does NOT need to be freed.

Parameters
def remove_auth_info(self, info: AuthInfo):

Removes an authentication information object.

Parameters
def remove_call_log(self, call_log: CallLog):

Remove a specific call log from call history list. This function destroys the call log object. It must not be accessed anymore by the application after calling this function.

Parameters
  • call_log: CallLog object to remove.
def remove_content_type_support(self, content_type: str):

Remove support for the specified content type. It is the application responsibility to handle it correctly afterwards.

Parameters
  • content_type: The content type to remove support for
def remove_friend_list(self, _list: FriendList):

Removes a friend list.

Parameters
def remove_from_conference(self, call: Call) -> int:

Remove a call from the conference.

Parameters
  • call: a call that has been previously merged into the conference.
    After removing the remote participant belonging to the supplied call, the call becomes a normal call in paused state. If one single remote participant is left alone together with the local user in the conference after the removal, then the conference is automatically transformed into a simple call in StreamsRunning state. The conference's resources are then automatically destroyed. In other words, unless Core.leave_conference is explicitly called, the last remote participant of a conference is automatically put in a simple call in running state.
Returns

0 if successful, -1 otherwise.

def remove_ldap(self, ldap: Ldap):

Remove a LDAP from the configuration.

Parameters
  • ldap: The LDAP to remove.
def remove_linphone_spec(self, spec: str):

Remove the given linphone specs from the list of functionalities the linphone client supports.

Parameters
  • spec: The spec to remove
def remove_proxy_config(self, config: ProxyConfig):

Removes a proxy configuration. Core 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
def remove_supported_tag(self, tag: str):

Remove a supported tag.

Parameters
def reset_echo_cancellation_calibration(self):

Clears all state resulting from a previous echo canceller calibration procedure, which restores default policy and settings for echo cancellation. seealso Core.echo_cancellation_enabled and.

Core.start_echo_canceller_calibration

def reset_missed_calls_count(self):

Reset the counter of missed calls.

def search_chat_room( self, params: ChatRoomParams | None, localAddr: Address | None, remoteAddr: Address | None, participants: list[Address] | None) -> ChatRoom | None:

Find a chat room.

Parameters
  • params: The chat room parameters to match ChatRoomParams or None
  • localAddr: Address representing the local proxy configuration or None

  • remoteAddr: Address to search for or None

  • participants: The participants that must be present in the chat room to find.
Returns

A matching chat room or None if none matches.

def search_conference(self, conferenceAddr: Address) -> Conference | None:

Find a conference.

Parameters
  • conferenceAddr: Address representing the conference address
Returns

A pointer on Conference whose conference address is the one provided as argument or None if none matches

def set_audio_port_range(self, min_port: int, max_port: int):

Sets the UDP port range from which to randomly select the port used for audio streaming.

Parameters
  • min_port: The lower bound of the audio port range to use
  • max_port: The upper bound of the audio port range to use
def set_qrcode_decode_rect(self, x: int, y: int, w: int, h: int):

Set the rectangle where the decoder will search a QRCode.

Parameters
  • x: axis
  • y: axis
  • w: width
  • h: height
def set_text_port_range(self, min_port: int, max_port: int):

Sets the UDP port range from which to randomly select the port used for text streaming.

Parameters
  • min_port: The lower bound of the text port range to use
  • max_port: The upper bound of the text port range to use
def set_tone(self, tone_id: ToneID, audiofile: str | None):

Assign an audio file to be played as a specific tone id. This function typically allows to customize telephony tones per country. If you want to disable a tone, set a path to a non-existent file. To disable all tones, use Core.call_tone_indications_enabled or set the tone_indications to 0 in the [misc] section of your linphonerc.

Parameters
  • tone_id: the #LinphoneToneId
  • audiofile: a wav file to be played or None to use the default (generated) one.
def set_user_agent(self, name: str | None, version: str | None):

Set the user agent string used in SIP messages. Set the user agent string used in SIP messages as "[ua_name]/[version]". No slash character will be printed if None is given to "version". If None is given to "ua_name" and "version" both, the User-agent header will be empty. This function should be called just after linphone_factory_create_core ideally.

Parameters
  • name: Name of the user agent.
  • version: Version of the user agent.
def set_video_port_range(self, min_port: int, max_port: int):

Sets the UDP port range from which to randomly select the port used for video streaming.

Parameters
  • min_port: The lower bound of the video port range to use
  • max_port: The upper bound of the video port range to use
def sound_device_can_capture(self, device: str) -> bool:

Tells whether a specified sound device can capture sound.

Parameters
  • device: the device name as returned by linphone_core_get_sound_devices
Returns

A boolean value telling whether the specified sound device can capture sound Deprecated since version 08/07/2020 use AudioDevice API instead().

def sound_device_can_playback(self, device: str) -> bool:

Tells whether a specified sound device can play sound.

Parameters
  • device: the device name as returned by linphone_core_get_sound_devices
Returns

A boolean value telling whether the specified sound device can play sound Deprecated since version 08/07/2020 use AudioDevice API instead().

def sound_resources_locked(self) -> bool:

Check if a call will need the sound resources in near future (typically an outgoing call that is awaiting response). In liblinphone, it is not possible to have two independant calls using sound device or camera at the same time. In order to prevent this situation, an application can use Core.sound_resources_locked to know whether it is possible at a given time to start a new outgoing call. When the function returns True, an application should not allow the user to start an outgoing call.

Returns

A boolean value telling whether a call will need the sound resources in near future

def start(self) -> int:

Start a Core object after it has been instantiated and not automatically started. Also re-initialize a Core object that has been stopped using Core.stop. Must be called only if GlobalState is either Ready of Off. State will changed to Startup, Configuring and then On.

Returns

0: success, -1: global failure, -2: could not connect database

def start_conference_recording(self, path: str) -> int:

Start recording the running conference.

Parameters
  • path: Path to the file where the recording will be written
Returns

0 if succeeded. Negative number if failed Deprecated since version 14/09/2021 Use Conference.start_recording instead..

def start_echo_canceller_calibration(self) -> int:

Starts an echo calibration of the sound devices, in order to find adequate settings for the echo canceler automatically.

Returns

LinphoneStatus whether calibration has started or not.

def start_echo_tester(self, rate: int) -> int:

Start the simulation of call to test the latency with an external device.

Parameters
  • rate: Sound sample rate.
Returns

-1 in case of failure, 1 otherwise.

def stop(self):

Stop a Core object after it has been instantiated and started. If stopped, it can be started again using Core.start. Must be called only if GlobalState is either On. State will changed to Shutdown and then Off.

def stop_async(self):

Stop asynchronously a Core object after it has been instantiated and started. State changes to Shutdown then Core.iterate must be called to allow the Core to end asynchronous tasks (terminate call, etc.). When all tasks are finished, State will change to Off. Must be called only if GlobalState is On. When GlobalState is Off Core can be started again using Core.start.

def stop_conference_recording(self) -> int:

Stop recording the running conference.

Returns

0 if succeeded. Negative number if failed Deprecated since version 14/09/2021 Use Conference.stop_recording instead..

def stop_dtmf(self):

Stops playing a dtmf started by Core.play_dtmf.

def stop_echo_tester(self) -> int:

Stop the simulation of call.

def stop_ringing(self):

Whenever the liblinphone is playing a ring to advertise an incoming call or ringback of an outgoing call, this function stops the ringing. Typical use is to stop ringing when the user requests to ignore the call.

def subscribe( self, resource: Address, event: str, expires: int, body: Content | None) -> Event:

Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body. If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before.

Parameters
  • resource: the destination resource
  • event: the event name
  • expires: the whished duration of the subscription
  • body: an optional body, may be None.
Returns

a Event holding the context of the created subcription.

def take_preview_snapshot(self, _file: str) -> int:

Take a photo of currently from capture device and write it into a jpeg file. Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns.

Parameters
  • _file: a path where to write the jpeg content.
Returns

0 if successful, -1 otherwise (typically if jpeg format is not supported).

def terminate_all_calls(self) -> int:

Terminates all the calls.

Returns

0

def terminate_conference(self) -> int:

Terminate the running conference. If it is a local conference, all calls inside it will become back separate calls and will be put in #LinphoneCallPaused state. If it is a conference involving a focus server, all calls inside the conference will be terminated.

Returns

0 if succeeded. Negative number if failed

def upload_log_collection(self):

Upload the log collection to the configured server url.

def use_preview_window(self, yesno: bool):

Tells the core to use a separate window for local camera preview video, instead of inserting local view within the remote video window.

Parameters
  • yesno: True to use a separate window, False to insert the preview in the remote video window.
def verify_server_certificates(self, yesno: bool):

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

Parameters
  • yesno: A boolean value telling whether the tls server certificate must be verified
def verify_server_cn(self, yesno: bool):

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

Parameters
  • yesno: A boolean value telling whether the tls server certificate common name must be verified
def video_supported(self) -> bool:

Test if video is supported.

Returns

True if the library was built with video support, False otherwise

class DialPlan:

Represents a dial plan.

country: str

Returns the country name of the dialplan.

Returns

the country name

country_calling_code: str

Returns the country calling code of the dialplan.

Returns

the country calling code

flag: str

Returns the flag of the teritory as unicode characters.

Returns

the flag as unicode characters

international_call_prefix: str

Returns the international call prefix of the dialplan.

Returns

the international call prefix

is_generic: bool

Return if given plan is generic.

Returns

True if generic, False otherwise

iso_country_code: str

Returns the iso country code of the dialplan.

Returns

the iso country code

national_number_length: int

Returns the national number length of the dialplan.

Returns

the national number length

def by_ccc(ccc: str) -> DialPlan:

Find best match for given CCC.

Parameters
  • ccc: The country calling code
Returns

the matching dial plan, or a generic one if none found

def by_ccc_as_int(ccc: int) -> DialPlan:

Find best match for given CCC.

Parameters
  • ccc: the country calling code
Returns

the matching dial plan, or a generic one if none found

def get_all_list() -> list[DialPlan]:

Returns a list of all known dial plans.

Returns

The list of all known dial plans.

def lookup_ccc_from_e164(e164: str) -> int:

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

def lookup_ccc_from_iso(iso: str) -> int:

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

class Dictionary:

Object that represents key-value pair container.

def clear(self):

Clears the dictionary.

def clone(self) -> Dictionary:

Instantiates a new dictionary with values from source.

Returns

The newly created Dictionary object.

def get_float(self, key: str | None) -> float:

Gets the float value of a key.

Parameters
  • key: The key.
Returns

The value.

def get_int(self, key: str | None) -> int:

Gets the int value of a key.

Parameters
  • key: The key.
Returns

The value.

def get_int64(self, key: str | None) -> int:

Gets the int64 value of a key.

Parameters
  • key: The key.
Returns

The value.

def get_linphone_buffer(self, key: str | None) -> Buffer | None:

Gets the LinphoneBuffer value of a key.

Parameters
  • key: The key.
Returns

The value.

def get_string(self, key: str | None) -> str | None:

Gets the char* value of a key.

Parameters
  • key: The key.
Returns

The value.

def has_key(self, key: str | None) -> int:

Search if the key is present in the dictionary.

Parameters
  • key: The key.
Returns

The LinphoneStatus of the operation.

def remove(self, key: str | None) -> int:

Removes the pair of the key.

Parameters
  • key: The key.
Returns

The LinphoneStatus of the operation.

def set_float(self, key: str | None, value: float):

Sets a float value to a key.

Parameters
  • key: The key.
  • value: The int value.
def set_int(self, key: str | None, value: int):

Sets a int value to a key.

Parameters
  • key: The key.
  • value: The int value.
def set_int64(self, key: str | None, value: int):

Sets a int64 value to a key.

Parameters
  • key: The key.
  • value: The int64 value.
def set_linphone_buffer(self, key: str | None, value: Buffer | None):

Sets a LinphoneBuffer value to a key.

Parameters
  • key: The key.
  • value: The LinphoneBuffer value.
def set_string(self, key: str | None, value: str | None):

Sets a char* value to a key.

Parameters
  • key: The key.
  • value: The value.
class DigestAuthenticationPolicy:

The LinphoneDigestAuthenticationPolicy holds parameters relative to digest authentication procedures.

allow_md5: bool

Get whether MD5 hash algorithm is allowed. The default value is True, in order to maximize interoperability. MD5 is considered as a weak algorithm, some might want to disable it, in which case SHA-256 will be required to perform digest authentication.

Returns

a boolean value

allow_no_qop: bool

Get whether digest authentication without 'qop=auth' mode is allowed. The default value is True, in order to maximize interoperability. 'qop=auth' mode enforces security thanks to the use of a client nonce, which makes password brute forcing more difficult. When set to False, linphone will refuse to authenticate to servers that are not implementing the qop=auth mode.

Returns

a boolean value

class EktInfo:

Object representing all informations present in an ekt event.

ciphers: Dictionary | None

Get ciphers.

Returns

a Dictionary object.

cspi: Buffer | None

Get cSPI.

Returns

a Address object.

from_address: Address | None

Get from address.

Returns

a Address object.

sspi: int

Get sSPI.

Returns

a 16-bits unsigned int representing the sSPI.

def add_cipher(self, to: str | None, cipher: Buffer | None):

Add a cipher to the chipher map.

Parameters
  • to: the address to set.
  • cipher: the cipher to set.
class ErrorInfo:

Object representing full details about a signaling error or status. All ErrorInfo object returned by the liblinphone API are readonly and transcients. For safety they must be used immediately after obtaining them. Any other function call to the liblinphone may change their content or invalidate the pointer.

phrase: str | None

Get textual phrase from the error info. This is the text that is provided by the peer in the protocol (SIP).

Returns

The error phrase

protocol: str | None

Get protocol from the error info.

Returns

The protocol.

protocol_code: int

Get the status code from the low level protocol (ex a SIP status code).

Returns

The status code

reason: Reason

Get reason code from the error info.

Returns

A Reason object

retry_after: int

Get Retry-After delay second from the error info.

Returns

The Retry-After delay second

sub_error_info: ErrorInfo | None

Get pointer to chained ErrorInfo set in sub_ei. It corresponds to a Reason header in a received SIP response.

Returns

ErrorInfo pointer defined in the ei object.

warnings: str | None

Provides additional information regarding the failure. With SIP protocol, the content of "Warning" headers are returned.

Returns

More details about the failure.

def set( self, protocol: str | None, reason: Reason, code: int, status: str | None, warning: str | None):

Assign information to a ErrorInfo object.

Parameters
  • protocol: protocol name
  • reason: reason from Reason enum
  • code: protocol code
  • status: description of the reason
  • warning: warning message
class Event:

Object representing an event state, which is subcribed or published. seealso Core.publish.

seealso Core.subscribe.

core: Core

Returns back pointer to the Core that created this Event.

Returns

the Core object associated.

current_callbacks: EventListener | None

Get the current LinphoneEventCbs object associated with a LinphoneEvent.

Returns

The current LinphoneEventCbs object associated with the LinphoneEvent.

error_info: ErrorInfo

Get full details about an error occured.

Returns

a ErrorInfo object.

from_address: Address

Get the "from" address of the subscription.

Returns

the from Address.

name: str

Get the name of the event as specified in the event package RFC.

Returns

the event name.

publish_state: PublishState

Get publish state. If the event object was not created by a publish mechanism, PublishState.None is returned.

Returns

the current PublishState

reason: Reason

Return reason code (in case of error state reached).

Returns

a Reason enum

remote_contact: Address

Get the "contact" address of the subscription.

Returns

The "contact" address of the subscription

request_address: Address | None

Get the "request uri" address of the subscription.

Returns

the request uri Address.

resource: Address

Get the resource address of the subscription or publish.

Returns

the resource Address.

subscription_dir: SubscriptionDir

Get subscription direction. If the object wasn't created by a subscription mechanism, SubscriptionDir.InvalidDir is returned.

Returns

the SubscriptionDir

subscription_state: SubscriptionState

Get subscription state. If the event object was not created by a subscription mechanism, SubscriptionState.None is returned.

Returns

the current SubscriptionState

to_address: Address

Get the "to" address of the subscription.

Returns

the to Address.

def add_listener(self, listener: EventListener):

Adds a listener to this Event object

Parameters
def remove_listener(self, listener: EventListener):

Removes a listener from this this Event object

Parameters
def accept_publish(self) -> int:

Accept an incoming publish.

Returns

0 if successful, error code otherwise

def accept_subscription(self) -> int:

Accept an incoming subcription.

Returns

0 if successful, error code otherwise

def add_custom_header(self, name: str, value: str | None):

Add a custom header to an outgoing susbscription or publish.

Parameters
  • name: header's name
  • value: the header's value.
def deny_publish(self, reason: Reason) -> int:

Deny an incoming publish with given reason.

Returns

0 if successful, error code otherwise

def deny_subscription(self, reason: Reason) -> int:

Deny an incoming subscription with given reason.

Returns

0 if successful, error code otherwise

def get_custom_header(self, name: str) -> str | None:

Obtain the value of a given header for an incoming subscription.

Parameters
  • name: header's name
Returns

the header's value or None if such header doesn't exist.

def notify(self, body: Content | None) -> int:

Send a notification.

Parameters
  • body: an optional body containing the actual notification data.
Returns

0 if successful, -1 otherwise.

def pause_publish(self):

Prevent an event from refreshing its publish. This is useful to let registrations to expire naturally (or) when the application wants to keep control on when refreshes are sent. The refreshing operations can be resumed with ProxyConfig.refresh_register.

def refresh_publish(self) -> int:

Refresh an outgoing publish keeping the same body.

Returns

0 if successful, -1 otherwise.

def refresh_subscribe(self) -> int:

Refresh an outgoing subscription keeping the same body.

Returns

0 if successful, -1 otherwise.

def remove_custom_header(self, name: str):

Remove custom header to an outgoing susbscription or publish.

Parameters
  • name: header's name
def send_publish(self, body: Content) -> int:

Send a publish created by Core.create_publish.

Parameters
  • body: the new data to be published
Returns

0 if successful, -1 otherwise.

def send_subscribe(self, body: Content | None) -> int:

Send a subscription previously created by Core.create_subscribe.

Parameters
  • body: optional content to attach with the subscription.
Returns

0 if successful, -1 otherwise.

def terminate(self):

Terminate an incoming or outgoing subscription that was previously acccepted, or a previous publication. The Event shall not be used anymore after this operation.

def update_publish(self, body: Content) -> int:

Update (refresh) a publish.

Parameters
  • body: the new data to be published
Returns

0 if successful, error code otherwise

def update_subscribe(self, body: Content | None) -> int | None:

Update (refresh) an outgoing subscription, changing the body.

Parameters
  • body: an optional body to include in the subscription update, may be None.
Returns

0 if successful, error code otherwise

class EventLog:

Object that represents an event that must be stored in database. For example, all chat related events are wrapped in an EventLog, and many callbacks use this kind of type as parameter. Use EventLog.type to get the EventLogType it refers to, and then you can use one of the accessor methods to get the underlying object, for example EventLog.chat_message for a ChatMessage.

call_log: CallLog | None

Returns the call log of a conference call event.

Returns

The conference CallLog.

chat_message: ChatMessage | None

Returns the chat message of a conference chat message event.

Returns

The conference ChatMessage.

conference_info: ConferenceInfo | None

Returns the conference info of a conference call event.

Returns

The conference ConferenceInfo.

creation_time: int

Returns the creation time of a event log.

Returns

The event creation time

device_address: Address | None

Returns the device address of a conference participant device event.

Returns

The conference device Address.

ephemeral_message_lifetime: int

Returns the ephemeral message lifetime of a conference ephemeral message event. Ephemeral lifetime means the time before an ephemeral message which has been viewed gets deleted.

Returns

The ephemeral message lifetime.

local_address: Address | None

Returns the local address of a conference event.

Returns

The local Address.

notify_id: int

Returns the notify id of a conference notified event.

Returns

The conference notify id.

participant_address: Address | None

Returns the participant address of a conference participant event.

Returns

The conference participant Address.

peer_address: Address | None

Returns the peer address of a conference event.

Returns

The peer Address.

security_event_faulty_device_address: Address | None

Returns the faulty device address of a conference security event.

Returns

The Address of the faulty device.

security_event_type: SecurityEventType

Returns the type of security event.

Returns

The SecurityEventType type.

subject: str | None

Returns the subject of a conference subject event.

Returns

The conference subject.

type: EventLogType

Returns the type of a event log.

Returns

The EventLogType type

def delete_from_database(self):

Delete event log from database.

class Factory:

The factory is a singleton object devoted to the creation of all the objects of Liblinphone that cannot be created by Core itself. It is also used to configure a few behaviors before creating the Core, like the logs verbosity or collection.

data_resources_dir: str | None

Get the directory where the data resources are located.

Returns

The path to the directory where the data resources are located

dial_plans: list[DialPlan]

Returns a bctbx_list_t of all DialPlans.

Returns

A list of DialPlan

image_resources_dir: str | None

Get the directory where the image resources are located.

Returns

The path to the directory where the image resources are located

is_cache_dir_set: bool

Test if cache dir has been set.

Returns

True if cache dir has been set.

is_config_dir_set: bool

Test if config dir has been set.

Returns

True if config dir has been set.

is_data_dir_set: bool

Test if data dir has been set.

Returns

True if data dir has been set.

is_database_storage_available: bool

Indicates if the storage in database is available.

Returns

True if the database storage is available, False otherwise

is_download_dir_set: bool

Test if download dir has been set.

Returns

True if download dir has been set.

is_imdn_available: bool

Indicates if IMDN are available.

Returns

True if IDMN are available

is_qrcode_available: bool

Indicates if the QRCode feature is available.

Returns

True if QRCodes can be used

liblinphone_plugins_dir: str | None

Get the directory where the liblinphone plugins are located.

Returns

The path to the directory where the liblinphone plugins are located, or None if it has not been set.

msplugins_dir: str | None

Get the directory where the mediastreamer2 plugins are located.

Returns

The path to the directory where the mediastreamer2 plugins are located, or None if it has not been set.

recommended_video_definitions: list[VideoDefinition]

Get the recommended list of standard video definitions. This list is suitable for a widest set of hardware for all video codec implementations, and thus excludes some very high definition formats that are unlikely to work unless specific hardware or codecs are used.

Returns

A list of video definitions.

ring_resources_dir: str | None

Get the directory where the ring resources are located.

Returns

The path to the directory where the ring resources are located

sound_resources_dir: str | None

Get the directory where the sound resources are located.

Returns

The path to the directory where the sound resources are located

supported_video_definitions: list[VideoDefinition]

Get the list of standard video definitions supported by Linphone.

Returns

A list of video definitions.

top_resources_dir: str | None

Get the top directory where the resources are located.

Returns

The path to the top directory where the resources are located

def set_cache_dir(self, path: str | None):

Set the directory where the application local cache is located. If the path is empty (default value), the path will be computed when calling Factory.data_dir

Parameters
  • path: The path to the directory where the application local cache is located
def set_config_dir(self, path: str | None):

Set the directory where the configurations are located. If the path is empty (default value), the path will be computed when calling Factory.config_dir

Parameters
  • path: The path to the directory where the configurations are located
def set_data_dir(self, path: str | None):

Set the directory where the application local data are located. If the path is empty (default value), the path will be computed when calling Factory.data_dir

Parameters
  • path: The path to the directory where the application local data are located
def set_download_dir(self, path: str | None):

Set the directory where downloads are located. If the path is empty (default value), the path will be computed when calling Factory.download_dir

Parameters
  • path: The path to the directory where downloads are located
def set_log_collection_path(self, path: str | None):

Sets the log collection path.

Parameters
  • path: the path of the logs
def compute_ha1_for_algorithm( self, userid: str, password: str, realm: str, algorithm: str) -> str | None:

Computes the hashed version of the password given the user ID and the realm, using given algorithm.

Parameters
  • userid: the username or user ID to use.
  • password: the password to hash.
  • realm: the real to use.
  • algorithm: the algorithm to use (MD5 or SHA-256).
Returns

the generated hash if it succeeded, None otherwise.

def create_address(self, addr: str) -> Address | None:

Parse a string holding a SIP URI and create the according Address object.

Parameters
  • addr: A string holding the SIP URI to parse.
Returns

A new Address.

def create_auth_info( self, username: str, access_token: BearerToken | None, realm: str | None) -> AuthInfo:

Creates a AuthInfo object. The object can be created empty, that is with all arguments set to None. Username, userid, password, realm and domain can be set later using specific methods. At the end, username and passwd (or ha1) are required.

Parameters
  • username: The username that needs to be authenticated
  • access_token: An access token to send to authenticate
  • realm: The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
Returns

A AuthInfo object. linphone_auth_info_unref must be used to destroy it when no longer needed. The Core makes a copy of AuthInfo passed through Core.add_auth_info.

def create_bearer_token(self, token: str, expiration_time: int) -> BearerToken:

Create a new BearerToken object.

Parameters
  • token: the token, as an opaque string.
  • expiration_time: the expiration time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
Returns

the newly created BearerToken .

def create_buffer(self) -> Buffer:

Creates an object Buffer.

Returns

a Buffer

def create_buffer_from_string(self, data: str) -> Buffer:

Creates an object Buffer.

Parameters
  • data: the data to set in the buffer
Returns

a Buffer

def create_conference_info(self) -> ConferenceInfo:

Creates an object ConferenceInfo.

Returns

a ConferenceInfo

def create_conference_info_from_icalendar_content(self, content: Content) -> ConferenceInfo | None:

Creates an object ConferenceInfo from an Icalendar Content.

Parameters
Returns

a ConferenceInfo created from an Icalendar Content

def create_config(self, path: str | None) -> Config:

Creates an object Config.

Parameters
  • path: the path of the config
Returns

a Config

def create_config_from_string(self, data: str) -> Config:

Creates an object Config.

Parameters
  • data: the config data
Returns

a Config

def create_config_with_factory(self, path: str | None, factory_path: str | None) -> Config:

Creates an object Config.

Parameters
  • path: the path of the config
  • factory_path: the path of the factory
Returns

a Config

def create_content(self) -> Content:

Creates an object Content.

Returns

a Content

def create_content_from_file(self, file_path: str) -> Content:

Creates a file object of Content from a file path.

Parameters
  • file_path: the path of the file
Returns

a Content which can be used as a file

def create_core( self, config_path: str | None, factory_config_path: str | None, system_context: object | None) -> Core:

Instantiate a Core object. The Core object is the primary handle for doing all phone actions. It should be unique within your application. The Core object is not started automatically, you need to call Core.start to that effect. The returned Core will be in GlobalState Ready. Core ressources can be released using Core.stop which is strongly encouraged on garbage collected languages.

Parameters
  • config_path: A path to a config file. If it does not exists it will be created. The config file is used to store all settings, proxies... so that all these settings become persistent over the life of the Core object. It is allowed to set a None config file. In that case Core will not store any settings.
  • factory_config_path: A path to a read-only config file that can be used to store hard-coded preferences such as proxy settings or internal preferences. The settings in this factory file always override the ones in the normal config file. It is optional, use None if unneeded.
  • system_context: A pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass None on other platforms.
Returns

a Core object
seealso linphone_core_new_with_config_3().

def create_core_with_config( self, config: Config, system_context: object | None) -> Core:

Instantiate a Core object with a given LinphoneConfig. The Core object is the primary handle for doing all phone actions. It should be unique within your application. The Core object is not started automatically, you need to call Core.start to that effect. The returned Core will be in GlobalState Ready. Core ressources can be released using Core.stop which is strongly encouraged on garbage collected languages.

Parameters
  • config: A Config object holding the configuration for the Core to be instantiated.
  • system_context: A pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass None on other platforms.
Returns

a Core object
seealso Factory.create_core.

def create_digest_authentication_policy(self) -> DigestAuthenticationPolicy:

Create a DigestAuthenticationPolicy object. The DigestAuthenticationPolicy object which is used to configure a policy for digest authentication, such as allowing MD5 or mode without qop=auth.

Returns

a new DigestAuthenticationPolicy .

def create_ekt_info(self) -> EktInfo:

Create an empty EktInfo object.

Returns

A new EktInfo object

def create_error_info(self) -> ErrorInfo:

Creates an object LinphoneErrorInfo.

Returns

a ErrorInfo object.

def create_friend_phone_number( self, phone_number: str, label: str | None) -> FriendPhoneNumber:

Creates a new FriendPhoneNumber object.

Parameters
  • phone_number: The phone number.
  • label: the type of phone number, for example "home", "cell", etc. Use None or empty for no label.
Returns

The newly created FriendPhoneNumber object.

def create_participant_device_identity( self, address: Address, name: str | None) -> ParticipantDeviceIdentity:

Create a ParticipantDeviceIdentity object.

Parameters
  • address: Address object.
  • name: the name given to the device.
Returns

A new ParticipantDeviceIdentity.

def create_participant_info(self, address: Address) -> ParticipantInfo | None:

Creates an object ConferenceInfo from an Icalendar Content.

Parameters
  • address: the Address of the participant
Returns

a ParticipantInfo

def create_qrcode( self, code: str, width: int, height: int, margin: int) -> Content | None:

Creates a Bitmap QRCode and return it into an object Content.

Parameters
  • code: The code to be generated into an image. It must not be empty.
  • width: The requested width of the QRCode image. It will be 100 if 0.
  • height: The requested height of the QRCode image. It will be 100 if 0.
  • margin: The requested margin of the QRCode image.
Returns

a Content

def create_range(self) -> Range:

Creates an object LinphoneRange.

Returns

a Range object.

def create_shared_core( self, config_filename: str | None, factory_config_path: str | None, system_context: object | None, app_group_id: str, main_core: bool) -> Core:

Instantiate a shared Core object. The shared Core allow you to create several Core with the same config. Two Core can't run at the same time. A shared Core can be a "Main Core" or an "Executor Core". A "Main Core" automatically stops a running "Executor Core" when calling Core.start An "Executor Core" can't start unless no other Core is started. It can be stopped by a "Main Core" and switch to GlobalState Off at any time. Shared Executor Core are used in iOS UNNotificationServiceExtension to receive new messages from push notifications. When the application is in background, its Shared Main Core is stopped. The Core object is not started automatically, you need to call Core.start to that effect. The returned Core will be in GlobalState Ready. Core ressources can be released using Core.stop which is strongly encouraged on garbage collected languages.

Parameters
  • config_filename: The name of the config file. If it does not exists it will be created. Its path is computed using the app_group_id. The config file is used to store all settings, proxies... so that all these settings become persistent over the life of the Core object. It is allowed to set a None config file. In that case Core will not store any settings.
  • factory_config_path: A path to a read-only config file that can be used to store hard-coded preferences such as proxy settings or internal preferences. The settings in this factory file always override the ones in the normal config file. It is optional, use None if unneeded.
  • system_context: A pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass None on other platforms.
  • app_group_id: Name of iOS App Group that lead to the file system that is shared between an app and its app extensions.
  • main_core: Indicate if we want to create a "Main Core" or an "Executor Core".
Returns

a Core object
seealso Factory.create_shared_core_with_config.

def create_shared_core_with_config( self, config: Config, system_context: object | None, app_group_id: str, main_core: bool) -> Core:

Instantiate a shared Core object. The shared Core allow you to create several Core with the same config. Two Core can't run at the same time. A shared Core can be a "Main Core" or an "Executor Core". A "Main Core" automatically stops a running "Executor Core" when calling Core.start An "Executor Core" can't start unless no other Core is started. It can be stopped by a "Main Core" and switch to GlobalState Off at any time. Shared Executor Core are used in iOS UNNotificationServiceExtension to receive new messages from push notifications. When the application is in background, its Shared Main Core is stopped. The Core object is not started automatically, you need to call Core.start to that effect. The returned Core will be in GlobalState Ready. Core ressources can be released using Core.stop which is strongly encouraged on garbage collected languages.

Parameters
  • config: A Config object holding the configuration for the Core to be instantiated.
  • system_context: A pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass None on other platforms.
  • app_group_id: Name of iOS App Group that lead to the file system that is shared between an app and its app extensions.
  • main_core: Indicate if we want to create a "Main Core" or an "Executor Core".
Returns

a Core object
seealso Factory.create_shared_core.

def create_signal_information(self) -> SignalInformation:

Creates an object SignalInformation.

Returns

a SignalInformation

def create_transports(self) -> Transports:

Creates an object LinphoneTransports.

Returns

a Transports object.

def create_tunnel_config(self) -> TunnelConfig:

Creates an object TunnelConfig.

Returns

a TunnelConfig

def create_vcard(self) -> Vcard:

Create an empty Vcard.

Returns

a new Vcard.

def create_video_activation_policy(self) -> VideoActivationPolicy:

Creates an object LinphoneVideoActivationPolicy.

Returns

VideoActivationPolicy object.

def create_video_definition(self, width: int, height: int) -> VideoDefinition:

Create a VideoDefinition from a given width and height.

Parameters
  • width: The width of the created video definition
  • height: The height of the created video definition
Returns

A new VideoDefinition object

def create_video_definition_from_name(self, name: str) -> VideoDefinition:

Create a VideoDefinition from a given standard definition name.

Parameters
  • name: The standard definition name of the video definition to create
Returns

A new VideoDefinition object

def create_video_source_descriptor(self) -> VideoSourceDescriptor:

Creates an object VideoSourceDescriptor.

Returns

a VideoSourceDescriptor

def enable_log_collection(self, state: LogCollectionState):

Enables or disables log collection.

Parameters
def get_cache_dir(self, context: object | None) -> str | None:

Get the cache path.

Parameters
  • context: used to compute path. Can be None. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns

The cache path

def get_config_dir(self, context: object | None) -> str | None:

Get the config path.

Parameters
  • context: used to compute path. Can be None. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns

The config path

def get_data_dir(self, context: object | None) -> str | None:

Get the data path.

Parameters
  • context: used to compute path. Can be None. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns

The data path

def get_download_dir(self, context: object | None) -> str | None:

Get the download path.

Parameters
  • context: used to compute path. Can be None. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns

The download path

def is_chatroom_backend_available(self, chatroom_backend: ChatRoomBackend) -> bool:

Indicates if the given LinphoneChatRoomBackend is available.

Parameters
Returns

True if the chatroom backend is available, False otherwise

def write_qrcode_file( self, file_path: str, code: str, width: int, height: int, margin: int) -> int:

Creates a QRCode and write it into a JPEG file specified by file_path (only if build with JPEG).

Parameters
  • file_path: The file where to write the QRCode JPEG image.
  • code: The code to be generated into an image. It must not be empty.
  • width: The requested width of the QRCode image. It will be 100 if 0.
  • height: The requested height of the QRCode image. It will be 100 if 0.
  • margin: The requested margin of the QRCode image.
Returns

0 if successful, -2 if JPEG is not supported, -1 otherwise

def create_account_listener(self) -> AccountListener:

Creates a AccountListener listener to object that can be added later using Account.add_listener() method

def create_account_creator_listener(self) -> AccountCreatorListener:

Creates a AccountCreatorListener listener to object that can be added later using AccountCreator.add_listener() method

def create_alert_listener(self) -> AlertListener:

Creates a AlertListener listener to object that can be added later using Alert.add_listener() method

def create_call_listener(self) -> CallListener:

Creates a CallListener listener to object that can be added later using Call.add_listener() method

def create_chat_message_listener(self) -> ChatMessageListener:

Creates a ChatMessageListener listener to object that can be added later using ChatMessage.add_listener() method

def create_chat_room_listener(self) -> ChatRoomListener:

Creates a ChatRoomListener listener to object that can be added later using ChatRoom.add_listener() method

def create_conference_listener(self) -> ConferenceListener:

Creates a ConferenceListener listener to object that can be added later using Conference.add_listener() method

def create_conference_scheduler_listener(self) -> ConferenceSchedulerListener:

Creates a ConferenceSchedulerListener listener to object that can be added later using ConferenceScheduler.add_listener() method

def create_core_listener(self) -> CoreListener:

Creates a CoreListener listener to object that can be added later using Core.add_listener() method

def create_event_listener(self) -> EventListener:

Creates a EventListener listener to object that can be added later using Event.add_listener() method

def create_friend_listener(self) -> FriendListener:

Creates a FriendListener listener to object that can be added later using Friend.add_listener() method

def create_friend_list_listener(self) -> FriendListListener:

Creates a FriendListListener listener to object that can be added later using FriendList.add_listener() method

def create_logging_service_listener(self) -> LoggingServiceListener:

Creates a LoggingServiceListener listener to object that can be added later using LoggingService.add_listener() method

def create_magic_search_listener(self) -> MagicSearchListener:

Creates a MagicSearchListener listener to object that can be added later using MagicSearch.add_listener() method

def create_participant_device_listener(self) -> ParticipantDeviceListener:

Creates a ParticipantDeviceListener listener to object that can be added later using ParticipantDevice.add_listener() method

def create_player_listener(self) -> PlayerListener:

Creates a PlayerListener listener to object that can be added later using Player.add_listener() method

def create_xml_rpc_request_listener(self) -> XmlRpcRequestListener:

Creates a XmlRpcRequestListener listener to object that can be added later using XmlRpcRequest.add_listener() method

class Friend:

This object is used to store a SIP address. Friend is mainly used to implement an adressbook feature, and are used as data for the MagicSearch object. If your proxy supports it, you can also use it to subscribe to presence information. The objects are stored in a FriendList which are in turn stored inside the Core. They can be stored inside a database if the path to it is configured, otherwise they will be lost after the Core is destroyed. Thanks to the vCard plugin, you can also store more information like phone numbers, organization, etc...

address: Address | None

Get address of this friend.

the Address object returned is hold by the LinphoneFriend, however

calling several time this function may return different objects.

Returns

the Address.

addresses: list[Address]

Returns a list of Address for this friend.

Returns

A list of Address.

capabilities: int

Returns the capabilities associated to this friend.

Returns

an int representing the capabilities of the friend

consolidated_presence: ConsolidatedPresence

Get the consolidated presence of a friend. It will return the "most open" presence found if more than one presence model are found.

Returns

The ConsolidatedPresence of the friend

core: Core

Returns the Core object managing this friend, if any.

Returns

the Core object associated.

current_callbacks: FriendListener | None

Get the current FriendListener object associated with a LinphoneFriend.

Returns

The current FriendListener object associated with the LinphoneFriend.

devices: list[FriendDevice]

Returns a list of FriendDevice for this friend, for all known addresses.

Returns

A list of FriendDevice.

inc_subscribe_policy: SubscribePolicy

get current subscription policy for this Friend

Returns

the SubscribePolicy enum

is_presence_received: bool

Tells whether we already received presence information for a friend.

Returns

True if presence information has been received for the friend, False otherwise.

job_title: str | None

Gets the contact's job title from it's vCard. It's a shortcut to Friend.vcard and Vcard.job_title.

Returns

the job_title set if any & vCard is available, None otherwise.

name: str | None

Get the display name for this friend.

Returns

The display name of this friend.

native_uri: str | None

Gets the contact's native URI.

Returns

the native URI set if any, None otherwise.

organization: str | None

Gets the contact's organization from it's vCard. It's a shortcut to Friend.vcard and Vcard.organization.

Returns

the organization set if any & vCard is available, None otherwise.

phone_numbers: list

Returns a list of phone numbers for this friend.

Returns

A list of phone numbers as string.

phone_numbers_with_label: list[FriendPhoneNumber]

Returns a list of FriendPhoneNumber for this friend.

Returns

A list of phone numbers as string.

photo: str | None

Gets the contact's picture URI.

Returns

the picture URI set if any, None otherwise.

presence_model: PresenceModel | None

Get the presence model of a friend. If a friend has more than one SIP address and phone number, this method will return the most recent presence model using PresenceModel.timestamp.

Returns

A PresenceModel object, or None if the friend do not have presence information (in which case he is considered offline).

ref_key: str | None

Get the reference key of a friend.

Returns

The reference key of the friend.

security_level: SecurityLevel

Returns the security level of a friend which is the lowest among all devices we know for it.

Returns

A SecurityLevel, which is the lowest among all known devices.

starred: bool

Gets if the friend is to be considered as important for the user.

Returns

True if the contact is a user's favorite, False otherwise.

subscribes_enabled: bool

get subscription flag value

Returns

returns True is subscription is activated for this friend

subscription_state: SubscriptionState

Get subscription state of a friend.

Returns

the SubscriptionState enum

vcard: Vcard | None

Returns the vCard object associated to this friend, if any.

Returns

the Vcard or None.

def add_listener(self, listener: FriendListener):

Adds a listener to this Friend object

Parameters
def remove_listener(self, listener: FriendListener):

Removes a listener from this this Friend object

Parameters
def add_address(self, address: Address):

Adds an address in this friend.

Parameters
def add_phone_number(self, phone_number: str):

Adds a phone number in this friend.

Parameters
  • phone_number: number to add
def add_phone_number_with_label(self, phone_number: FriendPhoneNumber):

Adds a FriendPhoneNumber to this friend.

Parameters
def create_vcard(self, name: str | None) -> bool:

Creates a vCard object associated to this friend if there isn't one yet and if the full name is available, either by the parameter or the one in the friend's SIP URI.

Parameters
  • name: The full name of the friend or None to use the one from the friend's SIP URI
Returns

True if the vCard has been created, False if it wasn't possible (for exemple if name and the friend's SIP URI are null or if the friend's SIP URI doesn't have a display name), or if there is already one vcard

def done(self):

Commits modification made to the friend configuration.

def edit(self):

Starts editing a friend configuration. Because friend configuration must be consistent, applications MUST call Friend.edit before doing any attempts to modify friend configuration (such as Friend.address or Friend.inc_subscribe_policy). Once the modifications are done, then the application must call Friend.done to commit the changes.

def get_capability_version(self, capability: FriendCapability) -> float:

Returns the version of a friend's capbility.

Parameters
Returns

the version of a friend's capbility.

def get_devices_for_address(self, address: Address) -> list[FriendDevice]:

Returns a list of FriendDevice for this friend and a specific address.

Parameters
Returns

A list of FriendDevice.

def get_presence_model_for_uri_or_tel(self, uri_or_tel: str) -> PresenceModel | None:

Get the presence model for a specific SIP URI or phone number of a friend.

Parameters
  • uri_or_tel: The SIP URI or phone number for which to get the presence model
Returns

A PresenceModel object, or None if the friend do not have presence information for this SIP URI or phone number.

def get_security_level_for_address(self, address: Address) -> SecurityLevel:

Returns the security level of a friend for a given address which is the lowest among all devices we know for that address.

Parameters
Returns

A SecurityLevel, which is the lowest among all known devices for that address.

def has_capability(self, capability: FriendCapability) -> bool:

Returns whether or not a friend has a capbility.

Parameters
Returns

whether or not a friend has a capbility

def has_capability_with_version(self, capability: FriendCapability, version: float) -> bool:

Returns whether or not a friend has a capbility with a given version.

Parameters
Returns

whether or not a friend has a capbility with a given version or -1.0 if friend has not capability.

def has_capability_with_version_or_more(self, capability: FriendCapability, version: float) -> bool:

Returns whether or not a friend has a capbility with a given version or more.

Parameters
Returns

whether or not a friend has a capbility with a given version or more.

def has_phone_number(self, phone_number: str) -> bool:

Returns whether a friend contains the given phone number.

Parameters
  • phone_number: the phone number to search for
Returns

True if found, False otherwise

def in_list(self) -> bool:

Check that the given friend is in a friend list.

Returns

True if the friend is in a friend list, False otherwise.

def remove(self):

Removes a friend from it's friend list and from the rc if exists.

def remove_address(self, address: Address):

Removes an address in this friend.

Parameters
def remove_phone_number(self, phone_number: str):

Removes a phone number in this friend.

Parameters
  • phone_number: number to remove
def remove_phone_number_with_label(self, phone_number: FriendPhoneNumber):

Removes a FriendPhoneNumber from this friend.

Parameters
def save(self, core: Core):

Saves a friend either in database if configured, otherwise in linphonerc.

Parameters
  • core: the linphone core
def set_presence_model_for_uri_or_tel(self, uri_or_tel: str, presence: PresenceModel | None):

Set the presence model for a specific SIP URI or phone number of a friend.

Parameters
  • uri_or_tel: The SIP URI or phone number for which to set the presence model
  • presence: The PresenceModel object to set
class FriendDevice:

Object that represents a Friend's device (name, trust level) for a given SIP address.

address: Address

Gets the address associated to this device.

Returns

the address (including gruu) to which this device is linked.

display_name: str | None

Gets the display name of this device.

Returns

the name of the device.

security_level: SecurityLevel

Gets the current security level of this device.

Returns

the current SecurityLevel of the device.

def clone(self) -> FriendDevice:

Clones a device.

Returns

The newly created FriendDevice object.

class FriendList:

This object representing a list of Friend. You can use it to store contacts locally or synchronize them through CardDAV protocol.

core: Core

Returns the Core object attached to this LinphoneFriendList.

Returns

a Core object

current_callbacks: FriendListListener | None

Get the current FriendListListener object associated with a LinphoneFriendList.

Returns

The current FriendListListener object associated with the LinphoneFriendList.

database_storage_enabled: bool

Gets whether this friend list and it's friends will be stored in DB or not.

Returns

Whether the list and it's friends will be saved in database or not

display_name: str | None

Get the display name of the friend list.

Returns

The display name of the friend list.

friends: list[Friend]

Retrieves the list of Friend from this LinphoneFriendList.

Returns

A list of Friend

is_subscription_bodyless: bool

Get wheter the subscription of the friend list is bodyless or not.

Returns

Wheter the subscription of the friend list is bodyless or not.

rls_address: Address | None

Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.

Returns

The RLS URI as Address associated with the friend list.

rls_uri: str | None

Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.

Returns

The RLS URI associated with the friend list.
Deprecated since version 27/10/2020. Use FriendList.rls_address instead..

subscriptions_enabled: bool

Gets whether subscription to NOTIFYs are enabled or not.

Returns

Whether subscriptions are enabled or not

Get the FriendListType of a friend list.

uri: str | None

Get the URI associated with the friend list.

Returns

The URI associated with the friend list.

def add_listener(self, listener: FriendListListener):

Adds a listener to this FriendList object

Parameters
def remove_listener(self, listener: FriendListListener):

Removes a listener from this this FriendList object

Parameters
def set_subscription_bodyless(self, bodyless: bool):

Set wheter the subscription of the friend list is bodyless or not.

Parameters
  • bodyless: boolean telling if the subscription of the friend list is bodyless or not.
def add_friend(self, linphone_friend: Friend) -> FriendListStatus:

Add a friend to a friend list. If or when a remote CardDAV server will be attached to the list, the friend will be sent to the server.

Parameters
  • linphone_friend: Friend object to add to the friend list.
Returns

FriendListStatus.OK if successfully added, FriendListStatus.InvalidFriend if the friend is not valid.

def add_local_friend(self, linphone_friend: Friend) -> FriendListStatus:

Add a friend to a friend list. The friend will never be sent to a remote CardDAV server. Warning!

LinphoneFriends added this way will be removed on the next synchronization,

and the callback contact_deleted will be called.

Parameters
  • linphone_friend: Friend object to add to the friend list.
Returns

FriendListStatus.OK if successfully added, FriendListStatus.InvalidFriend if the friend is not valid.

def export_friends_as_vcard4_file(self, vcard_file: str):

Creates and export Friend objects from FriendList to a file using vCard 4 format.

Parameters
  • vcard_file: the path to a file that will contain the vCards
def find_friend_by_address(self, address: Address) -> Friend | None:

Find a friend in the friend list using a LinphoneAddress.

Parameters
  • address: Address object of the friend we want to search for.
Returns

A Friend if found, None otherwise.

def find_friend_by_phone_number(self, phone_number: str) -> Friend | None:

Find a friend in the friend list using a phone number.

Parameters
  • phone_number: a string of the phone number for which we want to find a friend.
Returns

A Friend if found, None otherwise.

def find_friend_by_ref_key(self, ref_key: str) -> Friend | None:

Find a friend in the friend list using a ref key.

Parameters
  • ref_key: The ref key string of the friend we want to search for.
Returns

A Friend if found, None otherwise.

def find_friend_by_uri(self, uri: str) -> Friend | None:

Find a friend in the friend list using an URI string.

Parameters
  • uri: A string containing the URI of the friend we want to search for.
Returns

A Friend if found, None otherwise.

def find_friends_by_address(self, address: Address) -> list[Friend]:

Find all friends in the friend list using a LinphoneAddress.

Parameters
  • address: Address object of the friends we want to search for.
Returns

A list of Friend if found, None otherwise.

def find_friends_by_uri(self, uri: str) -> list[Friend]:

Find all friends in the friend list using an URI string.

Parameters
  • uri: A string containing the URI of the friends we want to search for.
Returns

A list of Friend if found, None otherwise.

def import_friends_from_vcard4_buffer(self, vcard_buffer: str) -> int:

Creates and adds Friend objects to FriendList from a buffer that contains the vCard(s) to parse.

Parameters
  • vcard_buffer: the buffer that contains the vCard(s) to parse
Returns

the amount of linphone friends created

def import_friends_from_vcard4_file(self, vcard_file: str) -> int:

Creates and adds Friend objects to FriendList from a file that contains the vCard(s) to parse.

Parameters
  • vcard_file: the path to a file that contains the vCard(s) to parse
Returns

the amount of linphone friends created

def notify_presence(self, presence: PresenceModel):

Notify our presence to all the friends in the friend list that have subscribed to our presence directly (not using a RLS).

Parameters
def remove_friend(self, linphone_friend: Friend) -> FriendListStatus:

Remove a friend from a friend list.

Parameters
  • linphone_friend: Friend object to remove from the friend list.
Returns

FriendListStatus.OK if removed successfully, FriendListStatus.NonExistentFriend if the friend is not in the list.

def synchronize_friends_from_server(self):

Starts a CardDAV synchronization using value set using linphone_friend_list_set_uri.

def update_dirty_friends(self):

Goes through all the Friend that are dirty and does a CardDAV PUT to update the server.

def update_revision(self, revision: int):

Sets the revision from the last synchronization.

Parameters
  • revision: The revision
def update_subscriptions(self):

Update presence subscriptions for the entire list. Calling this function is necessary when list subscriptions are enabled, ie when a RLS presence server is used.

class FriendPhoneNumber:

Object that represents a Friend's phone number.

label: str | None

Gets the label associated to this phone number.

Returns

the label set if any, None otherwise.

phone_number: str

Gets the phone number.

Returns

the phone number stored.

def clone(self) -> FriendPhoneNumber:

Clones a phone number.

Returns

The newly created FriendPhoneNumber object.

class Headers:

Object representing a chain of protocol headers. It provides read/write access to the headers of the underlying protocol.

def add(self, name: str, value: str | None):

Add given header name and corresponding value.

Parameters
  • name: the header's name
  • value: the header's value
def get_value(self, header_name: str) -> str | None:

Search for a given header name and return its value.

Returns

the header's value or None if not found.

def remove(self, name: str):

Add given header name and corresponding value.

Parameters
  • name: the header's name
class ImNotifPolicy:

Policy to use to send/receive instant messaging composing/delivery/display notifications. The sending of this information is done as in the RFCs 3994 (is_composing) and 5438 (imdn delivered/displayed).

recv_imdn_delivered: bool

Tell whether imdn delivered notifications are being notified when received.

Returns

Boolean value telling whether imdn delivered notifications are being notified when received.

recv_imdn_delivery_error: bool

Tell whether imdn delivery error notifications are being notified when received.

Returns

Boolean value telling whether imdn delivery error notifications are being notified when received.

recv_imdn_displayed: bool

Tell whether imdn displayed notifications are being notified when received.

Returns

Boolean value telling whether imdn displayed notifications are being notified when received.

recv_is_composing: bool

Tell whether is_composing notifications are being notified when received.

Returns

Boolean value telling whether is_composing notifications are being notified when received.

send_imdn_delivered: bool

Tell whether imdn delivered notifications are being sent.

Returns

Boolean value telling whether imdn delivered notifications are being sent.

send_imdn_delivery_error: bool

Tell whether imdn delivery error notifications are being sent.

Returns

Boolean value telling whether imdn delivery error notifications are being sent.

send_imdn_displayed: bool

Tell whether imdn displayed notifications are being sent.

Returns

Boolean value telling whether imdn displayed notifications are being sent.

send_is_composing: bool

Tell whether is_composing notifications are being sent.

Returns

Boolean value telling whether is_composing notifications are being sent.

def clear(self):

Clear an IM notif policy (deactivate all receiving and sending of notifications). Note: Error IMDN must be enabled for Lime recovery mechanism

def enable_all(self):

Enable all receiving and sending of notifications.

class InfoMessage:

Object representing an informational message sent or received by the core.

content: Content | None

Returns the info message's content as a Content structure.

Returns

the Content object.

def add_header(self, name: str, value: str | None):

Add a header to an info message to be sent.

Parameters
  • name: the header'name
  • value: the header's value
def get_header(self, name: str) -> str | None:

Obtain a header value from a received info message.

Parameters
  • name: the header'name
Returns

the corresponding header's value, or None if not exists.

class Ldap:

Object that represents a Linphone Ldap. Use a LdapParams object to configure it.

core: Core

Get the Core object to which is associated the Ldap.

Returns

The Core object to which is associated the Ldap.

index: int

Get the index of the Ldap.

Returns

The index of the Ldap

params: LdapParams

Get the LdapParams as read-only object. To make changes, clone the returned object using LdapParams.clone method, make your changes on it and apply them using with Ldap.params.

Returns

The LdapParams attached to this ldap.

def new_with_params(lc: Core, params: LdapParams) -> Ldap:

Create a new Ldap, associate it with the LdapParams and store it into the configuration file.

Parameters
Returns

The newly created Ldap object.

class LdapParams:

Object that is used to set the different parameters of a Ldap.

auth_method: LdapAuthMethod

Get the authentification method. Check LdapAuthMethod for authentification values.

Returns

The LdapAuthMethod.

base_object: str

Get the BaseObject. It is a specification for LDAP Search Scopes that specifies that the Search Request should only be performed against the entry specified as the search base DN. No entries above it will be considered. This field is required.

Returns

The specification.

bind_dn: str | None

Get the Bind DN to use for bindings. The bindDN DN is the credential that is used to authenticate against an LDAP. If empty, the connection will be Anonymous. eg: cn=ausername,ou=people,dc=bc,dc=com

Returns

The Bind DN to use for bindings.

debug_level: LdapDebugLevel

Return the debug verbosity level.

Returns

The LdapDebugLevel debug level.

delay: int

Get the delay between each search in milliseconds.

Returns

The delay in milliseconds.

enabled: bool

Return if the configuration is enabled.

Returns

Enable or not the LDAP configuration.

filter: str | None

Get the search is based on this filter to search contacts.

Returns

The filter to use.

max_results: int

Get the max results when requesting searches. 0 means the results aren't limited (but magic search limitation may apply).

Returns

The max results when requesting searches.

min_chars: int

Get the minimum characters needed for doing a search on LDAP servers.

Returns

The minimum characters needed by a search.

name_attribute: str | None

Get the attributes to build Name Friend, separated by a comma and the first is the highest priority.

Returns

The comma separated attributes for the search.

password: str | None

Get the password to pass to server when binding.

Returns

The password to pass to server when binding.

sal_enabled: bool

Return if the dns resolution is done by Linphone using Sal. It will pass an IP to LDAP. By doing that, the TLS negociation could not check the hostname. You may deactivate the verifications if wanted to force the connection.

Returns

Enable or not the use of sal.

server: str

Get the LDAP Server.

Returns

LDAP Server address.

server_certificates_verification_mode: LdapCertVerificationMode

Return whether the tls server certificate must be verified when connecting to a LDAP server.

Returns

The TLS verification mode from LdapCertVerificationMode

sip_attribute: str | None

Get the attributes to build the SIP username in address of Friend. Attributes are separated by a comma.

Returns

The comma separated attributes for building Friend.

sip_domain: str | None

Get the domain to the sip address(sip:username@domain).

Returns

The SIP domain for the friend.

timeout: int

Get the timeout for requests in seconds.

Returns

The timeout in seconds.

timeout_tls_ms: int

Get the timeout for TLS connection in milliseconds.

Returns

The timeout in milliseconds.

tls_enabled: bool

Return if transactions are encrypted by LDAP over TLS(StartTLS). You must use 'ldap' scheme. 'ldaps' for LDAP over SSL is non-standardized and deprecated. StartTLS in an extension to the LDAP protocol which uses the TLS protocol to encrypt communication. It works by establishing a normal - i.e. unsecured - connection with the LDAP server before a handshake negotiation between the server and the web services is carried out. Here, the server sends its certificate to prove its identity before the secure connection is established.

Returns

Enable or not the use of TLS.

def check(self) -> int:

Check parameters and return what are wrong.

Returns

The LdapCheck values. LinphoneLdapCheckOk if everything is ok.

def clone(self) -> LdapParams:

Instantiate a new LdapParams with values from source.

Returns

The newly created LdapParams object.

def get_custom_value(self, key: str) -> str | None:

Get the value from field.

Parameters
  • key: The key string.
Returns

The Value associated to the key.

def set_custom_value(self, key: str, value: str | None):

Set custom field.

Parameters
  • key: The key string.
  • value: The value string.
class LoggingService:

Singleton class giving access to logging features. It supports custom domain, writing into a file as well as several verbosity levels. The LoggingServiceListener listener allows you to be notified each time a log is printed. As the LoggingService is a singleton, use LoggingService.get to get it.

current_callbacks: LoggingServiceListener | None

Returns the current callbacks being called while iterating on callbacks.

Returns

A pointer to the current LoggingServiceListener object

domain: str | None

Get the domain where application logs are written (for example with LoggingService.message).

Returns

The domain where application logs are written.

log_level_mask: int

Gets the log level mask.

Returns

the log level mask

def add_listener(self, listener: LoggingServiceListener):

Adds a listener to this LoggingService object

Parameters
def remove_listener(self, listener: LoggingServiceListener):

Removes a listener from this this LoggingService object

Parameters
def get() -> LoggingService:

Gets the singleton logging service object. The singleton is automatically instantiated if it hasn't been done yet.

Returns

A pointer on the LoggingService singleton.

def set_log_level(self, level: LogLevel):

Set the verbosity of the log. For instance, a level of LogLevel.Message will let pass fatal, error, warning and message-typed messages whereas trace and debug messages will be dumped out.

Parameters
def enable_stack_trace_dumps(self, enable: bool):

Allow Linphone to set handlers for catching exceptions and write the stack trace into log. Available for Windows. It keeps old handlers.

Parameters
  • enable: if True global handlers will be prepend by the logger handlers. By default, it is False.
def debug(self, message: str):

Write a LinphoneLogLevelDebug message to the logs.

Parameters
  • message: The log message.
def error(self, message: str):

Write a LinphoneLogLevelError message to the logs.

Parameters
  • message: The log message.
def fatal(self, message: str):

Write a LinphoneLogLevelFatal message to the logs.

Parameters
  • message: The log message.
def message(self, message: str):

Write a LinphoneLogLevelMessage message to the logs.

Parameters
  • message: The log message.
def set_log_file(self, _dir: str, filename: str, max_size: int):

Enables logging in a file. That function enables an internal log handler that writes log messages in log-rotated files.

Parameters
  • _dir: Directory where to create the distinct parts of the log.
  • filename: Name of the log file.
  • max_size: The maximal size of each part of the log. The log rotating is triggered each time the currently opened log part reach that limit.
def trace(self, message: str):

Write a LinphoneLogLevelTrace message to the logs.

Parameters
  • message: The log message.
def warning(self, message: str):

Write a LinphoneLogLevelWarning message to the logs.

Parameters
  • message: The log message.
class MagicSearch:

A MagicSearch is used to do specifics searchs.

current_callbacks: MagicSearchListener | None

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

Returns

The MagicSearchListener that has called the last callback.

delimiter: str | None

Get the delimiter used for the search.

Returns

the delimiter used to find matched filter word

max_weight: int

Get the maximum value used to calculate the weight in search.

Returns

the maximum value used to calculate the weight in search

min_weight: int

Get the minimum value used to calculate the weight in search.

Returns

the minimum value used to calculate the weight in search

search_limit: int

Gets the number of maximum search result the search will return. The returned value doesn't take into account the "limited search" mode, so make sure to check MagicSearch.limited_search result as well.

Returns

the number of the maximum SearchResult which will be returned if magic search is in limited mode.

use_delimiter: bool

Returns whether the delimiter is being used for the search.

Returns

if the delimiter search is used

def add_listener(self, listener: MagicSearchListener):

Adds a listener to this MagicSearch object

Parameters
def remove_listener(self, listener: MagicSearchListener):

Removes a listener from this this MagicSearch object

Parameters
def get_contact_list_from_filter( self, _filter: str | None, domain: str | None) -> list[SearchResult]:

Create a sorted list of SearchResult from SipUri, Contact name, Contact displayname, Contact phone number, which match with a filter word The last item list will be an address formed with "filter" if a proxy config exist During the first search, a cache is created and used for the next search Use MagicSearch.reset_search_cache to begin a new search.

Parameters
  • _filter: word we search
  • domain: domain which we want to search only
Returns

sorted list of
Deprecated since version 22/03/2022 Use MagicSearch.contacts instead..

def get_contact_list_from_filter_async(self, _filter: str | None, domain: str | None):

Create a sorted list of SearchResult asynchronous from SipUri, Contact name, Contact displayname, Contact phone number, which match with a filter word The last item list will be an address formed with "filter" if a proxy config exist During the first search, a cache is created and used for the next search Use MagicSearch.reset_search_cache to begin a new search.

Parameters
  • _filter: word we search
  • domain: domain which we want to search only None or "" for searching in all contact "" for searching in contact with sip SipUri "yourdomain" for searching in contact from "yourdomain" domain *Deprecated since version 22/03/2022 Use MagicSearch.contacts_async instead..
def get_contacts( self, _filter: str | None, domain: str | None, sourceFlags: int) -> list[SearchResult]:

Create a sorted list of SearchResult which match with a filter word, from SipUri in this order : Contact's display name, address username, address domain and phone number. The last item list will be an address formed with "filter" if a proxy config exist and requested in sourceFlags During the first search, a cache is created and used for the next search Use MagicSearch.reset_search_cache to begin a new search

Parameters
  • _filter: word we search
  • domain: domain which we want to search only
  • sourceFlags: Flags that specify where to search: MagicSearchSource
Returns

sorted list of
Deprecated since version 08/04/2022 Use MagicSearch.contacts_list instead..

def get_contacts_async(self, _filter: str | None, domain: str | None, sourceFlags: int):

This is the asynchronous version of MagicSearch.contacts. Create a sorted list of SearchResult which match with a filter word, from SipUri in this order : Contact's display name, address username, address domain and phone number. The last item list will be an address formed with "filter" if a proxy config exist and requested in sourceFlags During the first search, a cache is created and used for the next search Use MagicSearch.reset_search_cache to begin a new search

Parameters
  • _filter: word we search
  • domain: domain which we want to search only
  • sourceFlags: Flags that specify where to search: MagicSearchSource Deprecated since version 08/04/2022 Use MagicSearch.contacts_list_async instead..
def get_contacts_list( self, _filter: str | None, domain: str | None, sourceFlags: int, aggregation: MagicSearchAggregation) -> list[SearchResult]:

Create a sorted list of SearchResult which match with a filter word, from SipUri in this order : Contact's display name, address username, address domain and phone number. The last item list will be an address formed with "filter" if a proxy config exist and requested in sourceFlags During the first search, a cache is created and used for the next search Use MagicSearch.reset_search_cache to begin a new search

Parameters
  • _filter: word we search
  • domain: domain which we want to search only
  • sourceFlags: Flags that specify where to search: MagicSearchSource
  • aggregation: a MagicSearchAggregation mode to indicate how to merge results
Returns

sorted list of

def get_contacts_list_async( self, _filter: str | None, domain: str | None, sourceFlags: int, aggregation: MagicSearchAggregation):

This is the asynchronous version of MagicSearch.contacts. Create a sorted list of SearchResult which match with a filter word, from SipUri in this order : Contact's display name, address username, address domain and phone number. The last item list will be an address formed with "filter" if a proxy config exist and requested in sourceFlags During the first search, a cache is created and used for the next search Use MagicSearch.reset_search_cache to begin a new search

Parameters
  • _filter: word we search
  • domain: domain which we want to search only
  • sourceFlags: Flags that specify where to search: MagicSearchSource
  • aggregation: a MagicSearchAggregation mode to indicate how to merge results
def reset_search_cache(self):

Reset the cache to begin a new search.

class MessageWaitingIndication:

Object representing a Message Waiting Indication.

account_address: Address | None

Get the address of the message account concerned by this message waiting indication.

Returns

The address of the message account concerned by this message waiting indication.

Get the message waiting indication summaries.

Returns

The message waiting indication summaries.

def get_summary( self, contextClass: MessageWaitingIndicationContextClass) -> MessageWaitingIndicationSummary | None:

Get the message waiting indication summary for a given context class.

Parameters
Returns

The #MessageWaitingIndicationSummary for the given context class.

def has_message_waiting(self) -> bool:

Tells whether there are messages waiting or not.

Returns

True if there are waiting messages, False otherwise.

class MessageWaitingIndicationSummary:

Object representing the summary for a context in a Message Waiting Indication.

Get the context class of the message waiting indication summary.

Returns

The MessageWaitingIndicationContextClass.

nb_new: int

Get the number of new messages.

Returns

The number of new messages.

nb_new_urgent: int

Get the number of new urgent messages.

Returns

The number of new urgent messages.

nb_old: int

Get the number of old messages.

Returns

The number of old messages.

nb_old_urgent: int

Get the number of old urgent messages.

Returns

The number of old urgent messages.

class NatPolicy:

Policy to use to pass through NATs/firewalls.

core: Core

Returns the Core object managing this nat policy, if any.

Returns

the Core object associated.

ice_enabled: bool

Tell whether ICE is enabled.

Returns

Boolean value telling whether ICE is enabled.

nat_v4_address: str | None

Get the mandatory v4 IP address to use with this NAT policy as server-reflexive candidate for ICE. Used when STUN or TURN are enabled.

Returns

the nat v4 address.

nat_v6_address: str | None

Get the mandatory v6 IP address to use with this NAT policy as server-reflexive candidate for ICE. Used when STUN or TURN are enabled.

Returns

the nat v4 address.

stun_enabled: bool

Tell whether STUN is enabled.

Returns

Boolean value telling whether STUN is enabled.

stun_server: str | None

Get the STUN/TURN server to use with this NAT policy. Used when STUN or TURN are enabled.

Returns

The STUN server used by this NAT policy.

stun_server_username: str | None

Get the username used to authenticate with the STUN/TURN server. The authentication will search for a AuthInfo with this username. If it is not set the username of the currently used ProxyConfig is used to search for a LinphoneAuthInfo.

Returns

The username used to authenticate with the STUN/TURN server.

tcp_turn_transport_enabled: bool

Tells whether TCP TURN transport is enabled. Used when TURN is enabled.

Returns

Boolean value telling whether TCP TURN transport is enabled.

tls_turn_transport_enabled: bool

Tells whether TLS TURN transport is enabled. Used when TURN is enabled.

Returns

Boolean value telling whether TLS TURN transport is enabled.

turn_enabled: bool

Tell whether TURN is enabled.

Returns

Boolean value telling whether TURN is enabled.

udp_turn_transport_enabled: bool

Tells whether UDP TURN transport is enabled. Used when TURN is enabled.

Returns

Boolean value telling whether UDP TURN transport is enabled.

upnp_enabled: bool

Tell whether uPnP is enabled.

Returns

Boolean value telling whether uPnP is enabled.

def clear(self):

Clear a NAT policy (deactivate all protocols and unset the STUN server).

def clone(self) -> NatPolicy:

Clone an existing NatPolicy object. Clone a NatPolicy object.

Returns

A clone of the original NatPolicy object.

Returns

a new NatPolicy object.

def resolve_stun_server(self):

Start a STUN server DNS resolution.

class Participant:

Identifies a member of a Conference or ChatRoom. A participant is identified by it's SIP address. It can have many ParticipantDevice.

address: Address

Get the address of a conference participant.

Returns

The Address of the participant

creation_time: int

Get the timestamp of the creation of the participant.

Returns

time of creation of the participant as returned by time(nullptr). For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

devices: list[ParticipantDevice]

Gets the list of devices from a chat room's participant.

Returns

List of devices.

is_admin: bool

Tells whether a conference participant is an administrator of the conference.

Returns

A boolean value telling whether the participant is an administrator

is_focus: bool

Tells whether a conference participant is the focus of the conference.

Returns

A boolean value telling whether the participant is a focus of a conference

Get the role of the participant within the conference.

Returns

role within the conference ParticipantRole

security_level: ChatRoomSecurityLevel

Get the security level of a participant.

Returns

The ChatRoomSecurityLevel of the participant

def find_device(self, address: Address) -> ParticipantDevice | None:

Find a device in the list of devices from a chat room's participant.

Parameters
Returns

a ParticipantDevice or None if not found.

class ParticipantDevice:

This object represents a unique device for a member of a Conference or ChatRoom. Devices are identified by the gruu parameter inside the Address which can be obtained by ParticipantDevice.address. It is specially usefull to know the security level of each device inside an end-to-end encrypted ChatRoom. You can get a list of all ParticipantDevice using Participant.devices.

address: Address

Get the address of a participant's device.

Returns

The Address of the participant's device

current_callbacks: ParticipantDeviceListener | None

Gets the current LinphoneParticipantDeviceCbs.

Returns

The LinphoneParticipantDeviceCbs that has called the last callback.

disconnection_method: ParticipantDeviceDisconnectionMethod

Get the disconnection method.

Returns

disconnection method ParticipantDeviceDisconnectionMethod

disconnection_reason: str | None

Get the disconnection reason.

Returns

disconnection reason

is_in_conference: bool

Return whether the participant device is in a conference or not.

Returns

a boolean to state whether the device is in a conference

is_muted: bool

Return whether the participant device is muted or not.

Returns

True if the participant device is muted, False otherwise.

is_speaking: bool

Return whether the participant device is speaking or not.

Returns

True if the participant device is speaking, False otherwise.

Get the joining method or it the device is the focus owner.

Returns

joining method or focus owner ParticipantDeviceJoiningMethod

name: str | None

Return the name of the device or None.

Returns

the name of the device or None.

native_video_window_id: object | None

Get window ID.

Returns

the window ID of the device

screen_sharing_enabled: bool

Return whether the participant device is screen sharing or not.

Returns

True if the participant device is screen sharing, False otherwise.

security_level: ChatRoomSecurityLevel

Get the security level of a participant's device.

Returns

The ChatRoomSecurityLevel of the device

Get the state of a participant device.

Returns

The ParticipantDeviceState of the device

thumbnail_ssrc: int

Get the thumbnail stream SSRC of the device.

Returns

the thumbnail stream's SSRC of the device

thumbnail_stream_availability: bool

Get the thumbnail stream availability of the device. The availability information represents whether a given stream type is currently available to be presented in the conference for a ParticipantDevice

Returns

True if the stream of type stream_type is available for device, False otherwise

thumbnail_stream_capability: MediaDirection

Get the thumbnail stream capability of the device.

Returns

the capability of the thumbnail stream of the device MediaDirection

time_of_disconnection: int

Get the timestamp the device left a conference.

Returns

time of disconnection a conference as returned by time(nullptr). For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

time_of_joining: int

Get the timestamp the device joined a conference.

Returns

time of joining a conference as returned by time(nullptr). For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

def add_listener(self, listener: ParticipantDeviceListener):

Adds a listener to this ParticipantDevice object

Parameters
def remove_listener(self, listener: ParticipantDeviceListener):

Removes a listener from this this ParticipantDevice object

Parameters
def create_native_video_window_id(self) -> object | None:

Create a window ID and return it.

Returns

the window ID of the device

def get_ssrc(self, stream_type: StreamType) -> int:

Get the stream SSRC of the device.

Parameters
Returns

the stream's SSRC of the device

def get_stream_availability(self, stream_type: StreamType) -> bool:

Get the stream availability of the device. The availability information represents whether a given stream type is currently available to be presented in the conference for a ParticipantDevice

Parameters
Returns

True if the stream of type stream_type is available for device, False otherwise

def get_stream_capability(self, stream_type: StreamType) -> MediaDirection:

Get the stream capability of the device. The capability information represents the capability for the #ParticipantDevice to handle a given stream type (audio, video or text).

Parameters
Returns

the capability of stream of type stream_type of the device MediaDirection

class ParticipantDeviceIdentity:

This object is only used on server side for ChatRoom with ChatRoomBackend.FlexisipChat backend.

address: Address

Get the address of the participant device.

Returns

the address.

capability_descriptor: str

Get the capability descriptor (currently +org.linphone.specs value) for this participant device identity.

Returns

the capability descriptor string. Deprecated since version 12/06/2023 Use.

ParticipantDeviceIdentity.capability_descriptor_list instead

capability_descriptor_list: list

Get the capability descriptor (currently +org.linphone.specs value) for this participant device identity.

Returns

the capability descriptor list.

def set_capability_descriptor(self, capability_descriptor_list: list | None):

Set the capability descriptor (currently +org.linphone.specs value) for this participant device identity.

Parameters
  • capability_descriptor_list: the capability descriptor list.
class ParticipantImdnState:

This object represents the delivery/display state of a given chat message for a given participant. It also contains a timestamp at which this participant state has changed. Use ChatMessage.participants_by_imdn_state to get all ParticipantImdnState for a given state. From there use ParticipantImdnState.participant to get the Participant object if you need it.

participant: Participant

Get the participant concerned by a LinphoneParticipantImdnState.

Returns

The Participant concerned by the LinphoneParticipantImdnState

Get the chat message state the participant is in.

Returns

The ChatMessageState the participant is in

state_change_time: int

Get the timestamp at which a participant has reached the state described by a LinphoneParticipantImdnState.

Returns

The timestamp at which the participant has reached the state described in the LinphoneParticipantImdnState

class ParticipantInfo:

Object defining all information related to a participant.

address: Address

Get the address of the object ParticipantInfo.

Returns

the Address of the ParticipantInfo object.

Get the role of the object ParticipantInfo.

Returns

the ParticipantRole of the ParticipantInfo object.

def add_parameter(self, name: str, value: str):

Set the a custom parameter to object ParticipantInfo.

Parameters
  • name: the name of the parameter.
  • value: the value of the parameter.
def clone(self) -> ParticipantInfo:

Clone an object ParticipantInfo.

Returns

the cloned ParticipantInfo object.

def get_parameter_value(self, name: str) -> str:

Get the value of a custom parameter of the object ParticipantInfo.

Parameters
  • name: the name of the parameter.
Returns

value the value of the parameter.

def has_parameter(self, name: str) -> bool:

Find whether a ParticipantInfo has a parameter.

Parameters
  • name: the name of the parameter.
Returns

True if the parameter is present, False otherwise

def remove_parameter(self, name: str):

Find the value of a custom parameter of the object ParticipantInfo.

Parameters
  • name: the name of the parameter.
class PayloadType:

Object representing an RTP payload type.

channels: int

Get the number of channels.

Returns

The number of channels.

clock_rate: int

Get the clock rate of a payload type.

Returns

The clock rate in Hz.

description: str

Return a string describing a payload type. The format of the string is //.

Returns

The description of the payload type.

encoder_description: str | None

Get a description of the encoder used to provide a payload type.

Returns

The description of the encoder. Can be None if the payload type is not supported by Mediastreamer2.

is_usable: bool

Check whether the payload is usable according the bandwidth targets set in the core.

Returns

True if the payload type is usable.

is_vbr: bool

Tells whether the specified payload type represents a variable bitrate codec.

Returns

True if the payload type represents a VBR codec, False instead.

mime_type: str

Get the mime type.

Returns

The mime type.

normal_bitrate: int

Get the normal bitrate in bits/s.

Returns

The normal bitrate in bits/s or -1 if an error has occured.

number: int

Returns the payload type number assigned for this codec.

Returns

The number of the payload type.

recv_fmtp: str | None

Get the format parameters for incoming streams.

Returns

The format parameters as string.

send_fmtp: str | None

Get the format parameters for outgoing streams.

Returns

The format parameters as string.

type: int

Get the type of a payload type.

Returns

The type of the payload e.g. PAYLOAD_AUDIO_CONTINUOUS or PAYLOAD_VIDEO.

def clone(self) -> PayloadType:

Instantiates a new payload type with values from source.

Returns

The newly created PayloadType object.

def enable(self, enabled: bool) -> int:

Enable/disable a payload type.

Parameters
  • enabled: Set True for enabling and False for disabling.
Returns

0 for success, -1 for failure.

def enabled(self) -> bool:

Check whether a palyoad type is enabled.

Returns

True if enabled, False if disabled.

def weak_equals(self, other_payload_type: PayloadType) -> bool:

Compare two payload types, and returns true if they are equal. Parameters (fmtp strings) are not compared, hence the name 'weak equals'.

Parameters
Returns

True if the payload types are "almost" equals.

class Player:

Player interface.

core: Core

Returns the Core object managing this player's call, if any.

Returns

the Core object associated

current_callbacks: PlayerListener | None

Returns the current LinphonePlayerCbsCbs object.

Returns

The current PlayerListener object

current_position: int

Get the current position in the opened file.

Returns

The current position in the opened file

duration: int

Get the duration of the opened file.

Returns

The duration of the opened file

is_video_available: bool

Returns whether the file has video and if it can be displayed.

Returns

True if file has video and it can be displayed, False otherwise

state: PlayerState

Get the current state of a player.

Returns

The current PlayerState of the player.

volume_gain: float

Get the volume gain of the player.

Returns

Percentage of the gain. Valid values are in [ 0.0 : 1.0 ].

def add_listener(self, listener: PlayerListener):

Adds a listener to this Player object

Parameters
def remove_listener(self, listener: PlayerListener):

Removes a listener from this this Player object

Parameters
def set_window_id(self, window_id: object | None):

Sets a window id to be used to display video if any.

Parameters
  • window_id: The window id pointer to use.
def close(self):

Close the opened file.

def create_window_id(self) -> object | None:

Create a window id to be used to display video if any.

Returns

window_id The window id pointer to use.

def open(self, filename: str) -> int:

Open a file for playing. Actually, only WAVE and MKV/MKA file formats are supported and a limited set of codecs depending of the selected format. Here are the list of working combinations:

Parameters
  • filename: The path to the file to open
def pause(self) -> int:

Pause the playing of a file.

Returns

0 on success, a negative value otherwise

def seek(self, time_ms: int) -> int:

Seek in an opened file.

Parameters
  • time_ms: The time we want to go to in the file (in milliseconds).
Returns

0 on success, a negative value otherwise.

def start(self) -> int:

Start playing a file that has been opened with Player.open.

Returns

0 on success, a negative value otherwise

class PresenceActivity:

Presence activity type holding information about a presence activity.

description: str | None

Gets the description of a presence activity.

Returns

A pointer to the description string of the presence activity, or None if no description is specified.

Gets the activity type of a presence activity.

Returns

The PresenceActivityType of the activity.

def to_string(self) -> str:

Gets the string representation of a presence activity.

Returns

A pointer a dynamically allocated string representing the given activity.
The returned string is to be freed by calling ms_free().

class PresenceModel:

Presence model type holding information about the presence of a person.

activity: PresenceActivity | None

Gets the first activity of a presence model (there is usually only one).

Returns

A PresenceActivity object if successful, None otherwise.

basic_status: PresenceBasicStatus

Gets the basic status of a presence model.

Returns

The PresenceBasicStatus of the PresenceModel object given as parameter.

capabilities: int

Gets the capabilities of a PresenceModel object.

Returns

the capabilities.

consolidated_presence: ConsolidatedPresence

Get the consolidated presence from a presence model.

Returns

The ConsolidatedPresence corresponding to the presence model

contact: str | None

Gets the contact of a presence model.

Returns

A pointer to a dynamically allocated string containing the contact, or None if no contact is found.
The returned string is to be freed by calling ms_free().

is_online: bool

Tells whether a presence model is considered online. It is any of theses cases:

latest_activity_timestamp: int

Gets the latest activity timestamp of a presence model.

Returns

The activity timestamp of the PresenceModel object or -1 if there is no activity (such as when status is Online).

nb_activities: int

Gets the number of activities included in the presence model.

Returns

The number of activities included in the PresenceModel object.

nb_persons: int

Gets the number of persons included in the presence model.

Returns

The number of persons included in the PresenceModel object.

nb_services: int

Gets the number of services included in the presence model.

Returns

The number of services included in the PresenceModel object.

presentity: Address | None

Gets the presentity of a presence model.

Returns

A pointer to a const Address, or None if no contact is found.

timestamp: int

Gets the timestamp of a presence model.

Returns

The timestamp of the PresenceModel object or -1 on error.

def new_with_activity( activity: PresenceActivityType, description: str | None) -> PresenceModel | None:

Creates a presence model specifying an activity.

Parameters
  • activity: The PresenceActivityType to set for the created presence model.
  • description: An additional description of the activity (mainly useful for the 'other' activity). Set it to None to not add a description.
Returns

The created PresenceModel, or None if an error occured.
seealso linphone_presence_model_new,.

PresenceModel.new_with_activity_and_note The created presence model has the activity specified in the parameters.

def new_with_activity_and_note( activity: PresenceActivityType, description: str | None, note: str, lang: str | None) -> PresenceModel | None:

Creates a presence model specifying an activity and adding a note.

Parameters
  • activity: The PresenceActivityType to set for the created presence model.
  • description: An additional description of the activity (mainly useful for the 'other' activity). Set it to None to not add a description.
  • note: An additional note giving additional information about the contact presence.
  • lang: The language the note is written in. It can be set to None in order to not specify the language of the note.
Returns

The created PresenceModel, or None if an error occured.
seealso PresenceModel.new_with_activity,.

PresenceModel.new_with_activity_and_note The created presence model has the activity and the note specified in the parameters.

def add_activity(self, activity: PresenceActivity) -> int:

Adds an activity to a presence model.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def add_note(self, note_content: str, lang: str | None) -> int:

Adds a note to a presence model.

Parameters
  • note_content: The note to be added to the presence model.
  • lang: The language of the note to be added. Can be None if no language is to be specified for the note.
Returns

0 if successful, a value < 0 in case of error. Only one note for each language can be set, so e.g. setting a note for the 'fr' language if there is only one will replace the existing one.

def add_person(self, person: PresencePerson) -> int:

Adds a person to a presence model.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def add_service(self, service: PresenceService) -> int:

Adds a service to a presence model.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def clear_activities(self) -> int:

Clears the activities of a presence model.

Returns

0 if successful, a value < 0 in case of error.

def clear_notes(self) -> int:

Clears all the notes of a presence model.

Returns

0 if successful, a value < 0 in case of error.

def clear_persons(self) -> int:

Clears the persons of a presence model.

Returns

0 if successful, a value < 0 in case of error.

def clear_services(self) -> int:

Clears the services of a presence model.

Returns

0 if successful, a value < 0 in case of error.

def get_capability_version(self, capability: FriendCapability) -> float:

Returns the version of the capability of a PresenceModel.

Parameters
Returns

the version of the capability of a PresenceModel or -1.0 if the model has not the capability.

def get_note(self, lang: str | None) -> PresenceNote | None:

Gets the first note of a presence model (there is usually only one).

Parameters
  • lang: The language of the note to get. Can be None to get a note that has no language specified or to get the first note whatever language it is written into.
Returns

A pointer to a PresenceNote object if successful, None otherwise.

def get_nth_activity(self, index: int) -> PresenceActivity | None:

Gets the nth activity of a presence model.

Parameters
  • index: The index of the activity to get (the first activity having the index 0).
Returns

A pointer to a PresenceActivity object if successful, None otherwise.

def get_nth_person(self, index: int) -> PresencePerson | None:

Gets the nth person of a presence model.

Parameters
  • index: The index of the person to get (the first person having the index 0).
Returns

A pointer to a PresencePerson object if successful, None otherwise.

def get_nth_service(self, index: int) -> PresenceService | None:

Gets the nth service of a presence model.

Parameters
  • index: The index of the service to get (the first service having the index 0).
Returns

A pointer to a PresenceService object if successful, None otherwise.

def has_capability(self, capability: FriendCapability) -> bool:

Returns whether or not the PresenceModel object has a given capability.

Parameters
  • capability: The capability to test.
Returns

whether or not the PresenceModel object has a given capability.

def has_capability_with_version(self, capability: FriendCapability, version: float) -> bool:

Returns whether or not the PresenceModel object has a given capability with a certain version.

Parameters
  • capability: The FriendCapability to test.
  • version: The wanted version to test.
Returns

whether or not the PresenceModel object has a given capability with a certain version.

def has_capability_with_version_or_more(self, capability: FriendCapability, version: float) -> bool:

Returns whether or not the PresenceModel object has a given capability with a certain version or more.

Parameters
  • capability: The FriendCapability to test.
  • version: The wanted version to test.
Returns

whether or not the PresenceModel object has a given capability with a certain version or more.

def set_activity( self, activity: PresenceActivityType, description: str | None) -> int:

Sets the activity of a presence model (limits to only one activity).

Parameters
  • activity: The PresenceActivityType to set for the model.
  • description: An additional description of the activity to set for the model. Can be None if no additional description is to be added.
Returns

0 if successful, a value < 0 in case of error. WARNING: This function will modify the basic status of the model according to the activity being set. If you don't want the basic status to be modified automatically, you can use the combination of PresenceModel.basic_status, PresenceModel.clear_activities and PresenceModel.add_activity.

class PresenceNote:

Presence note type holding information about a presence note.

content: str

Gets the content of a presence note.

Returns

A pointer to the content of the presence note.

lang: str | None

Gets the language of a presence note.

Returns

A pointer to the language string of the presence note, or None if no language is specified.

class PresencePerson:

Presence person holding information about a presence person.

id: str | None

Gets the id of a presence person.

Returns

A pointer to a dynamically allocated string containing the id, or None in case of error.
The returned string is to be freed by calling ms_free().

nb_activities: int

Gets the number of activities included in the presence person.

Returns

The number of activities included in the PresencePerson object.

nb_activities_notes: int

Gets the number of activities notes included in the presence person.

Returns

The number of activities notes included in the PresencePerson object.

nb_notes: int

Gets the number of notes included in the presence person.

Returns

The number of notes included in the PresencePerson object.

def add_activities_note(self, note: PresenceNote) -> int:

Adds an activities note to a presence person.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def add_activity(self, activity: PresenceActivity) -> int:

Adds an activity to a presence person.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def add_note(self, note: PresenceNote) -> int:

Adds a note to a presence person.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def clear_activities(self) -> int:

Clears the activities of a presence person.

Returns

0 if successful, a value < 0 in case of error.

def clear_activities_notes(self) -> int:

Clears the activities notes of a presence person.

Returns

0 if successful, a value < 0 in case of error.

def clear_notes(self) -> int:

Clears the notes of a presence person.

Returns

0 if successful, a value < 0 in case of error.

def get_nth_activities_note(self, index: int) -> PresenceNote | None:

Gets the nth activities note of a presence person.

Parameters
  • index: The index of the activities note to get (the first note having the index 0).
Returns

A pointer to a PresenceNote object if successful, None otherwise.

def get_nth_activity(self, index: int) -> PresenceActivity | None:

Gets the nth activity of a presence person.

Parameters
  • index: The index of the activity to get (the first activity having the index 0).
Returns

A pointer to a PresenceActivity object if successful, None otherwise.

def get_nth_note(self, index: int) -> PresenceNote | None:

Gets the nth note of a presence person.

Parameters
  • index: The index of the note to get (the first note having the index 0).
Returns

A pointer to a PresenceNote object if successful, None otherwise.

class PresenceService:

Presence service type holding information about a presence service.

basic_status: PresenceBasicStatus

Gets the basic status of a presence service.

Returns

The PresenceBasicStatus of the PresenceService object given as parameter.

contact: str | None

Gets the contact of a presence service.

Returns

A pointer to a dynamically allocated string containing the contact, or None if no contact is found.
The returned string is to be freed by calling ms_free().

id: str | None

Gets the id of a presence service.

Returns

A pointer to a dynamically allocated string containing the id, or None in case of error.
The returned string is to be freed by calling ms_free().

nb_notes: int

Gets the number of notes included in the presence service.

Returns

The number of notes included in the PresenceService object.

service_descriptions: list

Gets the service descriptions of a presence service.

Returns

A containing the services descriptions.
The returned string is to be freed.

def add_note(self, note: PresenceNote) -> int:

Adds a note to a presence service.

Parameters
Returns

0 if successful, a value < 0 in case of error.

def clear_notes(self) -> int:

Clears the notes of a presence service.

Returns

0 if successful, a value < 0 in case of error.

def get_nth_note(self, index: int) -> PresenceNote | None:

Gets the nth note of a presence service.

Parameters
  • index: The index of the note to get (the first note having the index 0).
Returns

A pointer to a PresenceNote object if successful, None otherwise.

class ProxyConfig:

Represents an account configuration to be used by Core. In addition to the AuthInfo that stores the credentials, you need to configure a ProxyConfig 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, seealso ProxyConfig.server_addr..

If any, it will be stored inside the default configuration file, so it will survive the destruction of the Core and be available at the next start. The account set with Core.default_proxy_config will be used as default for outgoing calls & chat messages unless specified otherwise. Deprecated since version 06/04/2020 Use Account object instead.

avpf_enabled: bool

Indicates whether AVPF/SAVPF is being used for calls using this proxy config.

Returns

True if AVPF/SAVPF is enabled, false otherwise. Deprecated since version 06/04/2020 Use Account object instead.

avpf_mode: AVPFMode

Get enablement status of RTCP feedback (also known as AVPF profile).

Returns

the enablement mode, which can be AVPFMode.Default (use LinphoneCore's mode), AVPFMode.Enabled (avpf is enabled), or AVPFMode.Disabled (disabled). Deprecated since version 06/04/2020 Use Account object instead.

avpf_rr_interval: int

Get the interval between regular RTCP reports when using AVPF/SAVPF.

Returns

The interval in seconds. Deprecated since version 06/04/2020 Use Account object instead.

conference_factory_uri: str | None

Get the conference factory uri.

Returns

The uri of the conference factory.
Deprecated since version 06/04/2020 Use Account object instead.

contact: Address | None

Return the contact address of the proxy config.

Returns

a Address correspong to the contact address of the proxy config.
Deprecated since version 06/04/2020 Use Account object instead.

contact_parameters: str | None

Returns the contact parameters.

Returns

previously set contact parameters.
Deprecated since version 06/04/2020 Use Account object instead.

contact_uri_parameters: str | None

Returns the contact URI parameters.

Returns

previously set contact URI parameters.
Deprecated since version 06/04/2020 Use Account object instead.

core: Core

Get the Core object to which is associated the ProxyConfig.

Returns

The Core object to which is associated the ProxyConfig.
Deprecated since version 06/04/2020 Use Account object instead.

dependency: ProxyConfig | None

Get the dependency of a ProxyConfig.

Returns

The proxy config this one is dependent upon, or None if not marked dependent.
Deprecated since version 06/04/2020 Use Account object instead.

dial_escape_plus: bool

Returns whether or not the + should be replaced by 00.

Returns

whether liblinphone should replace "+" by "00" in dialed numbers (passed to Core.invite). Deprecated since version 06/04/2020 Use Account object instead.

dial_prefix: str | None

Gets the prefix set for this proxy config.

Returns

dialing prefix.
Deprecated since version 06/04/2020 Use Account object instead.

domain: str | None

Get the domain name of the given proxy config.

Returns

The domain name of the proxy config.
Deprecated since version 06/04/2020 Use Account object instead.

error: Reason

Get the reason why registration failed when the proxy config state is LinphoneRegistrationFailed.

Returns

The Reason why registration failed for this proxy config. Deprecated since version 06/04/2020 Use Account object instead.

error_info: ErrorInfo

Get detailed information why registration failed when the proxy config state is LinphoneRegistrationFailed.

Returns

The ErrorInfo explaining why registration failed for this proxy config.
Deprecated since version 06/04/2020 Use Account object instead.

expires: int

Gets the proxy config expires.

Returns

the duration of registration. Deprecated since version 06/04/2020 Use Account object instead.

identity_address: Address | None

Gets the identity addres of the proxy config.

Returns

the SIP identity that belongs to this proxy configuration.
Deprecated since version 06/04/2020 Use Account object instead.

idkey: str | None

Get the idkey property of a ProxyConfig.

Returns

The idkey string, or None.
Deprecated since version 06/04/2020 Use Account object instead.

is_push_notification_allowed: bool

Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates to VOIP push notification.

Returns

True if push notification informations should be added, False otherwise. Deprecated since version 06/04/2020 Use Account object instead.

is_push_notification_available: bool

Gets whether push notifications are available or not (Android & iOS only).

Returns

True if push notifications are available, False otherwise Deprecated since version 06/04/2020 Use Account object instead.

is_remote_push_notification_allowed: bool

Indicates whether to add to the contact parameters the remote push notification information (IOS only). Default value is False.

Returns

True if remote push notification informations should be added, False otherwise. Deprecated since version 06/04/2020 Use Account object instead.

nat_policy: NatPolicy | None

Get The policy that is used to pass through NATs/firewalls when using this proxy config. If it is set to None, the default NAT policy from the core will be used instead.

Returns

NatPolicy object in use.
seealso Core.nat_policy.

Deprecated since version 06/04/2020 Use Account object instead.

privacy: int

Get default privacy policy for all calls routed through this proxy.

Returns

Privacy mode as LinphonePrivacyMask Deprecated since version 06/04/2020 Use Account object instead.

publish_enabled: bool

Gets if the PUBLISH is enabled.

Returns

True if PUBLISH request is enabled for this proxy. Deprecated since version 06/04/2020 Use Account object instead.

publish_expires: int

get the publish expiration time in second. Default value is the registration expiration value.

Returns

expires in second Deprecated since version 06/04/2020 Use Account object instead.

push_notification_config: PushNotificationConfig

Retrieves the push notification configuration.

Returns

The PushNotificationConfig.
Deprecated since version 06/04/2020 Use Account object instead.

quality_reporting_collector: str | None

Get the route of the collector end-point when using quality reporting. This SIP address should be used on server-side to process packets directly before discarding packets. Collector address should be a non existing account and will not receive any messages. If None, reports will be send to the proxy domain.

Returns

The SIP address of the collector end-point.
Deprecated since version 06/04/2020 Use Account object instead.

quality_reporting_enabled: bool

Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035.

Returns

True if quality repotring is enabled, false otherwise. Deprecated since version 06/04/2020 Use Account object instead.

quality_reporting_interval: int

Get the interval between interval reports when using quality reporting.

Returns

The interval in seconds, 0 means interval reports are disabled. Deprecated since version 06/04/2020 Use Account object instead.

realm: str | None

Get the realm of the given proxy config.

Returns

The realm of the proxy config.
Deprecated since version 06/04/2020 Use Account object instead.

ref_key: str | None

Get the persistent reference key associated to the proxy config. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.

Returns

The reference key string that has been associated to the proxy config, or None if none has been associated.
Deprecated since version 06/04/2020 Use Account object instead.

register_enabled: bool

Returns whether the proxy config is enabled or not.

Returns

True if registration to the proxy is enabled. Deprecated since version 06/04/2020 Use Account object instead.

routes: list

Gets the list of the routes set for this proxy config.

Returns

The list of routes as string.
Deprecated since version 06/04/2020 Use Account object instead.

server_addr: str | None

Gets the proxy config proxy address.

Returns

the proxy's SIP address.
Deprecated since version 06/04/2020 Use Account object instead.

Get the registration state of the given proxy config.

Returns

The RegistrationState of the proxy config. Deprecated since version 06/04/2020 Use Account object instead.

transport: str

Get the transport from either service route, route or addr.

Returns

The transport as a string (I.E udp, tcp, tls, dtls)
Deprecated since version 06/04/2020 Use Account object instead.

unread_chat_message_count: int

Return the unread chat message count for a given proxy config.

Returns

The unread chat message count. Deprecated since version 06/04/2020 Use Account object instead.

def set_push_notification_allowed(self, allow: bool):

Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates to VOIP push notification.

Parameters
  • allow: True to allow push notification information, False otherwise. Deprecated since version 06/04/2020 Use Account object instead.
def set_remote_push_notification_allowed(self, allow: bool):

Indicates whether to add to the contact parameters the remote push notification information (IOS only).

Parameters
  • allow: True to allow remote push notification information, False otherwise. Deprecated since version 06/04/2020 Use Account object instead.
def set_route(self, route: str | None) -> int:

Sets a SIP route. When a route is set, all outgoing calls will go to the route's destination if this proxy is the default one (see Core.default_proxy_config ).

Parameters
  • route: the SIP route to set
Returns

-1 if route is invalid, 0 otherwise. Deprecated since version 08/07/2020 use ProxyConfig.routes instead.

def done(self) -> int:

Commits modification made to the proxy configuration.

Returns

0 if successful, -1 otherwise Deprecated since version 06/04/2020 Use Account object instead.

def edit(self):

Starts editing a proxy configuration. Because proxy configuration must be consistent, applications MUST call ProxyConfig.edit before doing any attempts to modify proxy configuration (such as identity, proxy address and so on). Once the modifications are done, then the application must call ProxyConfig.done to commit the changes. Deprecated since version 06/04/2020 Use Account object instead.

def find_auth_info(self) -> AuthInfo | None:

Find authentication info matching proxy config, if any, similarly to linphone_core_find_auth_info.

Returns

a AuthInfo matching proxy config criteria if possible, None if nothing can be found.
Deprecated since version 06/04/2020 Use Account object instead.

def get_custom_header(self, header_name: str) -> str | None:

Obtain the value of a header sent by the server in last answer to REGISTER.

Parameters
  • header_name: the header name for which to fetch corresponding value
Returns

the value of the queried header.
Deprecated since version 06/04/2020 Use Account object instead.

def normalize_phone_number(self, username: str) -> str | None:

Normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 or +33888444222 depending on the ProxyConfig object. This function will always generate a normalized username if input is a phone number.

Parameters
  • username: the string to parse
Returns

None if input is an invalid phone number, normalized phone number from username input otherwise.
Deprecated since version 06/04/2020 Use Account object instead.

def normalize_sip_uri(self, username: str) -> Address | None:

Normalize a human readable sip uri into a fully qualified LinphoneAddress. A sip address should look like DisplayName . Basically this function performs the following tasks The result is a syntactically correct SIP address.

Parameters
  • username: the string to parse
Returns

None if invalid input, normalized sip address otherwise.
Deprecated since version 06/04/2020 Use Account object instead.

def pause_register(self):

Prevent a proxy config from refreshing its registration. This is useful to let registrations to expire naturally (or) when the application wants to keep control on when refreshes are sent. However, linphone_core_set_network_reachable(lc,True) will always request the proxy configs to refresh their registrations. The refreshing operations can be resumed with ProxyConfig.refresh_register. Deprecated since version 06/04/2020 Use Account object instead.

def refresh_register(self):

Refresh a proxy registration. This is useful if for example you resuming from suspend, thus IP address may have changed. Deprecated since version 06/04/2020 Use Account object instead.

def set_custom_header(self, header_name: str, header_value: str | None):

Set the value of a custom header sent to the server in REGISTERs request.

Parameters
  • header_name: the header name
  • header_value: the header's value
    Deprecated since version 06/04/2020 Use Account object instead.
class PushNotificationConfig:

Object holding push notification config that will be set in the contact URI parameters of the Contact header in the REGISTER, if the AccountParams is configured to allow push notifications, see AccountParams.push_notification_allowed. This object can be accessed through the AccountParams object, which can be obtained from your Account object.

bundle_identifier: str | None

Gets the app's bundle identifier for "contact uri parameter".

Returns

The app's bundle identifier if set, None otherwise.

call_snd: str

Gets the call_snd for "contact uri parameter".

Returns

The call_snd, default value "notes_of_the_optimistic.caf".

call_str: str

Gets the call_str for "contact uri parameter".

Returns

The call_str, default value "IC_MSG".

group_chat_str: str

Gets the groupchat_str for "contact uri parameter".

Returns

The groupchat_str, default value "GC_MSG".

msg_snd: str

Gets the msg_snd for "contact uri parameter".

Returns

The msg_snd, default value "msg.caf".

msg_str: str

Gets the msg_str for "contact uri parameter".

Returns

The msg_str, default value "IM_MSG".

param: str | None

Gets the param for "contact uri parameter".

Returns

The param if set, None otherwise.

prid: str | None

Gets the prid for "contact uri parameter".

Returns

The prid if set, None otherwise.

provider: str | None

Gets the provider for "contact uri parameter".

Returns

The provider if set, None otherwise.

remote_token: str | None

Gets the remote token for "contact uri parameter".

Returns

The remote token if set, None otherwise.

team_id: str | None

Gets the team id for "contact uri parameter".

Returns

The team id if set, None otherwise.

voip_token: str | None

Gets the voip token for "contact uri parameter".

Returns

The voip token if set, None otherwise.

def set_remote_push_interval(self, remote_push_interval: str):

Specifies the interval in seconds between to subsequent remote push notifications when remote push notifications are used to notify a call invite to clients that haven't published any token for VoIP and background push notifications. In that case, several PNs are sent subsequently until the call is picked up, declined or canceled. This parameter sets a value for 'pn-call-remote-push-interval' Contact header inside SIP REGISTER requests. A value of zero will cause the deactivation of push notification repetitions and the sending of the final notification. Thus, only the first push notification will be sent. If specified the value must be in [0;30] If not specified 'pn-call-remote-push-interval' will not be added to Contact header.

Parameters
  • remote_push_interval: The new remote push interval set for push notification config.
def clone(self) -> PushNotificationConfig:

Instantiate a new push notification parameters with values from source.

Returns

The newly created PushNotificationConfig object.

def is_equal(self, other_config: PushNotificationConfig) -> bool:

Checks if two Push Notification Configurations are identical.

Parameters
Returns

True only if the two configurations are identical.

class PushNotificationMessage:

Object holding chat message data received by a push notification on iOS platform only. This object is a subset of ChatMessage, so only a few methods of it's parent are available, like PushNotificationMessage.text_content and PushNotificationMessage.subject, just enough to be able to build a notification to show the user.

call_id: str

Gets the call id.

Returns

The call id.

from_addr: Address

Gets the from address.

Returns

The from Address.

is_conference_invitation_cancellation: bool

Tells whether or not this message contains a conference invitation cancellation.

Returns

True if this message carries a conference invitation cancellation, False otherwise.

is_conference_invitation_new: bool

Tells whether or not this message contains a new conference invitation.

Returns

True if this message carries a new conference invitation, False otherwise.

is_conference_invitation_update: bool

Tells whether or not this message contains a conference invitation update.

Returns

True if this message carries a conference invitation update, False otherwise.

is_icalendar: bool

Tells whether or not this message contains an icalendar by checking it's content type.

Returns

True if this content type is 'text/calendar;conference-event=yes', False otherwise.

is_text: bool

Returns wether it is a text message or not.

Returns

True if it is a text message, False otherwise.

local_addr: Address

Gets the local address.

Returns

The local Address.

peer_addr: Address

Gets the peer address.

Returns

The peer Address.

reaction_content: str | None

Gets the reaction content.

Returns

The reaction content or None.

subject: str | None

Gets the subject.

Returns

The subject or None.

text_content: str | None

Gets the text content.

Returns

The text content or None.

class Range:

Structure describing a range of integers.

max: int

Gets the higher value of the range.

Returns

The higher value

min: int

Gets the lower value of the range.

Returns

The lower value

class Recorder:

Object used to record the audio or video of a call.

capture_volume: float

Get linear volume when capturing audio.

Returns

Linear volume.

duration: int

Gets the duration of the recording.

Returns

the duration of the recording, in milliseconds.

file: str | None

Gets the file used for recording.

Returns

the file used for the recording if any.

params: RecorderParams

Retrieve the RecorderParams object.

Returns

The RecorderParams object.

state: RecorderState

Gets the current state of the recorder.

Returns

the current RecorderState.

def close(self):

Close the opened file.

def create_content(self) -> Content | None:

Create a content from the recording, for example to send it in a chat message.

Recorder must be in Closed state!
Returns

the Content matching the recording, or None.

def open(self, _file: str) -> int:

Open a file for recording.

Parameters
  • _file: The path to the file to open.
def pause(self) -> int:

Pause the recording.

def start(self) -> int:

Start the recording into the opened file.

class RecorderParams:

Object containing various parameters of a Recorder.

audio_device: AudioDevice | None

Retrieve the AudioDevice object.

Returns

the AudioDevice object.

file_format: RecorderFileFormat

Retrieves the RecorderFileFormat.

Returns

the RecorderFileFormat.

video_codec: str | None

Retrieves the video codec.

Returns

the video codec.

webcam_name: str | None

Retrieves the webcam name.

Returns

the webcam name.

window_id: object | None

Retrieves the window id.

Returns

the window id.

def clone(self) -> RecorderParams:

Clone a RecorderParams object.

Returns

the cloned RecorderParams object.

class SearchResult:

The LinphoneSearchResult object represents a result of a search.

address: Address | None

Gets the address of the search result if any.

Returns

The associed Address or None.

capabilities: int

Returns the capabilities mask of the search result.

Returns

the capabilities mask associated to the search result

friend: Friend | None

Gets the friend of the search result if any.

Returns

The associated Friend or None.

phone_number: str | None

Gets the phone number of the search result if any.

Returns

The associed phone number or None.

source_flags: int

Gets source flags of the search result.

Returns

the source flags from MagicSearchSource

weight: int

Gets the weight of the search result.

Returns

the result weight

def has_capability(self, capability: FriendCapability) -> bool:

Returns whether or not the search result has the given capability.

Parameters
Returns

True if it has the capability, False otherwise.

class SignalInformation:

Object to get signal (wifi/4G etc...) informations.

signal_type: SignalType

Get the SignalType of the SignalInformation.

Returns

A SignalType.

signal_unit: SignalStrengthUnit

Get the SignalStrengthUnit value of the SignalInformation.

Returns

A SignalStrengthUnit.

strength: float

Get the value of the SignalInformation.

Returns

A float containing the value.

def set_value(self, value: float):

Set a new value to a SignalInformation.

Parameters
  • value: a float containing the new value to set.
def clone(self) -> SignalInformation:

Clone the given signalInformation.

Returns

A new signalInformation with exactly same informations that param.

class Transports:

SIP transports & ports configuration object. Indicates which transport among UDP, TCP, TLS and DTLS should be enabled and if so on which port to listen. You can use special values like LC_SIP_TRANSPORT_DISABLED (0), LC_SIP_TRANSPORT_RANDOM (-1) and LC_SIP_TRANSPORT_DONTBIND (-2). Once configuration is complete, use Core.transports to apply it. This will be saved in configuration file so you don't have to do it each time the Core starts.

dtls_port: int

Gets the DTLS port in the Transports object.

Returns

the DTLS port

tcp_port: int

Gets the TCP port in the Transports object.

Returns

the TCP port

tls_port: int

Gets the TLS port in the Transports object.

Returns

the TLS port

udp_port: int

Gets the UDP port in the Transports object.

Returns

the UDP port

class Tunnel:

Linphone tunnel object.

activated: bool

Returns whether the tunnel is activated. If mode is set to auto, this gives indication whether the automatic detection determined that tunnel was necessary or not.

Returns

True if tunnel is in use, False otherwise.

domain: str | None

Get the domain.

Returns

The domain.

dual_mode_enabled: bool

Get the dual tunnel client mode.

Returns

True if dual tunnel client mode is enabled, False otherwise

mode: TunnelMode

Get the tunnel mode.

Returns

The current TunnelMode

servers: list[TunnelConfig]

Get added servers.

Returns

The list of servers.

sip_enabled: bool

Check whether tunnel is set to transport SIP packets.

Returns

A boolean value telling whether SIP packets shall pass through the tunnel

username: str | None

Get the username.

Returns

The username.

def add_server(self, tunnel_config: TunnelConfig):

Add a tunnel server configuration.

Parameters
def clean_servers(self):

Remove all tunnel server addresses previously entered with Tunnel.add_server

def connected(self) -> bool:

Check whether the tunnel is connected.

Returns

A boolean value telling if the tunnel is connected

def reconnect(self):

Force reconnection to the tunnel server. This method is useful when the device switches from wifi to Edge/3G or vice versa. In most cases the tunnel client socket won't be notified promptly that its connection is now zombie, so it is recommended to call this method that will cause the lost connection to be closed and new connection to be issued.

def remove_server(self, tunnel_config: TunnelConfig):

Remove a tunnel server configuration.

Parameters
def set_http_proxy(self, host: str, port: int, username: str | None, passwd: str | None):

Set an optional http proxy to go through when connecting to tunnel server.

Parameters
  • host: http proxy host
  • port: http proxy port
  • username: Optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use None if not needed.
  • passwd: Optional http proxy password. Use None if not needed.
def set_http_proxy_auth_info(self, username: str | None, passwd: str | None):

Set authentication info for the http proxy.

Parameters
  • username: User name
  • passwd: Password
class TunnelConfig:

Tunnel settings.

delay: int

Get the UDP packet round trip delay in ms for a tunnel configuration.

Returns

The UDP packet round trip delay in ms.

host: str | None

Get the IP address or hostname of the tunnel server.

Returns

The tunnel server IP address or hostname.

host2: str | None

Get the IP address or hostname of the second tunnel server when using dual tunnel client.

Returns

The tunnel server IP address or hostname.

port: int

Get the TLS port of the tunnel server.

Returns

The TLS port of the tunnel server

port2: int

Get the TLS port of the second tunnel server when using dual tunnel client.

Returns

The TLS port of the tunnel server

remote_udp_mirror_port: int

Get the remote port on the tunnel server side used to test UDP reachability. This is used when the mode is set auto, to detect whether the tunnel has to be enabled or not.

Returns

The remote port on the tunnel server side used to test UDP reachability

class Vcard:

Object storing contact information using vCard 4.0 format.

etag: str | None

Gets the eTag of the vCard.

Returns

the eTag of the vCard in the CardDAV server, otherwise None.

family_name: str | None

Returns the family name in the N attribute of the vCard, or None if it isn't set yet.

Returns

the family name of the vCard, or None

full_name: str | None

Returns the FN attribute of the vCard, or None if it isn't set yet.

Returns

the display name of the vCard, or None.

given_name: str | None

Returns the given name in the N attribute of the vCard, or None if it isn't set yet.

Returns

the given name of the vCard, or None

job_title: str | None

Gets the Title of the vCard.

Returns

the Title of the vCard or None.

organization: str | None

Gets the Organization of the vCard.

Returns

the Organization of the vCard or None.

phone_numbers: list

Returns the list of phone numbers in the vCard (all the TEL attributes) or None.

Returns

The phone numbers as string.

phone_numbers_with_label: list[FriendPhoneNumber]

Returns the list of phone numbers in the vCard (all the TEL attributes) or None.

Returns

The phone numbers as FriendPhoneNumber.

photo: str | None

Returns the first PHOTO property or None.

Returns

The picture URI as string or None if none has been set.

sip_addresses: list[Address]

Returns the list of SIP addresses in the vCard (all the IMPP attributes that has an URI value starting by "sip:") or None.

Returns

The SIP addresses.

uid: str | None

Gets the UID of the vCard.

Returns

the UID of the vCard, otherwise None.

url: str | None

Gets the URL of the vCard.

Returns

the URL of the vCard in the CardDAV server, otherwise None.

def add_extended_property(self, name: str, value: str):

Adds an extended property to the vCard.

Parameters
  • name: the name of the extended property to add
  • value: the value of the extended property to add
def add_phone_number(self, phone: str):

Adds a phone number in the vCard, using the TEL property.

Parameters
  • phone: the phone number to add
def add_phone_number_with_label(self, phoneNumber: FriendPhoneNumber):

Adds a FriendPhoneNumber in the vCard, using the TEL property.

Parameters
def add_sip_address(self, sip_address: str):

Adds a SIP address in the vCard, using the IMPP property.

Parameters
  • sip_address: the SIP address to add
def as_vcard4_string(self) -> str | None:

Returns the vCard4 representation of the LinphoneVcard.

Returns

a const char * that represents the vCard.

def clone(self) -> Vcard:

Clone a Vcard.

Returns

a new Vcard object

def edit_main_sip_address(self, sip_address: str):

Edits the preferred SIP address in the vCard (or the first one), using the IMPP property.

Parameters
  • sip_address: the new SIP address
def generate_unique_id(self) -> bool:

Generates a random unique id for the vCard. If is required to be able to synchronize the vCard with a CardDAV server

Returns

True if operation is successful, otherwise False (for example if it already has an unique ID)

def get_extended_properties_values_by_name(self, name: str) -> list:

Get the vCard extended properties values per property name.

Parameters
  • name: the name to filter the extended properties on.
Returns

The extended properties values as string.

def remove_extented_properties_by_name(self, name: str):

Remove all the extend properties per property name.

Parameters
  • name: the name to remove the extended properties on.
def remove_job_title(self):

Removes the Title field of the vCard.

def remove_organization(self):

Removes the Organization field of the vCard.

def remove_phone_number(self, phone: str):

Removes a phone number in the vCard (if it exists), using the TEL property.

Parameters
  • phone: the phone number to remove
def remove_phone_number_with_label(self, phoneNumber: FriendPhoneNumber):

Removes a FriendPhoneNumber in the vCard (if it exists), using the TEL property.

Parameters
def remove_photo(self):

Removes any existing PHOTO property.

def remove_sip_address(self, sip_address: str):

Removes a SIP address in the vCard (if it exists), using the IMPP property.

Parameters
  • sip_address: the SIP address to remove
class VideoActivationPolicy:

Object describing policy regarding video streams establishments. Use VideoActivationPolicy.automatically_accept and VideoActivationPolicy.automatically_initiate to tell the Core to automatically accept or initiate video during calls. Even if disabled, you'll still be able to add it later while the call is running.

automatically_accept: bool

Gets the value for the automatically accept video policy.

Returns

whether or not to automatically accept video requests is enabled

automatically_accept_direction: MediaDirection

Gets the value for the automatically accept video policy.

Returns

the MediaDirection that will be set for video stream when automatically accepted.

automatically_initiate: bool

Gets the value for the automatically initiate video policy.

Returns

whether or not to automatically initiate video calls is enabled

def clone(self) -> VideoActivationPolicy:

Instantiates a new VideoActivationPolicy object with same values as the source.

Returns

the newly created VideoActivationPolicy object

class VideoDefinition:

This object represents a video definition, eg. it's width, it's height and possibly it's name. It is mostly used to configure the default video size sent by your camera during a video call with Core.preferred_video_definition method.

height: int

Get the height of the video definition.

Returns

The height of the video definition

is_undefined: bool

Tells whether a VideoDefinition is undefined.

Returns

A boolean value telling whether the VideoDefinition is undefined.

name: str | None

Get the name of the video definition.

Returns

The name of the video definition

width: int

Get the width of the video definition.

Returns

The width of the video definition

def clone(self) -> VideoDefinition:

Clone a video definition.

Returns

The new clone of the video definition

def equals(self, video_definition2: VideoDefinition) -> bool:

Tells whether two VideoDefinition objects are equal (the widths and the heights are the same but can be switched).

Parameters
Returns

A boolean value telling whether the two VideoDefinition objects are equal.

def set_definition(self, width: int, height: int):

Set the width and the height of the video definition.

Parameters
  • width: The width of the video definition
  • height: The height of the video definition
def strict_equals(self, video_definition2: VideoDefinition) -> bool:

Tells whether two VideoDefinition objects are strictly equal (the widths are the same and the heights are the same).

Parameters
Returns

A boolean value telling whether the two VideoDefinition objects are strictly equal.

class VideoSourceDescriptor:

Object that is used to describe a video source.

call: Call | None

Gets the call of a VideoSourceDescriptor.

Returns

The Call of the video source descriptor if it's type is LinphoneVideoSourceCall, None otherwise.

camera_id: str | None

Gets the camera id of a VideoSourceDescriptor.

Returns

The camera id of the video source descriptor if it's type is LinphoneVideoSourceCamera, None otherwise.

image: str | None

Gets the image path of a VideoSourceDescriptor.

Returns

The image path of the video source descriptor if it's type is LinphoneVideoSourceImage, None otherwise.

screen_sharing: object | None

Gets the screen sharing description of a VideoSourceDescriptor.

Returns

The native screen sharing description

screen_sharing_type: VideoSourceScreenSharingType

Gets the screen sharing type of a VideoSourceDescriptor.

Returns

The VideoSourceType.ScreenSharing Type corresponding to this video source descriptor.

Gets the type of a VideoSourceDescriptor.

Returns

The VideoSourceType corresponding to this video source descriptor.

def clone(self) -> VideoSourceDescriptor:

Instantiate a new video source descriptor with values from source.

Returns

The newly created VideoSourceDescriptor object.

def set_screen_sharing( self, _type: VideoSourceScreenSharingType, native_data: object | None):

Sets the source of a VideoSourceDescriptor as screen sharing. native_data depends of the type and the current platform:

Parameters
class XmlRpcRequest:

The XmlRpcRequest object representing a XML-RPC request to be sent.

content: str | None

Get the content of the XML-RPC request.

Returns

The string representation of the content of the XML-RPC request.

current_callbacks: XmlRpcRequestListener | None

Get the current XmlRpcRequestListener object associated with a LinphoneXmlRpcRequest.

Returns

The current XmlRpcRequestListener object associated with the LinphoneXmlRpcRequest.

int_response: int

Get the response to an XML-RPC request sent with XmlRpcSession.send_request and returning an integer response.

Returns

The integer response to the XML-RPC request.

list_response: list

Get the response to an XML-RPC request sent with XmlRpcSession.send_request and returning a string response.

Returns

A list of all string responses in the XML-RPC request.

raw_response: str | None

Get the raw response to an XML-RPC request sent with XmlRpcSession.send_request and returning http body as string.

Returns

The string response to the XML-RPC request.

status: XmlRpcStatus

Get the status of the XML-RPC request.

Returns

The XmlRpcStatus of the XML-RPC request.

string_response: str | None

Get the response to an XML-RPC request sent with XmlRpcSession.send_request and returning a string response.

Returns

The string response to the XML-RPC request.

def add_listener(self, listener: XmlRpcRequestListener):

Adds a listener to this XmlRpcRequest object

Parameters
def remove_listener(self, listener: XmlRpcRequestListener):

Removes a listener from this this XmlRpcRequest object

Parameters
def add_int_arg(self, value: int):

Add an integer argument to an XML-RPC request.

Parameters
  • value: The integer value of the added argument.
def add_string_arg(self, value: str):

Add a string argument to an XML-RPC request.

Parameters
  • value: The string value of the added argument.
class XmlRpcSession:

The XmlRpcSession object used to send XML-RPC requests and handle their responses.

def create_request( self, return_type: XmlRpcArgType, method: str) -> XmlRpcRequest:

Creates a XmlRpcRequest from a XmlRpcSession.

Parameters
  • return_type: the return type of the request as a XmlRpcArgType
  • method: the function name to call
Returns

a XmlRpcRequest object

def release(self):

Stop and unref an XML rpc session. Pending requests will be aborted.

def send_request(self, request: XmlRpcRequest):

Send an XML-RPC request.

Parameters