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:
- C (https://download.linphone.org/snapshots/docs/liblinphone/5.4/c)
- C++ (https://download.linphone.org/snapshots/docs/liblinphone/5.4/c++)
- Swift (https://download.linphone.org/snapshots/docs/liblinphone/5.4/swift)
- Java (https://download.linphone.org/snapshots/docs/liblinphone/5.4/java)
- C# (https://download.linphone.org/snapshots/docs/liblinphone/5.4/cs)
- Python (https://download.linphone.org/snapshots/docs/liblinphone/5.4/python)
See also
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.
Enum describing RTP AVPF activation modes.
Inherited Members
- enum.Enum
- name
- value
Enum describing activation code checking, used by the AccountCreator
.
Activation code ok.
Activation code too short.
Activation code too long.
Contain invalid characters.
Inherited Members
- enum.Enum
- name
- value
Enum describing algorithm checking, used by the AccountCreator
.
Algorithm not supported.
Inherited Members
- enum.Enum
- name
- value
Enum describing backend used in the AccountCreator
.
XMLRPC Backend.
FlexiAPI Backend.
Inherited Members
- enum.Enum
- name
- value
Enum describing domain checking, used by the AccountCreator
.
Domain ok.
Domain invalid.
Inherited Members
- enum.Enum
- name
- value
Enum describing email checking, used by the AccountCreator
.
Email malformed.
Contain invalid characters.
Inherited Members
- enum.Enum
- name
- value
Enum describing language checking, used by the AccountCreator
.
Language ok.
Inherited Members
- enum.Enum
- name
- value
Enum describing password checking, used by the AccountCreator
.
Password ok.
Password too short.
Password too long.
Contain invalid characters.
Missing specific characters.
Inherited Members
- enum.Enum
- name
- value
Enum describing phone number checking, used by the AccountCreator
.
Phone number ok.
Phone number too short.
Phone number too long.
Country code invalid.
Phone number invalid.
Inherited Members
- enum.Enum
- name
- value
Enum describing the status of server request, used by the AccountCreator
.
Request status.
Request failed.
Request failed due to missing argument(s)
Request failed due to missing callback(s)
Account status.
Account not created.
Account exist.
Account exist with alias.
Account not exist.
Account was created with Alias.
Alias exist.
Alias not exist.
Account activated.
Account already activated.
Account not activated.
Account linked.
Account not linked.
Server.
Error cannot send SMS.
Error key doesn't match.
Error too many SMS sent.
Error algo isn't MD5 or SHA-256.
Generic error.
This API isn't implemented in the current backend.
Request has been denied, probably due to invalid auth token.
Request has been denied, due to too many requests sent in given period.
Inherited Members
- enum.Enum
- name
- value
Enum describing transport checking, used by the AccountCreator
.
Transport ok.
Transport invalid.
Inherited Members
- enum.Enum
- name
- value
Enum describing username checking, used by the AccountCreator
.
Username ok.
Username too short.
Username too long.
Contain invalid characters.
Invalid username.
Inherited Members
- enum.Enum
- name
- value
Enum describing Ip family.
Inherited Members
- enum.Enum
- name
- value
All kinds of alerts.
Camera is capturing low framerate.
Video decoding has stopped for a given period (10 s by default).
A received media stream suffers from high loss or late rate.
A report of high loss rate is received from remote party.
Loss rate is significant but retransmissions fail to arrive on time.
Low bandwidth detected.
Low quality (bitrate) video received.
Low quality video is being sent.
The operating system reports a low radio signal (wifi or mobile)
The operating system reports a loss of radio signal (wifi or mobile).
Inherited Members
- enum.Enum
- name
- value
AudioDeviceCapabilities
enum represents whether a device can record audio,
play audio or both
Can record audio.
Can play audio.
Can play and record audio.
Inherited Members
- enum.Enum
- name
- value
AudioDeviceType
enum represents the different types of an audio device.
Inherited Members
- enum.Enum
- name
- value
Enum describing the authentication methods.
Inherited Members
- enum.Enum
- name
- value
Enum representing the direction of a call.
Inherited Members
- enum.Enum
- name
- value
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.
PushIncoming call received.
The call's parameters are updated for example when video is asked by remote.
We are proposing early media to an incoming call.
The call is updated by remote while not yet answered (SIP UPDATE in earlydialog received)
We are updating the call while not yet answered (SIP UPDATE in early dialogsent)
Inherited Members
- enum.Enum
- name
- value
Enum representing the status of a call.
The call was missed (incoming call timed out without being answered or hangedup)
The call was declined, either locally or by remote end.
The call was aborted before being advertised to the application - for protocolreasons.
The call was answered on another device.
The call was declined on another device.
Inherited Members
- enum.Enum
- name
- value
ChatMessageDirection
is used to indicate if a message is outgoing or
incoming.
Incoming message.
Outgoing message.
Inherited Members
- enum.Enum
- name
- value
ChatMessageState
is used to notify if messages have been successfully
delivered or not.
Message successfully delivered and acknowledged by the server.
Message was not delivered.
Message was received and acknowledged but cannot get file from server.
File transfer has been completed successfully.
Message successfully delivered an acknowledged by the remote user.
Message successfully displayed to the remote user.
File transfer is in progress.
Inherited Members
- enum.Enum
- name
- value
ChatRoomBackend
is used to indicate the backend implementation of a chat
room.
Basic (client-to-client) chat room.
Server-based chat room.
Inherited Members
- enum.Enum
- name
- value
ChatRoomCapabilities
is used to indicate the capabilities of a chat room.
Supports RTT.
Use server (supports group chat)
Special proxy chat room flag.
Chat room migratable from Basic to Conference.
A communication between two participants (can be Basic or Conference)
Chat room is encrypted.
Chat room can enable ephemeral messages.
Inherited Members
- enum.Enum
- name
- value
ChatRoomEncryptionBackend
is used to indicate the encryption engine used by a
chat room.
No encryption.
Lime x3dh encryption.
Inherited Members
- enum.Enum
- name
- value
ChatRoomEphemeralMode
is used to the ephemeral message mode used by a chat
room.
Each device manages its own ephemeral settings.
Ephemeral settings are chatroom wide and only admins can change them.
Inherited Members
- enum.Enum
- name
- value
TODO move to encryption engine object when available ChatRoomSecurityLevel
is
used to indicate the encryption security level of a chat room.
Security failure.
No encryption.
Encrypted.
Encrypted and verified.
Inherited Members
- enum.Enum
- name
- value
ChatRoomState
is used to indicate the current state of a chat room.
Chat room is now instantiated on local.
One creation request was sent to the server.
Chat room creation failed.
Wait for chat room termination.
Chat room exists on server but not in local.
The chat room termination failed.
Inherited Members
- enum.Enum
- name
- value
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.
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.
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
ConferenceInfoState
is used to list all states of a conference info object
Conference has been updated.
Canceling a conference.
Inherited Members
- enum.Enum
- name
- value
Mode of joining conference.
It is only valid at the creation of the conferece
Participants must dial the conference server.
Conference server dials participants.
Inherited Members
- enum.Enum
- name
- value
ConferenceLayout
is used to indicate the layout used by the conference.
Grid - each participant is given an equal sized image size.
Active speaker - participant who speaks is prominently displayed in the centerof the screen and other participants are minimized.
Inherited Members
- enum.Enum
- name
- value
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
Only participants in the initiating INVITE are allowed to join the conference.
All devices calling the conference URI are allowed to join the conference.
Inherited Members
- enum.Enum
- name
- value
Describes conference scheduler possible states.
It is notified via the conference_scheduler_state_changed callback in
ConferenceSchedulerListener
.
Default state of a freshly created ConferenceScheduler
.
An error has happened during conference creation.
Conference creation is in progress.
Confererence has been created.
Conference has been updated.
Inherited Members
- enum.Enum
- name
- value
Conference minimum security level.
Point-to-point encryption.
End-to-end encryption.
Inherited Members
- enum.Enum
- name
- value
ConferenceState
is used to indicate the current state of a conference.
Conference is now instantiated locally.
One creation request was sent to the service.
Conference was created on the service.
Conference creation on service failed.
Wait for conference termination.
The conference is terminated locally, though it may still exist on the servicefor other participants.
Conference termination failed.
Conference was deleted locally and on the service.
Inherited Members
- enum.Enum
- name
- value
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
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
Used to notify if log collection upload have been succesfully delivered or not.
Delivery in progress.
Log collection upload successfully delivered and acknowledged by remote endpoint.
Log collection upload was not delivered.
Inherited Members
- enum.Enum
- name
- value
Enum describing the result of the echo canceller calibration process.
The echo canceller calibration process is on going.
The echo canceller calibration has been performed and produced an echo delaymeasure.
The echo canceller calibration process has failed.
The echo canceller calibration has been performed and no echo has beendetected.
Inherited Members
- enum.Enum
- name
- value
EventLogType
is used to indicate the type of an event.
Useful for cast.
Conference (created) event.
Conference (terminated) event.
Conference call (start) event.
Conference call (connected) event.
Conference call (end) event.
Conference chat message event.
Conference participant (added) event.
Conference participant (removed) event.
Conference participant (role unknown) event.
Conference participant (role speaker) event.
Conference participant (role listener) event.
Conference participant (set admin) event.
Conference participant (unset admin) event.
Conference participant device (added) event.
Conference participant device (removed) event.
Conference participant device (media capability changed) event.
Conference participant device (media availability changed) event.
Conference participant device (left) event.
Conference subject event.
Conference available media event.
Conference encryption security event.
Conference ephemeral message (ephemeral message lifetime changed) event.
Conference ephemeral message (ephemeral message enabled) event.
Conference ephemeral message (ephemeral message disabled) event.
Conference ephemeral message (ephemeral message settings managed by admin)event.
Conference ephemeral message (ephemeral message settings managed byparticipants) event.
Reaction event to a chat message.
Inherited Members
- enum.Enum
- name
- value
Enum describing the capabilities of a Friend
, populated through presence
subscribe/notify process.
This friend can be invited in a Flexisip backend ChatRoom
.
This friend can be invited in a Flexisip backend end-to-end encryptedChatRoom
.
This friend is able to delete ephemeral messages once they have expired.
Inherited Members
- enum.Enum
- name
- value
Enum describing the status of a LinphoneFriendList operation.
Friend
wasn't found in the FriendList
Friend
is already present in a FriendList
Inherited Members
- enum.Enum
- name
- value
Enum describing the status of a CardDAV synchronization.
Synchronization started.
Synchronization finished successfuly.
Synchronization failed.
Inherited Members
- enum.Enum
- name
- value
The types of FriendList.
Inherited Members
- enum.Enum
- name
- value
Describes the global state of the Core
object.
It is notified via the global_state_changed() callback in CoreListener
.
Transient state for when we call Core.start
Indicates Core
has been started and is up and running.
Transient state for when we call Core.stop
Transient state between Startup and On if there is a remote provisionning URIconfigured.
Core
state after being created by linphone_factory_create_core, generallyfollowed by a call to Core.start
Inherited Members
- enum.Enum
- name
- value
Enum describing ICE states.
ICE has not been activated for this call or stream.
ICE has established a direct connection to the remote host.
ICE has established a connection to the remote host through one or severalNATs.
ICE has established a connection through a relay.
Inherited Members
- enum.Enum
- name
- value
Enum describing how the authentification will be made.
Inherited Members
- enum.Enum
- name
- value
Enum describing server certificates verification modes.
Use default value defined on core.
Verification is disabled.
Verification is enabled.
Inherited Members
- enum.Enum
- name
- value
Enum describing errors in LDAP parameters.
The server doesn't contain a scheme.
LDAP over SSL is non-standardized and deprecated: ldaps has been specified.
Inherited Members
- enum.Enum
- name
- value
Enum Debug verbosity for OpenLdap.
Set OpenLdap verbosity to debug level.
Inherited Members
- enum.Enum
- name
- value
Whether or not to keep a file with the logs.
Inherited Members
- enum.Enum
- name
- value
Verbosity levels of log messages.
Inherited Members
- enum.Enum
- name
- value
Enum describing how to merge SearchResult
from MagicSearch
.
No aggregation is done, you can have multiple SearchResult with the sameFriend.
Aggregation is done by friend, you will have at most a SearchResult per Friend.
Inherited Members
- enum.Enum
- name
- value
Enum describing the search categories for Magic Search.
Search in LDAP servers.
Search in Chat rooms participants.
Search from request : it is usually an address built from the request.
Search in "starred" friends only.
Search in conferences info (organizer and participants)
Inherited Members
- enum.Enum
- name
- value
Indicates for a given media the stream direction.
Default value, shouldn't be used.
No active media not supported yet.
Media is only being sent, it won't be received.
Media will only be received, nothing will be sent.
Media will be sent and received.
Inherited Members
- enum.Enum
- name
- value
Enum describing type of media encryption types.
Inherited Members
- enum.Enum
- name
- value
Media resource usage.
Media resources are not shared.
Inherited Members
- enum.Enum
- name
- value
Enum describing the different contexts for the
MessageWaitingIndicationSummary
.
Inherited Members
- enum.Enum
- name
- value
ParticipantDeviceDisconnectionMethod
is used to indicate how a participant
left a conference.
an admin removes the device from a conference
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
ParticipantDeviceJoiningMethod
is used to indicate how a participant joined a
conference or if it is the focus.
device called the conference
device is called the conference
device is the focus
Inherited Members
- enum.Enum
- name
- value
ParticipantDeviceState
is used to list all states a participant device can be
in
an INVITE has been sent
the SIP session has been concluded, participant is part of the conference
A BYE is pending.
The Session is terminated.
Initial state for the server group chatroom, when the participant has not yetbeen INVITEd.
Transitional state for a participant that will receive a BYE shortly.
the SIP session has been concluded, participant is not media mixed
180 Ringing
Some medias have been muted by the focus.
Inherited Members
- enum.Enum
- name
- value
ParticipantRole
is used to define a role of a participant within a conference
participant is a speaker in the conference
participant is a listener in the conference.
Inherited Members
- enum.Enum
- name
- value
The state of a Player
.
Inherited Members
- enum.Enum
- name
- value
Activities as defined in section 3.2 of RFC 4480.
The person has a calendar appointment, without specifying exactly of what type.
The person is physically away from all interactive communication devices.
The person is eating the first meal of the day, usually eaten in the morning.
The person is busy, without further details.
The person is having his or her main meal of the day, eaten in the evening orat midday.
This is a scheduled national or local holiday.
The person is riding in a vehicle, such as a car, but not steering.
The person is looking for (paid) work.
The person is eating his or her midday meal.
The person is scheduled for a meal, without specifying whether it is breakfast,lunch, or dinner, or some other meal.
The person is in an assembly or gathering of people, as for a business, social,or religious purpose.
The person is talking on the telephone.
The person is engaged in an activity with no defined representation.
A performance is a sub-class of an appointment and includes musical,theatrical, and cinematic performances as well as lectures.
The person will not return for the foreseeable future, e.g., because it is nolonger working for the company.
The person is occupying himself or herself in amusement, sport, or otherrecreation.
The person is giving a presentation, lecture, or participating in a formalround-table discussion.
The person is visiting stores in search of goods or services.
The person is sleeping.
The person is observing an event, such as a sports event.
The person is controlling a vehicle, watercraft, or plane.
The person is on a business or personal trip, but not necessarily in-transit.
The person is watching television.
The activity of the person is unknown.
A period of time devoted to pleasure, rest, or relaxation.
The person is engaged in, typically paid, labor, as part of a profession orjob.
The person is participating in religious rites.
Inherited Members
- enum.Enum
- name
- value
Basic status as defined in section 4.1.4 of RFC 3863.
This value means that the associated contact element, if any, is ready toaccept communication.
This value means that the associated contact element, if any, is unable toaccept communication.
Inherited Members
- enum.Enum
- name
- value
Defines privacy policy to apply as described by rfc3323.
Request that privacy services provide a user-level privacy function.
Request that privacy services modify headers that cannot be set arbitrarily bythe user (Contact/Via).
Request that privacy services provide privacy for session media.
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.
Privacy service must perform the specified services or fail the request.
Special keyword to use privacy as defined either globally or by proxy usingProxyConfig.privacy
Inherited Members
- enum.Enum
- name
- value
Enum for publish states.
An incoming publish is received.
Publish encoutered an error, Event.reason
gives reason code.
Publish is about to expire, only sent if [sip]->refresh_generic_publishproperty is set to 0.
An outgoing publish was created and submitted.
Inherited Members
- enum.Enum
- name
- value
Enum describing various failure reasons or contextual information for some
events.
seealso Call.reason
.
seealso ProxyConfig.error
.
seealso ErrorInfo.reason
.
Authentication failed due to bad credentials or resource forbidden.
The call was not answered in time (request timeout)
Transport error: connection failures, disconnections etc...
Operation is rejected due to incompatible or unsupported media parameters.
Operation could not be executed by server or remote client because it didn'thave any context for it.
The received request contains a Session-Expires header field with a durationbelow the minimum timer.
Conditional Request Failed.
Inherited Members
- enum.Enum
- name
- value
Enum representing the file format of a recording.
Inherited Members
- enum.Enum
- name
- value
Enum representing the state of a recording.
Inherited Members
- enum.Enum
- name
- value
Describes proxy registration states.
It is notified via the registration_state_changed() callback in CoreListener
.
Initial state for registrations.
Registration is in progress.
Unregistration succeeded.
Registration refreshing.
Inherited Members
- enum.Enum
- name
- value
SecurityEventType
is used to indicate the type of security event.
Chatroom security level downgraded event.
Participant has exceeded the maximum number of device event.
Peer device instant messaging encryption identity key has changed event.
Man in the middle detected event.
Inherited Members
- enum.Enum
- name
- value
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.
End-to-end encrypted.
End-to-end encrypted and verified.
Point-to-point encrypted.
Inherited Members
- enum.Enum
- name
- value
Session Timers refresher.
Inherited Members
- enum.Enum
- name
- value
All signal units that a device can use.
Inherited Members
- enum.Enum
- name
- value
All signal types that a device can use.
Inherited Members
- enum.Enum
- name
- value
Enum describing type of SRTP encryption suite.
Inherited Members
- enum.Enum
- name
- value
Enum describing the stream types.
Inherited Members
- enum.Enum
- name
- value
Enum controlling behavior for incoming subscription request.
Use by Friend.inc_subscribe_policy
Does not automatically accept an incoming subscription request.
Rejects incoming subscription request.
Automatically accepts a subscription request.
Inherited Members
- enum.Enum
- name
- value
Enum for subscription direction (incoming or outgoing).
Invalid subscription direction.
Inherited Members
- enum.Enum
- name
- value
Enum for subscription states.
SubscriptionState.Terminated
and SubscriptionState.Error
are final states.
Initial state, should not be used.
An outgoing subcription was sent.
An incoming subcription is received.
Subscription is pending, waiting for user approval.
Subscription is terminated normally.
Subscription was terminated by an error, indicated by Event.reason
Subscription is about to expire, only sent if [sip]->refresh_generic_subscribeproperty is set to 0.
Inherited Members
- enum.Enum
- name
- value
Enum listing frequent telephony tones.
Tone played when call is abruptly disconnected (media lost)
Inherited Members
- enum.Enum
- name
- value
Enum describing transport type for LinphoneAddress.
Inherited Members
- enum.Enum
- name
- value
Enum describing the tunnel modes.
The tunnel is enabled automatically if it is required.
Inherited Members
- enum.Enum
- name
- value
Enum describing uPnP states.
Inherited Members
- enum.Enum
- name
- value
Enum describing the result of a version update check.
Inherited Members
- enum.Enum
- name
- value
Enum representing the sub type of the screen sharing.
The screen sharing is done from a display.
The screen sharing is done from a window.
The screen sharing is done from an area.
Inherited Members
- enum.Enum
- name
- value
Enum representing the type of a video source.
The video source is a screen sharing.
Inherited Members
- enum.Enum
- name
- value
Enum describing the types of argument for LinphoneXmlRpcRequest.
Inherited Members
- enum.Enum
- name
- value
Enum describing the status of a LinphoneXmlRpcRequest.
Inherited Members
- enum.Enum
- name
- value
Enum describing the ZRTP key exchange algorithns.
Inherited Members
- enum.Enum
- name
- value
Enum describing the ZRTP SAS validation status of a peer URI.
Peer URI unkown or never validated/invalidated the SAS.
Peer URI SAS rejected in database.
Inherited Members
- enum.Enum
- name
- value
An object to handle the callbacks for the handling of Account
objects.
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.
Callback for notifying a message waiting indication change for the account.
Parameters
- account:
Account
object whose message waiting indication changed. - mwi: The current
MessageWaitingIndication
.
An object to handle the responses callbacks for handling the AccountCreator
operations.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Object that represents a callback attached to an alert.
Callback to know if an alert stops.
Parameters
- alert: the alert that stops
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
.
Callback for being notified of received DTMFs.
Parameters
- call:
Call
object that received the dtmf - dtmf: The ascii code of the dtmf
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.
Callback for receiving info messages.
Parameters
- call:
Call
whose info message belongs to. - message:
InfoMessage
object.
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
Callback for notifying a snapshot taken.
Parameters
- call: LinphoneCall for which the snapshot was taken
- file_path: the name of the saved file
Callback to notify a next video frame has been decoded.
Parameters
- call: LinphoneCall for which the next video frame has been decoded
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
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.
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
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
An object to handle the callbacks for the handling a ChatMessage
objects.
Call back used to notify message delivery status.
Parameters
- message:
ChatMessage
object - state:
ChatMessageState
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
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
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.
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.
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.
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.
Call back used to notify participant IMDN state.
Parameters
- message:
ChatMessage
object - state:
ParticipantImdnState
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
Call back used to notify ephemeral message is deleted.
Parameters
- message: LinphoneChatMessage object
An object to handle the callbacks for the handling a ChatRoom
objects.
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
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
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
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
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
Callback used to notify a chat room state has changed.
Parameters
- chat_room: LinphoneChatRoom object
- newState: The new LinphoneChatRoomState of the chat room
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
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
- chat_room:
ChatRoom
object
Callback used to tell the core whether or not to store the incoming message in
db or not using ChatMessage.to_be_stored
.
Parameters
- chat_room:
ChatRoom
object - message: The
ChatMessage
that is being received
Callback used to notify a participant state has changed in a message of this chat room.
Parameters
- chat_room:
ChatRoom
object - message: The
ChatMessage
for which a participant has it's state changed - state: The
ParticipantImdnState
Callback used to notify a chat room was "marked as read".
Parameters
- chat_room: The LinphoneChatRoom object that was marked as read
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
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
.
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
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
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
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
Callback used to notify a conference that the role of a participant has been changed.
Parameters
- conference:
Conference
object - participant:
Participant
whose role has changed
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
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
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
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
Callback used to notify a conference that the media capability of a participant device has been changed.
Parameters
- conference:
Conference
object - device:
ParticipantDevice
whose media capability changed has changed
Callback used to notify a conference state has changed.
Parameters
- conference: LinphoneConference object
- newState: The new state of the conference
Callback used to notify that the available media of a conference has changed.
Parameters
- conference:
Conference
object
Callback used to notify that the subject of a conference has changed.
Parameters
- conference: LinphoneConference object
- subject: subject of the conference
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
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
Callback used to notify that the audio device of a conference has changed.
Parameters
- conference: LinphoneConference object
- audio_device: audio device of the conference
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
An object to handle the callbacks of ConferenceScheduler
object.
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.
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.
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.
Global state notification callback.
Parameters
- core: the
Core
. - state: the
GlobalState
- message: informational message.
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
Callback prototype for notifying the application about a received conference info.
Parameters
- core:
Core
object - conference_info: the
ConferenceInfo
received
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
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)
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
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
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 usingCore.add_auth_info
.
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.
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
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
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
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
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
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
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
Callback prototype for when a refer is received.
Parameters
- core: the
Core
- refer_to: the address of the refer
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.
Callback prototype for receiving info messages.
Parameters
- core: the
Core
- call: the call whose info message belongs to.
- message: the info message.
Callback prototype for notifying the application about changes of subscription states, including arrival of new subscriptions.
Parameters
- core:
Core
object - linphone_event: the
Event
- state: the new
SubscriptionState
Callback prototype for notifying the application about changes of publish states.
Parameters
- core:
Core
object - linphone_event: the
Event
- state: the new
PublishState
Callback prototype for configuring status changes notification.
Parameters
- core: the
Core
- status: the current
ConfiguringState
- message: informational message.
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.
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.
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
Callback prototype for reporting when a friend list has been added to the core friend lists.
Parameters
- core:
Core
object - friend_list:
FriendList
object
Callback prototype for reporting when a friend list has been removed from the core friend lists.
Parameters
- core:
Core
object - friend_list:
FriendList
object
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
Callback prototype telling that a Conference
state has changed.
Parameters
- core:
Core
object - conference: The
Conference
object for which the state has changed - state: the current
ChatRoomState
Callback prototype telling that a ChatRoom
state has changed.
Parameters
- core:
Core
object - chat_room: The
ChatRoom
object for which the state has changed - state: the current
ChatRoomState
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
Callback prototype telling the result of decoded qrcode.
Parameters
- core:
Core
object - result: The result of the decoded qrcode
Callback prototype telling a call has started (incoming or outgoing) while there was no other call.
Parameters
- core:
Core
object
Callback prototype telling the last call has ended (Core.calls_nb
returns 0)
Parameters
- core:
Core
object
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
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
- core:
Core
object
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.
Function prototype used by linphone_core_cbs_set_ec_calibration_audio_init.
Parameters
- core: The
Core
.
Function prototype used by linphone_core_cbs_set_ec_calibration_audio_uninit.
Parameters
- core: The
Core
.
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
Default account changed callback prototype.
Parameters
- core:
Core
object - account:
Account
object that has been set as the default account, probably by callingCore.default_account
, or None if the default account was removed.
Account added callback prototype.
Parameters
- core:
Core
object - account:
Account
object that has been added to the Core usingCore.add_account
for example.
Account removed callback prototype.
Parameters
- core:
Core
object - account:
Account
object that has been added to the Core usingCore.remove_account
for example.
An object to handle the callbacks for handling the LinphoneEvent operations.
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
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
Callback used to notify the received to a SUBSCRIBE.
Parameters
- event: The LinphoneEvent object that receive the SUBSCRIBE
SUBSCRIBE state changed callback.
Parameters
- event: The
Event
object that state changed - state: The
SubscriptionState
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
PUBLISH state changed callback.
Parameters
- event: The LinphoneEvent object that state changed
- state: The LinphonePublishState
An object to handle the callbacks for Friend
.
An object to handle the callbacks for Friend
synchronization.
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
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
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 updatednew_friend: The new
Friend
object corresponding to the updated contactold_friend: The old
Friend
object before update
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
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
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 discoveredsip_uri: The newly discovered SIP URI
Listener for LoggingService
.
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.
A MagicSearchListener
is used to do specifics searchs.
Callback used to notify when LDAP have more results available.
Parameters
- magic_search:
MagicSearch
object - ldap:
Ldap
object
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
.
Callback used to notify that is this participant device speaking has changed.
Parameters
- participant_device:
ParticipantDevice
object - is_speaking: is this participant device speaking
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
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
Callback used to notify that participant device changed state.
Parameters
- participant_device: LinphoneParticipantDevice object
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
Callback used to notify that participant device thumbnail stream capability has changed.
Parameters
- participant_device:
ParticipantDevice
object - direction: participant device's thumbnail direction
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
Callback used to notify that participant device thumbnail stream availability has changed.
Parameters
- participant_device:
ParticipantDevice
object - available: participant device's thumbnail stream availability
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.
An object to handle the callbacks for the handling a Player
objects.
An object to handle the callbacks for handling the XmlRpcRequest
operations.
Callback used to notify the response to an XML-RPC request.
Parameters
- request:
XmlRpcRequest
object
Object that represents a Linphone Account.
This object replaces the deprecated ProxyConfig
. Use a AccountParams
object
to configure it.
Indicates whether AVPF/SAVPF is being used for calls using this account.
Returns
True if AVPF/SAVPF is enabled, False otherwise.
Returns the list of call logs for a given account. This list must be freed after use.
Returns
The list of call logs .
Returns the list of chat rooms for a given account.
Returns
The list of chat rooms .
Returns the list of conference information for a given account. This list must be freed after use.
Returns
The list of call logs .
Return the contact address of the account.
Returns
a
Address
correspong to the contact address of the account.
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.
Get the dependency of a Account
.
Returns
The account this one is dependent upon, or None if not marked dependent.
Get the reason why registration failed when the account state is LinphoneRegistrationFailed.
Returns
The
Reason
why registration failed for this account.
Get detailed information why registration failed when the account state is LinphoneRegistrationFailed.
Returns
The
ErrorInfo
explaining why registration failed for this account.
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..
Returns the missed calls count for a given account.
Returns
The missed calls count.
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 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..
Returns the unread chat message count for a given account.
Returns
The unread chat message count.
Removes a listener from this this Account
object
Parameters
- listener: The
AccountListener
object to remove
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
- lc: The
Core
object. - params: The
AccountParams
object. - config: The
ProxyConfig
object.
Returns
The newly created
Account
object.
Set one custom parameter to this Account
.
Parameters
- key: key of the searched parameter.
- value: value of the searched parameter.
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.
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 .
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.
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.
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.
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.
Normalize a human readable sip uri into a fully qualified LinphoneAddress.
A sip address should look like DisplayName
Parameters
- username: The string to parse.
Returns
None if invalid input, normalized sip address otherwise.
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
.
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/.
Get the account creation request token received to be used to check user validation.
Returns
The token set, if any
Get the current AccountCreatorListener
object associated with a
LinphoneAccountCreator.
Returns
The current
AccountCreatorListener
object associated with the LinphoneAccountCreator.
Get the international prefix.
Returns
The international prefix (or phone country code) of the
AccountCreator
.
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
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
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
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.
Get the authentication token set (if any) to be used to authenticate next queries, if required.
Returns
The token set, if any
Adds a listener to this AccountCreator
object
Parameters
- listener: The
AccountCreatorListener
object to add
Removes a listener from this this AccountCreator
object
Parameters
- listener: The
AccountCreatorListener
object to remove
Create a AccountCreator
and set Linphone Request callbacks.
Parameters
- core: The
Core
used for the XML-RPC communication
Returns
The new
AccountCreator
object.
Assign a proxy config pointer to the LinphoneAccountCreator.
Parameters
- account: The LinphoneAccount to associate with the LinphoneAccountCreator.
Assign a proxy config pointer to the LinphoneAccountCreator.
Parameters
- cfg: The LinphoneProxyConfig to associate with the LinphoneAccountCreator.
Send a request to activate an account on server.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Send a request to activate an alias.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Send a request to create an account on server.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Create and configure a Account
and a AuthInfo
from informations set in the
AccountCreator
.
Returns
A
Account
object if successful, None otherwise.
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 UseAccountCreator.create_account_in_core
instead..
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
Send a request to know if an account is activated on server.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Send a request to know the existence of account on server.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Send a request to know if an account is linked.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Send a request to know if an alias is used.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
Send a request to link an account to an alias.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
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.
Send a request to recover an account.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
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.
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
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.
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.
Send a request to update an account.
Returns
AccountCreatorStatus.RequestOk
if the request has been sent,AccountCreatorStatus.RequestFailed
otherwise
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.
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.
Get the audio video conference factory uri.
Returns
The
Address
of the audio video conference factory.
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), orAVPFMode.Disabled
(disabled).
Get the interval between regular RTCP reports when using AVPF/SAVPF.
Returns
The interval in seconds.
Get the conference factory uri.
Returns
The uri of the conference factory.
Returns the contact parameters.
Returns
The previously set contact parameters.
Return the contact URI parameters.
Returns
The previously set contact URI parameters.
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.
Returns
True if chat messages will be sent out in CPIM format, False if chat messages will be sent out as SIP SIMPLE.
Get the custom contact address previously used when registering to the SIP server.
Returns
a
Address
Return whether or not the + should be replaced by 00.
Returns
Whether liblinphone should replace "+" by "00" in dialed numbers (passed to
Core.invite
).
Get the domain name of the given account params.
Returns
The domain name of the account params.
Get the identity of the account params.
Returns
The SIP identity that belongs to this account params.
Deprecated since version 01/03/2021 UseAccountParams.identity_address
instead..
Get the identity address of the account params.
Returns
The SIP identity that belongs to this account params.
Check if encryption is mandatory for instant messages or not.
Returns
True if encryption is mandatory; False otherwise.
Gets the prefix set for this account params.
Returns
The international prefix if set, null otherwise.
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.
Gets whether push notifications are available or not (Android & iOS only).
Returns
True if push notifications are available, False otherwise
Get the Message Waiting Indication server address.
Returns
The Message Waiting Indication server address.
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.
seealsoCore.nat_policy
.
Tell if the proxy is used as the only route.
Returns
enable True if enabled, False otherwise.
Gets the account picture URI if set, None otherwise.
Returns
The account picture URI.
Get default privacy policy for all calls routed through this proxy.
Returns
Privacy mode as LinphonePrivacyMask
Tell if the PUBLISH is enabled.
Returns
True if PUBLISH request is enabled for this proxy.
Get the publish expiration time in second. Default value is the registration expiration value.
Returns
The expire time in seconds.
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.
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.
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.
Get the interval between interval reports when using quality reporting.
Returns
The interval in seconds, 0 means interval reports are disabled.
Get the realm of the given account params.
Returns
The realm of the account params.
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.
Returns whether the account params is enabled or not.
Returns
True if registration to the proxy is enabled.
Indicates whether to add to the contact parameters the push notification information.
Returns
True if remote push notification informations should be added, False otherwise.
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.
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.
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.
Get the account params proxy address.
Returns
The proxy's SIP address.
Deprecated since version 01/03/2021 UseAccountParams.server_address
instead..
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.
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.
Set one custom parameter to this AccountParams
.
Parameters
- key: key of the searched parameter.
- value: value of the searched parameter.
Instantiate a new account params with values from source.
Returns
The newly created
AccountParams
object.
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.
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 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.
returns whether the address is a routable SIP address or not
Returns
True if it is a routable SIP address, False otherwise
Get the value of the method parameter.
Returns
the value of the parameter or None.
Get the password encoded in the address. It is used for basic authentication (not recommended).
Returns
the password if any, None otherwise.
Get port number as an integer value, 0 if not present.
Returns
the port set in the address or 0 if not present.
Returns the address scheme, normally "sip".
Returns
the scheme if any, None otherwise.
Returns whether the address refers to a secure location (sips) or not.
Returns
True if address refers to a secure location, False otherwise
Set the value of the parameters of the URI of the address.
Parameters
- params: The parameters string
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.
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.
Compare two Address
taking the tags and headers into account.
Parameters
- address2:
Address
object.
Returns
Boolean value telling if the
Address
objects are equal. seealsoAddress.weak_equal
.
Get the header encoded in the address.
Parameters
- header_name: the header name.
Returns
the header value or None if it doesn't exists.
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.
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.
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
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
Removes the value of a parameter of the URI of the address.
Parameters
- uri_param_name: The name of the parameter.
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.
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.
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.
Compare two Address
ignoring tags and headers, basically just domain,
username, and port.
Parameters
- address2:
Address
object.
Returns
Boolean value telling if the
Address
objects are equal. seealsoAddress.equal
.
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.
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.
Return more informations about the alerts.
Returns
A
Dictionary
containing informations about the current alert.
Removes a listener from this this Alert
object
Parameters
- listener: The
AlertListener
object to remove
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.
Returns the capabilities of the device.
Returns
the
AudioDeviceCapabilities
of the audio device (RECORD, PLAY or both) as a bit mask
Returns the driver name used by the device.
Returns
the name of the driver used by this audio device.
Returns the type of the device.
Returns
the
AudioDeviceType
of the audio device (microphone, speaker, earpiece, bluetooth, etc...)
Returns whether or not the audio device has the given capability.
Parameters
- capability: the
AudioDeviceCapabilities
to check
Returns
True if the audio device has the capability, False otherwise
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.
Get the previously set token endpoint https uri (OAUTH2).
Returns
the token endpoint uri.
Add an unique algorithm in the the available algorithms list : Algorithms that already exist will not be added.
Parameters
- algorithm: The algorithm to add.
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.
The object representing a data buffer.
Get the size of the content of the data buffer.
Returns
The size of the content of the data buffer.
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
.
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.
Returns the ZRTP authentication token to verify.
Returns
the authentication token to verify or None if ZRTP isn't enabled.
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.
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.
Returns if camera pictures are allowed to be sent to the remote party.
Returns
True if local video stream is being sent, False otherwise.
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.
Return the associated conference object.
Returns
A pointer on
Conference
or None if the call is not part of any conference.
Get the core that has created the specified call.
Returns
The
Core
object that has created the specified call.
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
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.
Returns the diversion address associated to this call.
Returns
the diversion address as
Address
or None.
Returns if echo cancellation is enabled.
Returns
True if echo cancellation is enabled, False otherwise.
Returns if echo limiter is enabled.
Returns
True if echo limiter is enabled, False otherwise.
Returns full details about call errors or termination reasons.
Returns
ErrorInfo
object holding the reason error.
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)
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..
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.
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
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).
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)
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.
Get the mesured playback volume level (received from remote) in dbm0.
Returns
float Volume level in percentage.
Gets a player associated with the call to play a local file and stream it to the remote peer.
Returns
A
Player
object.
Returns the reason for a call termination (either error or normal termination)
Returns
the
Reason
of the call termination.
Get the mesured record volume level (sent to remote) in dbm0.
Returns
float Volume level in percentage.
Gets the refer-to uri (if the call was transfered).
Returns
The refer-to uri of the call (if it was transfered).
Returns the remote address associated to this call.
Returns
The
Address
of the remote end of the call.
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 useCall.remote_address
instead..
Returns the far end's sip contact as a string, if available.
Returns
the remote contact or None.
Returns the far end's sip contact as an address, if available.
Returns
the remote contact as a
Address
or 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.
Returns the far end's user agent description string, if available.
Returns
the remote user agent or 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.
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.
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
Returns the number of stream for the given call.
Returns
the amount of streams for this call.
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.
Returns the to address with its headers associated to this call.
Returns
the
Address
matching the TO of the call.
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
.
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.
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.
Gets the video source of a call.
Returns
The
VideoSourceDescriptor
describing the video source that is set
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.
Removes a listener from this this Call
object
Parameters
- listener: The
CallListener
object to remove
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
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
.
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
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)
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
Tell whether a call has been asked to autoanswer.
Returns
A boolean value telling whether the call has been asked to autoanswer
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.
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
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).
Decline a pending incoming call, with a reason.
Parameters
- reason: The reason for rejecting the call:
Reason.Declined
orReason.Busy
Returns
0 on success, -1 on failure
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
Returns a copy of the call statistics for a particular stream type.
Parameters
- _type: the
StreamType
Returns
a
CallStats
object for the given stream or None if stream isn't available.
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. UseCallParams.custom_header
on.
Call.remote_params
instead.
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.
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.
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.
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
.
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..
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.
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.
Resumes a call.
The call needs to have been paused previously with Call.pause
.
Returns
0 on success, -1 on failure seealso
Call.pause
.
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.
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.
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
.
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).
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).
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..
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
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
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.
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.
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.
Get the call ID used by the call.
Returns
The call ID used by the call as a string.
Retrieves the conference info associated to this call log in DB.
Returns
The
ConferenceInfo
associated.
Get the duration of the call since connected.
Returns
The duration of the call in seconds.
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.
Get the local address (that is from or to depending on call direction)
Returns
The local
Address
of the call
Get the overall quality indication of the call.
Returns
The overall quality indication of the call.
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.
Get the remote address (that is from or to depending on call direction).
Returns
The remote
Address
of the call.
Get the destination address (ie to) of the call.
Returns
The destination
Address
(ie to) of the call.
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.
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
..
Get the audio stream direction.
Returns
The audio stream
MediaDirection
associated with the call params.
Tell whether audio is enabled or not.
Returns
A boolean value telling whether audio is enabled or not.
Use to get multicast state of audio stream.
Returns
true if subsequent calls will propose multicast ip set by
Core.audio_multicast_addr
Whether or not the feedback extension will be used for AVP.
Returns
true if AVPF is enabled, false otherwise
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.
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.
Indicates whether capability negotiations (RFC5939) is enabled.
Returns
a boolean indicating the enablement of capability negotiations.
Indicate whether sending of early media was enabled.
Returns
A boolean value telling whether sending of early media was enabled.
Get the from header in the CallParams.
Returns
The content of the from header, may be null.
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
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.
Indicates whether the call is being recorded.
Returns
True if the call is being recorded, False otherwise.
Check if call parameters are valid.
Returns
True if the parameters are valid; False otherwise.
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.
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.
Get the kind of media encryption selected for the call.
Returns
The kind of
MediaEncryption
selected for the call.
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.
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
Get requested level of privacy for the call.
Returns
The LinphonePrivacyMask used for the call.
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 UseCallParams.account
instead..
Use to get real time text following rfc4103.
Returns
returns true if call rtt is activated.
Use to get keep alive interval of real time text following rfc4103.
Returns
returns keep alive interval of real time text.
Get the framerate of the video that is received.
Returns
The actual received framerate in frames per seconds, 0 if not available.
Get the path for the audio recording of the call.
Returns
The path to the audio recording of the call or None.
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.
Tell whether screen sharing is enabled or not.
Returns
A boolean value telling whether screen sharing is enabled or not.
Get the framerate of the video that is sent.
Returns
The actual sent framerate in frames per seconds, 0 if not available.
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.
Check if tone indications are enabled.
Returns
True if tone indications are enabled; False otherwise.
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.
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.
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.
Get the video stream direction.
Returns
The video stream
MediaDirection
associated with the call params.
Tell whether video is enabled or not.
Returns
A boolean value telling whether video is enabled or not.
Use to get multicast state of video stream.
Returns
true if subsequent calls will propose multicast ip set by
Core.video_multicast_addr
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.
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
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
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.
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.
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.
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
Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
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.
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.
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.
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.
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.
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.
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.
Returns the encryption is supported.
Parameters
- encryption: The
MediaEncryption
to check whether is supported
Returns
a boolean indicating whether the encryption is supported
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
.
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.
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.
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.
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.
Get the IP address family of the remote peer.
Returns
The IP address family
AddressFamily
of the remote peer.
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
Get the jitter buffer size in ms.
Returns
The jitter buffer size in ms.
Gets the cumulative number of late packets.
Returns
The cumulative number of late packets
Gets the remote reported interarrival jitter.
Returns
The interarrival jitter at last received receiver report
Gets the remote reported loss rate since last report.
Returns
The receiver loss rate
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.
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.
Gets the local interarrival jitter.
Returns
The interarrival jitter at last emitted sender report
Get the method used for SRTP key exchange.
Returns
The
MediaEncryption
method used to exchange the SRTP keys
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.
Get the ZRTP algorithm statistics details (authentication method)
Returns
The auth tag algo
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.
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.
Returns the chatroom this message belongs to.
Returns
the
ChatRoom
in which this message has been sent or received.
Get the content type of a chat message.
Returns
The content type of the chat message
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.
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.
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).
Get full details about delivery error of a chat message.
Returns
a
ErrorInfo
describing the details.
Linphone message can carry external body as defined by rfc2017.
Returns
external body url or None if not present.
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.
Gets the forward info if available as a string.
Returns
the original sender of the message if it has been forwarded, None otherwise.
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
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 aContent
.
for which Content.is_file_transfer
returns True.
Gets whether or not a file is currently being downloaded or uploaded.
Returns
True if download or upload is in progress, False otherwise
Returns wether the chat message is a forward message or not.
Returns
True if it is a forward message, False otherwise
Returns wehther the message has been sent or received.
Returns
True if message has been sent, False if it has been received.
Returns wether the message has been read or not.
Returns
True if message has been marked as read, False otherwise.
Returns wether the chat message is a reply message or not.
Returns
True if it is a reply message, False otherwise
Get if the message was encrypted when transfered.
Returns
True if the message was encrypted when transfered, False otherwise.
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 aContent
.
with a PlainText content type.
Returns the local address the message was sent or received with.
Returns
the
Address
of the local address used to send/receive this message.
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.
Returns our own reaction for a given chat message, if any.
Returns
Our own
ChatMessageReaction
for that message if any, None otherwise.
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.
Returns the ID of the message this is a reply to.
Returns
the original message id.
Returns the address of the sender of the message this is a reply to.
Returns
the original message sender
Address
.
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. UseChatMessage.utf8_text
instead..
Get if a chat message is to be stored.
Returns
Whether or not the message is to be stored
Get text part of this message. Introduced in 01/07/2020
Returns
The text in UTF8 or None if no text.
Adds a listener to this ChatMessage
object
Parameters
- listener: The
ChatMessageListener
object to add
Removes a listener from this this ChatMessage
object
Parameters
- listener: The
ChatMessageListener
object to remove
Add custom headers to the message.
Parameters
- header_name: name of the header
- header_value: header value
Creates a Content
of type PlainText with the given text as body.
Parameters
- text: The text in System Locale to add to the message.
Deprecated since version 01/07/2020. UseChatMessage.add_utf8_text_content
instead..
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.
Cancel an ongoing file transfer attached to this message. (upload or download)
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.
Start the download of the Content
referenced in the ChatMessage
from remote
server.
Parameters
- content: the
Content
object to download (must have theContent.is_file_transfer
method return True).
Returns
False if there is an error, True otherwise.
Retrieve a custom header value given its name.
Parameters
- header_name: header name searched
Returns
the custom header value or None if not found.
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.
Returns wether the chat message has a conference invitation content or not.
Returns
True if it has one, False otherwise.
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.
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.
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.
Returns the emoji(s) used for the reaction.
Returns
the emoji(s) used as UTF-8 characters.
Allows to get the Call ID associated with a ChatMessageReaction
.
Returns
the Call ID associated with this reaction.
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.
Gets the current call associated to this chatroom if any To commit a message,
use ChatMessage.send
Returns
Call
or None.
Get the capabilities of a chat room.
Returns
The capabilities of the chat room (as a LinphoneChatRoomCapabilitiesMask)
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
Gets the list of participants that are currently composing.
Returns
List of addresses that are in the is_composing state.
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.
Return the creation time for the chat room.
Returns
the time at which the chat room was created
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
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.
Gets all contents for which content-type starts with either text/ or application/.
Returns
A list of contents considered as "document".
Returns whether or not the ephemeral message feature is enabled in the chat room.
Returns
True if ephemeral is enabled, False otherwise.
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)
Get the ephemeral mode of the chat room.
seealso ChatRoom.ephemeral_enabled
.
Returns
the ephemeral mode
ChatRoomEphemeralMode
Returns whether or not a ChatRoom
has at least one ChatMessage
or not.
Returns
True if there are no
ChatMessage
, False otherwise.
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.
Tells whether the remote is currently composing a message.
Returns
True if the remote is currently composing a message, False otherwise.
Gets the last chat message sent or received in this chat room.
Returns
the latest
ChatMessage
or None if no message.
Get the local address associated to this chat room.
Returns
The local address.
Get the participant representing myself in the chat room.
Returns
The participant representing myself in the conference or None if me is not set.
Gets all contents for which content-type starts with either video/, audio/ or image/.
Returns
A list of contents considered as "media".
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.
Get the number of participants in the chat room (that is without ourselves).
Returns
The number of participants in the chat room
Get the list of participants of a chat room.
Returns
A of the participants
Gets all unread messages for this chat room, sorted from oldest to most recent.
Returns
A list of unread chat messages.
Gets the number of unread messages in the chatroom.
Returns
the number of unread messages.
Removes a listener from this this ChatRoom
object
Parameters
- listener: The
ChatRoomListener
object to remove
Converts a ChatRoomState
enum to a string.
Parameters
- state: a
ChatRoomState
to convert to string
Returns
the string representation of the
ChatRoomState
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
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
Tells whether a chat room is able to handle participants.
Returns
True if the chat room can handle participants, False otherwise
Notifies the destination of the chat message being composed that the user is typing a new message.
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
Creates a forward message attached to the given chat room with a particular message.
Parameters
- message:
ChatMessage
message to be forwarded.
Returns
a new
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. UseChatRoom.create_message_from_utf8
instead..
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
Creates a reply message attached to the given chat room with a particular message.
Parameters
- message:
ChatMessage
message to reply to.
Returns
a new
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
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
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.
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.
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.
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.
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
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.
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.
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.
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..
Check if a chat room has given capabilities.
Parameters
- mask: a LinphoneChatRoomCapabilitiesMask mask
Returns
True if the mask matches, False otherwise
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
Used to receive a chat message when using async mechanism with IM enchat_roomyption engine.
Parameters
- message:
ChatMessage
object
Remove a participant of a chat room.
Parameters
- participant: The participant to remove from the chat room
Remove several participants of a chat room at once.
Parameters
- participants: The participants to remove.
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
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
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.
Get the backend implementation of the chat room associated with the given parameters.
Returns
the
ChatRoomBackend
Get the encryption implementation of the chat room associated with the given parameters.
Returns
Get the encryption status of the chat room associated with the given parameters.
Returns
True if encryption is enabled, False otherwise
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)
Get the ephemeral message mode of the chat room associated with the given parameters.
Returns
the ephemeral message mode
ChatRoomEphemeralMode
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
Returns whether the given parameters are valid or not.
Returns
True if the given parameters are valid, False otherwise
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
.
Get the currently active speaker participant device.
Returns
the
ParticipantDevice
currently displayed as active speaker.
Gets the call that is controlling a conference.
Returns
the
Call
controlling the conference or None if none or local conference
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.
Returns core for a Conference
.
Returns
back pointer to
Core
object. Returns back pointer toCore
object.
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.
Get the conference id as string.
Returns
the conference id
Deprecated since version 10/07/2020 UseConference.conference_address
instead..
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)
Retrieves the volume of a specific participant.
Returns
The volume of the participant expressed in dbm0.
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.
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
.
Retrieves the volume of a specific participant.
Returns
The volume of the participant expressed in dbm0.
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)
Get number of participants without me.
Returns
the number of participants excluding me in a
Conference
Get list of all participant devices of a conference including me if it is in.
Returns
The list of participant devices of the conference.
Get list of all participants of a conference.
The returned list does not include me.
Returns
The list of participants of the conference.
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..
Gets a player associated with the conference to play a local file and stream it to the remote peers.
Returns
A
Player
object.
Get the participant that is currently screen sharing.
Returns
a pointer to the participant found or nullptr.
Get the participant device that is currently screen sharing.
Returns
a pointer to the participant device found or nullptr.
Removes a listener from this this Conference
object
Parameters
- listener: The
ConferenceListener
object to remove
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.
Add participants to the conference, by supplying a list of Address
.
Parameters
- addresses: A list of calls to add to the conference.
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
Find a participant from a conference.
Parameters
- uri: SIP URI of the participant to search.
Returns
a pointer to the participant found or nullptr.
Retrieves the volume of a specific participant.
Parameters
- device: The Participant
Returns
The volume of the participant expressed in dbm0.
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.
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
- uri: A
Address
object
Returns
True if the participant is me, False otherwise.
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
Parameters
- call: call to remove
Returns
0 if succeeded, -1 if failed Deprecated since version 10/07/2020 Use
Conference.remove_participant
instead..
Set stream capability on me device of a local conference.
Parameters
- direction: the direction of stream of type stream_type
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
Starts recording the conference.
Parameters
- path: Where to record the conference
Returns
0 if succeeded. Negative number in case of failure.
Stops the conference recording.
Returns
0 if succeeded. Negative number in case of failure.
Terminates conference.
Returns
0 if the termination is successful, -1 otherwise.
Object defining all information related to a conference.
Retrieve the date and time of the conference.
Returns
The date and time of the conference.
Retrieve the description of the conference.
Returns
The description of the conference.
Retrieve the duration (in minutes) of the conference.
Returns
The duration of the conference.
Retrieve the conference as an Icalendar string.
Returns
The conference as an Icalendar string. The returned char* must be freed by the caller.
Retrieve the list of participants as list of participant infos.
Returns
The list of participant informations.
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
Retrieve the desired security level of the conference.
Returns
The desired security level of the conference.
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
Add a list of participants.
Parameters
- participant_infos: The list of participant informations to add.
Find a participant information in the conference information.
Parameters
- participant: The participant (
Address
) to search.
Returns
The participant information (
ParticipantInfo
).
Remove a participant from the conference.
Parameters
- participant: The participant (
Address
) to remove.
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
Object defining parameters for a Conference
.
Can be created by calling function Core.create_conference_params
.
Returns the account for the conference.
Returns
a pointer to the account or None if it is not set.
Check whether audio capabilities are enabled.
Returns
True if the conference supports audio capabilities, False otherwise
Check whether chat capabilities are enabled.
Returns
True if the conference supports chat capabilities, False otherwise
Get the conference factory address of the conference that has been set.
Returns
the factory address conference description.
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
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..
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..
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.
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.
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..
Returns whether local participant has to enter the conference.
Returns
True if local participant is by default part of the conference, False otherwise
Returns whether conference can have only one participant.
Returns
True if the conference can have only one participant, False otherwise
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 UseConferenceParams.account
instead..
Retrieve the desired security level of the conference.
Returns
The desired security level of the conference.
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
Check whether video capabilities are enabled.
Returns
True if the conference supports video capabilities, False otherwise
Clone a ConferenceParams
.
Returns
An allocated
ConferenceParams
with the same parameters than params
Object used to create remote conferences and send ICS to notify participants.
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.
Returns the ConferenceInfo
currently set in this scheduler.
Returns
the currently configured
ConferenceInfo
or None if none is set.
Adds a listener to this ConferenceScheduler
object
Parameters
- listener: The
ConferenceSchedulerListener
object to add
Removes a listener from this this ConferenceScheduler
object
Parameters
- listener: The
ConferenceSchedulerListener
object to remove
Cancel the conference linked to the ConferenceInfo
provided as argument.
Parameters
- conference_info: the
ConferenceInfo
object to linked to the conference to cancel.
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 theChatRoom
that will be used to send the invite.
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.
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.
Returns the list of sections' names in the LinphoneConfig.
Returns
A list of strings.
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
- buffer: the buffer from which the
Config
will be retrieved. We expect the buffer to be null-terminated.
seealsoConfig.new_with_factory
.
seealso linphone_config_new.
Returns
a
Config
object
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 theConfig
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.
Removes entries for key,value in a section.
Parameters
- section: the section for which to clean the key entry
- key: the key to clean
Removes every pair of key,value in a section and remove the section.
Parameters
- section: the section to clean
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.
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.
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.
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.
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.
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.
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.
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.
Returns the list of keys' names for a section in the LinphoneConfig.
Parameters
- section: The section name
Returns
A list of strings.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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.
Get the disposition of the Content, for example "recipient-list".
Returns
The disposition of the Content.
Get the encoding of the data buffer, for example "gzip".
Returns
The encoding of the data buffer.
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.
Get the file size if content is either a FileContent or a FileTransferContent.
Returns
The represented file size.
Tells whether or not this content contains a file.
Returns
True if this content contains a file, False otherwise.
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.
Tells whether or not this content is a file transfer.
Returns
True if this content is a file transfer, False otherwise.
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.
Tell whether a content is a multipart content.
Returns
A boolean value telling whether the content is multipart or not.
Tells whether or not this content contains text.
Returns
True if this content contains plain text, False otherwise.
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.
Get the key associated with a RCS file transfer message if encrypted.
Returns
The key to encrypt/decrypt the file associated to this content.
Get the size of key associated with a RCS file transfer message if encrypted.
Returns
The key size in bytes
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.
Get all the parts from a multipart content.
Returns
A object holding the part if found, None otherwise.
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..
Get the content data buffer size, excluding null character despite null character is always set for convenience.
Returns
The content data buffer size.
Get the string content data buffer.
Returns
The string content data buffer.
Deprecated since version 2020-07-01. UseContent.utf8_text
instead..
Get the mime subtype of the content data.
Returns
The mime subtype of the content data, for example "html".
Get the mime type of the content data.
Returns
The mime type of the content data, for example "application".
Get the string content data buffer. Introduced in 01/07/2020
Returns
The string content data buffer in UTF8.
Adds a parameter to the ContentType header.
Parameters
- name: the name of the parameter to add.
- value: the value of the parameter to add.
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.
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.
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.
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.
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.
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.
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'.
Returns whether adaptive rate control is enabled.
seealso Core.adaptive_rate_control_enabled
.
Returns
True if adaptive rate control is enabled, False otherwise
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.
Returns whether alert reporting is enabled.
See Alert
for more details.
Returns
whether alert reporting is enabled.
Tells whether the audio adaptive jitter compensation is enabled.
Returns
True if the audio adaptive jitter compensation is enabled, False otherwise.
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
Get the DSCP field for outgoing audio streams. The DSCP defines the quality of service in IP packets.
Returns
The current DSCP value
Returns the nominal audio jitter buffer size in milliseconds.
Returns
The nominal audio jitter buffer size in milliseconds
Use to get multicast address to be used for audio stream.
Returns
an ipv4/6 multicast address or default value.
Use to get multicast state of audio stream.
Returns
True if subsequent calls will propose multicast ip set by
Core.audio_multicast_addr
Use to get multicast ttl to be used for audio stream.
Returns
a time to leave value
Return the list of the available audio payload types.
Returns
A freshly allocated list of the available payload types.
Gets the UDP port used for audio streaming.
Returns
The UDP port used for audio streaming
Get the audio port range from which is randomly chosen the UDP port used for audio streaming.
Returns
a
Range
object
Gets if the auto download for incoming icalendars is enabled or not.
Returns
True if icalendars will be automatically downloaded, False otherwise.
Gets if the auto download for incoming voice recordings is enabled or not.
Returns
True if voice recordings will be automatically downloaded, False otherwise.
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).
Gets whether auto iterate is enabled or not (Android & iOS only).
Returns
True if
Core.iterate
is scheduled automatically, False otherwise
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).
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.
Returns whether automatic http proxy is enabled.
Returns
True if automatic http proxy is enabled or False.
Return the avpf report interval in seconds.
Returns
The current AVPF report interval in seconds
Gets the database filename where call logs will be stored.
Returns
filesystem path.
Deprecated since version 07/12/2021: Use only for migration purposes.
Check whether tone indications of calls are enabled.
Returns
True if call tone indications are enabled
Special function to check if the callkit is enabled, False by default.
Returns
True if callkit is enabled, False otherwise.
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
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
Gets the whitebalance of the camera (currently only supported by Android).
Returns
The whitebalance of the camera, default is -1 (disabled).
Check if the capability negotiation (RFC5939) is supported or not.
Returns
True if capability negotiation is supported; False otherwise.
Check if the capability negotiation (RFC5939) reINVITE is enabled or not.
Returns
True if capability negotiation reINVITE is enabled; False otherwise.
Gets the name of the currently assigned sound device for capture.
Returns
The name of the currently assigned sound device for capture.
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.
Returns whether chat is enabled.
Returns
True if chat is enabled, False otherwise
Returns whether chat messages grouping is enabled or not.
Returns
True if received chat messages will be notified as a bundle, False otherwise.
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 UseCore.search_conference
instead..
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.
Retrieve the list of conference information on DB.
Returns
The list of conference infos .
Get the set input volume of the local participant.
Returns
A value inside [0.0 ; 1.0]
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
Tells whether the default conference participant list is open or closed.
Returns
A
ConferenceParticipantListType
participant list type
Tells whether the conference server feature is enabled.
Returns
A boolean value telling whether the conference server feature is enabled or not
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..
Gets the current call.
Returns
The current call or None if no call is running.
Get the remote address of the current call.
Returns
The remote address of the current call or None if there is no current call.
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
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
.
seealsoCore.preview_video_definition
.
Returns the default account, that is the one used to determine the current identity.
Returns
The default account.
Gets the default conference layout @core core the linphone core.
Returns
conference layout
Gets the default lifetime of ephemeral messages in seconds @core core the linphone core.
Returns
lifetime of ephemeral messages in seconds
Gets the default input audio device.
Returns
The default input audio device
Gets the default output audio device.
Returns
The default output audio device
Returns the default proxy configuration, that is the one used to determine the current identity.
Returns
The default proxy configuration.
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.
Gets the delayed timeout See Core.delayed_timeout
for details.
Returns
The current delayed timeout in seconds
Gets the current device orientation.
Returns
The current device orientation seealso
Core.device_rotation
.
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.
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.
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.
Tells if the DNS was set by an application.
Returns
True if DNS was set by app, False otherwise.
Tells whether DNS SRV resolution is enabled.
Returns
True if DNS SRV resolution is enabled, False if disabled.
Retrieve the maximum available download bandwidth.
This value was set by Core.download_bandwidth
.
Returns
the download bandiwdth in kbits/s, 0 for infinite
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
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
.
Returns True if echo cancellation is enabled.
Returns
A boolean value telling whether echo cancellation is enabled or disabled
Get the name of the mediastreamer2 filter used for echo cancelling.
Returns
The name of the mediastreamer2 filter used for echo cancelling.
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.
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
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.
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
..
Returns whether or not friend lists subscription are enabled.
Returns
whether or not the feature is enabled
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.
Retrieve the list of future conference information on DB.
Returns
The list of future conference infos .
Returns enablement of RFC3389 generic comfort noise algorithm.
Returns
True if generic comfort noise is enabled, False otherwise.
Returns True if hostname part of primary contact is guessed automatically.
Returns
True if guess hostname enabled, False otherwise.
Get http proxy address to be used for signaling.
Returns
hostname of IP adress of the http proxy (can be None to disable).
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.
Get the ImNotifPolicy
object controlling the instant messaging notifications.
Returns
A
ImNotifPolicy
object.
Gets the in call timeout See Core.in_call_timeout
for details.
Returns
The current in call timeout in seconds
Returns the incoming call timeout See Core.inc_timeout
for details.
Returns
The current incoming call timeout in seconds
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.
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.
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..
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.
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 UseCore.auto_iterate_enabled
instead..
Check whether the device is echo canceller calibration is required.
Returns
True if it is required, False otherwise
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..
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.
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..
Tells whether there is an incoming invite pending.
Returns
A boolean telling whether an incoming invite is pending or not.
Check if the configured media encryption is mandatory or not.
Returns
True if media encryption is mandatory; False otherwise.
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..
return network state either as positioned by the application or by linphone itself.
Returns
True if network is reachable, False otherwise
Gets whether push notifications are available or not (Android & iOS only).
Returns
True if push notifications are available, False otherwise
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..
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..
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
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
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.
Is signaling keep alive enabled.
Returns
A boolean value telling whether signaling keep alive is enabled
Get the label assigned to the LinphoneCore. The default value is None (no label).
Returns
the assigned label.
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.
Returns a list of entered LDAPs. Items must be freed with linphone_ldap_unref
Returns
Get the x3dh server url.
Returns
The x3dh server url.
Deprecated since version 26/08/2022 UseAccountParams.lime_server_url
instead..
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.
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.
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.
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.
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
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
Gets the name of the currently assigned sound device for media.
Returns
The name of the currently assigned sound device for capture.
Get the media encryption policy being used for RTP packets.
Returns
The
MediaEncryption
policy being used.
This function returns the media resource mode for this core.
Returns
The media resource mode
Tells whether the microphone is enabled.
Returns
True if the microphone is enabled, False if disabled.
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.
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.
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.
seealsoAccountParams.nat_policy
.
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.
Returns whether the native ringing is enabled or not.
Returns
True if we use the native ringing, false otherwise
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.
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
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.
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.
Gets the name of the currently assigned sound device for playback.
Returns
The name of the currently assigned sound device for playback.
Get playback gain in db before entering sound card.
Returns
The current playback gain
Returns the preferred video framerate, previously set by
Core.preferred_framerate
.
Returns
frame rate in number of frames per seconds.
Get the preferred video definition for the stream that is captured and sent to the remote party.
Returns
The preferred
VideoDefinition
Get the definition of the captured video.
Returns
The captured
VideoDefinition
if it was previously set byCore.preview_video_definition
, otherwise a 0x0 LinphoneVideoDefinition.
seealsoCore.preview_video_definition
.
Returns the default identity when no proxy configuration is used.
Returns
the primary contact identity
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 UseCore.create_primary_contact_parsed
instead..
Returns the push incoming call timeout See Core.push_incoming_call_timeout
for details.
Returns
The current push incoming call timeout in seconds
Gets the push notification configuration object if it exists.
Returns
the
PushNotificationConfig
if it exists, None otherwise.
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
Tells whether QRCode is enabled in the preview.
Returns
A boolean value telling whether QRCode is enabled in the preview.
Gets if realtime text is enabled or not.
Returns
True if realtime text is enabled, False otherwise
Gets if the record aware feature is enabled or not.
Returns
True if the record aware feature is enabled, False otherwise.
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.
Get the ring back tone played to far end during incoming calls.
Returns
the path to the remote ring back tone to be played.
Tells whether NACK context is enabled or not.
Returns
A boolean value telling whether NACK context is enabled or not
Returns the path to the wav file used for ringing.
Returns
The path to the wav file used for ringing.
Tells whether the ring play is enabled during an incoming early media call.
Returns the path to the wav file used for ringing back.
Returns
The path to the wav file used for ringing back.
Gets the name of the currently assigned sound device for ringing.
Returns
The name of the currently assigned sound device for ringing.
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.
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.
Media offer control param for SIP INVITE.
Returns
true if INVITE has to be sent whitout SDP.
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..
Returns the session expires refresher value.
Get the DSCP field for SIP signaling channel. The DSCP defines the quality of service in IP packets.
Returns
The current DSCP value
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.
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 UseCore.audio_devices
instead..
Get the crypto suites available to the core.
Returns
a comma separated list of supported suites
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.
Get the frame rate for static picture.
Returns
The frame rate used for static picture.
Get the STUN server address being used.
Returns
The STUN server address being used.
Returns a null terminated table of strings containing the file format extension supported for call recording.
Returns
The supported formats, typically 'wav' and 'mkv'.
Get the support level of the 100rel attribute.
Returns
The 100 rel support level
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.
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.
Gets the UDP port used for text streaming.
Returns
The UDP port used for text streaming
Get the text port range from which is randomly chosen the UDP port used for text streaming.
Returns
a
Range
object
Gets the path to the TLS certificate file.
Returns
the TLS certificate path or None if not set yet.
Gets the path to the TLS key file.
Returns
the TLS key path or None if not set yet.
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
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
Return the global unread chat message count.
Returns
The global unread chat message count.
Return the unread chat message count for all active local address. (Primary contact + proxy configs.)
Returns
The unread chat message count.
Retrieve the maximum available upload bandwidth.
This value was set by Core.upload_bandwidth
.
Returns
the upload bandiwdth in kbits/s, 0 for infinite
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
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.
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.
Indicates whether SIP INFO is used to send digits.
Returns
A boolean value telling whether SIP INFO is used to send digits
Indicates whether RFC2833 is used to send digits.
Returns
A boolean value telling whether RFC2833 is used to send digits
Get the path to the directory storing the user's certificates.
Returns
The path to the directory storing the user's certificates.
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
Get the default policy for video.
See Core.video_activation_policy
for more details.
Returns
The currently used video policy
Tells whether the video adaptive jitter compensation is enabled.
Returns
True if the video adaptive jitter compensation is enabled, False otherwise.
Tells whether video capture is enabled.
Returns
True if video capture is enabled, False if disabled.
Get the current priority policy for video codecs (payload types).
See CodecPriorityPolicy
for more details.
Returns
the current
CodecPriorityPolicy
Returns the name of the currently active video device.
Returns
The name of the currently active video device.
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.
Tells whether video display is enabled.
Returns
True if video display is enabled, False if disabled.
Get the name of the mediastreamer2 filter used for rendering video.
Returns
The currently selected video display filter.
Get the DSCP field for outgoing video streams. The DSCP defines the quality of service in IP packets.
Returns
The current DSCP value
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.
Returns the nominal video jitter buffer size in milliseconds.
Returns
The nominal video jitter buffer size in milliseconds
Use to get multicast address to be used for video stream.
Returns
an ipv4/6 multicast address, or default value.
Use to get multicast state of video stream.
Returns
True if subsequent calls will propose multicast ip set by
Core.video_multicast_addr
Use to get multicast ttl to be used for video stream.
Returns
a time to leave value
Return the list of the available video payload types.
Returns
A freshly allocated list of the available payload types.
Gets the UDP port used for video streaming.
Returns
The UDP port used for video streaming
Get the video port range from which is randomly chosen the UDP port used for video streaming.
Returns
a
Range
object
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).
Tells whether video preview is enabled.
Returns
A boolean value telling whether video preview is enabled
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
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.
Check if the ZRTP go clear is enabled or not.
Returns
True if ZTRP go clear is enabled; False otherwise.
Get the path to the file storing the zrtp secrets cache.
Returns
The path to the file storing the zrtp secrets cache.
Removes a listener from this this Core
object
Parameters
- listener: The
CoreListener
object to remove
Compress the log collection in a single file.
Returns
The path of the compressed log collection file (to be freed calling ms_free()).
Enable the linphone core log collection to upload logs on a server.
Parameters
- state:
LogCollectionState
value telling whether to enable log collection or not.
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.
Get the path where the log files will be written for log collection.
Returns
The path where the log files will be written.
Get the prefix of the filenames that will be used for log collection.
Returns
The prefix of the filenames used for log collection.
Are PostQuantum algoritms available.
Returns
True if Post Quantum algorithms are available False otherwise
Tells whether the linphone core log collection is enabled.
Returns
The
LogCollectionState
of theCore
log collection.
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.
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.
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.
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.
True if tunnel support was compiled.
Returns
True if library was built with tunnel, False otherwise
Return the availability of uPnP.
Returns
true if uPnP is available otherwise return false.
Tells whether VCARD support is builtin.
Returns
True if VCARD is supported, False otherwise.
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.
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.
Enable or disable the UPDATE method support.
Parameters
- value: Enable or disable it
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
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.
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
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
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
Parameters
- name: The name of the definition to set
Sets the trusted root CAs (PEM format)
Parameters
- data: The trusted root CAs as a string
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
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.
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.
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.
Add an account. This will start registration on the proxy, if registration is enabled.
Parameters
- account: the
Account
to add
Returns
0 if successful, -1 otherwise
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.
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
Add or update a LDAP server and save it to the configuration.
Parameters
- ldap: The LDAP to add/update.
Add the given linphone specs to the list of functionalities the linphone client supports.
Parameters
- spec: The spec to add
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.
Add a proxy configuration. This will start registration on the proxy, if registration is enabled.
Parameters
- config: the
ProxyConfig
to add
Returns
0 if successful, -1 otherwise
This function controls signaling features supported by the core. They are typically included in a SIP Supported header.
Parameters
- tag: The feature tag name
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
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.
Gets the default ephemeral message mode @core core the linphone core.
Returns
the default ephemeral message mode
ChatRoomEphemeralMode
Sets the default ephemeral message mode.
Parameters
- mode: default ephemeral message mode
ChatRoomEphemeralMode
Checks if a new version of the application is available.
Parameters
- current_version: The current version of the application
Clear all headers that were added with Core.add_provisioning_header
.
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.
Create an account using given parameters, see Core.create_account_params
.
Parameters
- params:
AccountParams
object
Returns
Account
with default values set
Create a AccountCreator
and set Linphone Request callbacks.
Parameters
- xmlrpc_url: The URL to the XML-RPC server.
Returns
The new
AccountCreator
object.
Create an account params using default values from Linphone core.
Returns
AccountParams
with default values set
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
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.
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, useCore.create_chat_room
instead.
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, useCore.create_chat_room
instead.
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.
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
.
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
- params: Parameters of the conference. See
ConferenceParams
.
Returns
A pointer on the freshly created conference
Conference
. That object will be automatically freed by the core after callingCore.terminate_conference
.
Create a content with default values from Linphone core.
Returns
Content
object with default values set
Create a Friend
from ai Vcard
.
Parameters
- vcard: a
Vcard
object
Returns
A new
Friend
object which has its vCard attribute initialized from the given vCard, accessible usingFriend.vcard
.
Creates an empty info message.
Returns
a new LinphoneInfoMessage.
The info message can later be filled with information usingInfoMessage.add_header
orInfoMessage.content
, and finally sent with linphone_core_send_info_message().
Create an empty LDAP search.
Ldap.params
must be call to save the parameters in the configuration file.
Returns
Ldap
with default values set
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.
Create a LDAP search using given parameters and store them in the configuration file.
Parameters
- params:
LdapParams
object
Returns
Ldap
with default values set
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.
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.
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.
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.
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.
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.
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.
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.
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.
Create a PresencePerson
with the given id.
Parameters
- _id: The id of the person to be created.
Returns
The created
PresencePerson
object.
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.
Same as Core.primary_contact
but the result is a Address
object instead of
const char *.
Returns
a
Address
object.
Create a proxy config with default values from Linphone core.
Returns
ProxyConfig
with default values set
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.
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.
Create a recorder params that will hold parameters. This recorder support WAVE and MATROSKA formats.
Returns
A pointer on the newly created instance.
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.
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.
Removes a chatroom including all message history from the LinphoneCore.
Parameters
- chat_room: A
ChatRoom
object
Sets device_token when application didRegisterForRemoteNotificationsWithDeviceToken (IOS only).
Parameters
- device_token: (NSData *).
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..
Inconditionnaly disable incoming chat messages.
Parameters
- deny_reason: the deny reason (
Reason.None
has no effect).
Enable reception of incoming chat messages.
By default it is enabled but it can be disabled with Core.disable_chat
.
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..
This method is called by the application to notify the linphone core library when it enters background mode.
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..
This method is called by the application to notify the linphone core library when it enters foreground mode.
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
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.
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. UseCore.call_by_remote_address2
instead..
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.
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.
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, useCore.search_chat_room
instead.
Retrieve the conference information linked to the provided URI if any.
Parameters
- uri:
Address
of the uri.
Returns
The
ConferenceInfo
found if any, None otherwise.
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, useCore.search_chat_room
instead.
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 useCore.call_by_remote_address2
instead.
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
Returns
A list of
CallLog
.
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, useCore.search_chat_room
instead.
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, useCore.search_chat_room
instead.
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 .
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.
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.
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.
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.
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
Return the unread chat message count for a given local address.
Parameters
- address:
Address
object.
Returns
The unread chat message count.
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
Check whether the device has a hardware echo canceller.
Returns
True if it does, False otherwise
Check whether the device is flagged has crappy opengl.
Returns
True if crappy opengl flag is set, False otherwise
Tells whether there is a call running.
Returns
A boolean value telling whether a call is currently running or not
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.
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.
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.
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.
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.
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.
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
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
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
Main loop function.
It is crucial that your application call it periodically.
Core.iterate
performs various backgrounds tasks:
Tells if LDAP is available.
Returns
True if LDAP is available, False otherwise
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..
Update current config with the content of a xml config file.
Parameters
- xml_uri: the path to the xml file
Check if a media encryption type is supported.
Parameters
- menc:
MediaEncryption
Returns
whether a media encryption scheme is supported by the
Core
engine
Migrates the call logs from the linphonerc to the database if not done yet.
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.
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.
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
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
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
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.
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.
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.
Gets keep alive interval of real time text.
Returns
keep alive interval of real time text.
Set keep alive interval for real time text.
Parameters
- interval: The keep alive interval of real time text, 25000 by default.
Black list a friend.
same as Friend.inc_subscribe_policy
with SubscribePolicy.SPDeny
policy;
Parameters
- linphone_friend:
Friend
to reject
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.
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.
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.
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.
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
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, unlessCore.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.
Remove the given linphone specs from the list of functionalities the linphone client supports.
Parameters
- spec: The spec to remove
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
- config: the
ProxyConfig
to remove
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.
Find a chat room.
Parameters
- params: The chat room parameters to match
ChatRoomParams
or None localAddr:
Address
representing the local proxy configuration or NoneremoteAddr:
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.
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
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
Set the rectangle where the decoder will search a QRCode.
Parameters
- x: axis
- y: axis
- w: width
- h: height
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
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.
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.
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
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().
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().
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
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
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..
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.
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.
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.
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
.
Stop recording the running conference.
Returns
0 if succeeded. Negative number if failed Deprecated since version 14/09/2021 Use
Conference.stop_recording
instead..
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.
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.
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).
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
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.
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
Represents a dial plan.
Returns the country calling code of the dialplan.
Returns
the country calling code
Returns the flag of the teritory as unicode characters.
Returns
the flag as unicode characters
Returns the international call prefix of the dialplan.
Returns
the international call prefix
Returns the national number length of the dialplan.
Returns
the national number length
Find best match for given CCC.
Parameters
- ccc: The country calling code
Returns
the matching dial plan, or a generic one if none found
Find best match for given CCC.
Parameters
- ccc: the country calling code
Returns
the matching dial plan, or a generic one if none found
Object that represents key-value pair container.
Gets the float value of a key.
Parameters
- key: The key.
Returns
The value.
Gets the int value of a key.
Parameters
- key: The key.
Returns
The value.
Gets the int64 value of a key.
Parameters
- key: The key.
Returns
The value.
Gets the char* value of a key.
Parameters
- key: The key.
Returns
The value.
Search if the key is present in the dictionary.
Parameters
- key: The key.
Returns
The LinphoneStatus of the operation.
Removes the pair of the key.
Parameters
- key: The key.
Returns
The LinphoneStatus of the operation.
Sets a float value to a key.
Parameters
- key: The key.
- value: The int value.
Sets a int value to a key.
Parameters
- key: The key.
- value: The int value.
Sets a int64 value to a key.
Parameters
- key: The key.
- value: The int64 value.
The LinphoneDigestAuthenticationPolicy holds parameters relative to digest authentication procedures.
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
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
Object representing all informations present in an ekt event.
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.
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
Get the status code from the low level protocol (ex a SIP status code).
Returns
The status code
Get Retry-After delay second from the error info.
Returns
The Retry-After delay second
Object representing an event state, which is subcribed or published.
seealso Core.publish
.
seealso Core.subscribe
.
Get the current LinphoneEventCbs object associated with a LinphoneEvent.
Returns
The current LinphoneEventCbs object associated with the LinphoneEvent.
Get publish state.
If the event object was not created by a publish mechanism, PublishState.None
is returned.
Returns
the current
PublishState
Get the "contact" address of the subscription.
Returns
The "contact" address of the subscription
Get subscription direction.
If the object wasn't created by a subscription mechanism,
SubscriptionDir.InvalidDir
is returned.
Returns
the
SubscriptionDir
Get subscription state.
If the event object was not created by a subscription mechanism,
SubscriptionState.None
is returned.
Returns
the current
SubscriptionState
Removes a listener from this this Event
object
Parameters
- listener: The
EventListener
object to remove
Accept an incoming publish.
Returns
0 if successful, error code otherwise
Accept an incoming subcription.
Returns
0 if successful, error code otherwise
Add a custom header to an outgoing susbscription or publish.
Parameters
- name: header's name
- value: the header's value.
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.
Send a notification.
Parameters
- body: an optional body containing the actual notification data.
Returns
0 if successful, -1 otherwise.
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
.
Refresh an outgoing publish keeping the same body.
Returns
0 if successful, -1 otherwise.
Refresh an outgoing subscription keeping the same body.
Returns
0 if successful, -1 otherwise.
Remove custom header to an outgoing susbscription or publish.
Parameters
- name: header's name
Send a publish created by Core.create_publish
.
Parameters
- body: the new data to be published
Returns
0 if successful, -1 otherwise.
Send a subscription previously created by Core.create_subscribe
.
Parameters
- body: optional content to attach with the subscription.
Returns
0 if successful, -1 otherwise.
Terminate an incoming or outgoing subscription that was previously acccepted,
or a previous publication.
The Event
shall not be used anymore after this operation.
Update (refresh) a publish.
Parameters
- body: the new data to be published
Returns
0 if successful, error code otherwise
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
.
Returns the device address of a conference participant device event.
Returns
The conference device
Address
.
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.
Returns the notify id of a conference notified event.
Returns
The conference notify id.
Returns the participant address of a conference participant event.
Returns
The conference participant
Address
.
Returns the faulty device address of a conference security event.
Returns
The
Address
of the faulty device.
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.
Get the directory where the data resources are located.
Returns
The path to the directory where the data resources are located
Get the directory where the image resources are located.
Returns
The path to the directory where the image resources are located
Indicates if the storage in database is available.
Returns
True if the database storage is available, False otherwise
Test if download dir has been set.
Returns
True if download dir has been set.
Indicates if the QRCode feature is available.
Returns
True if QRCodes can be used
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.
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.
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.
Get the directory where the ring resources are located.
Returns
The path to the directory where the ring resources are located
Get the directory where the sound resources are located.
Returns
The path to the directory where the sound resources are located
Get the list of standard video definitions supported by Linphone.
Returns
A list of video definitions.
Get the top directory where the resources are located.
Returns
The path to the top directory where the resources are located
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
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
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
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
Sets the log collection path.
Parameters
- path: the path of the logs
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.
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. TheCore
makes a copy ofAuthInfo
passed throughCore.add_auth_info
.
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
.
Creates an object ConferenceInfo
from an Icalendar Content
.
Parameters
- content: the Icalendar
Content
Returns
a
ConferenceInfo
created from an IcalendarContent
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 caseCore
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().
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 theCore
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
seealsoFactory.create_core
.
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
.
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.
Create a ParticipantDeviceIdentity
object.
Parameters
- address:
Address
object. - name: the name given to the device.
Returns
A new
ParticipantDeviceIdentity
.
Creates an object ConferenceInfo
from an Icalendar Content
.
Parameters
- address: the
Address
of the participant
Returns
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
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
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
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
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
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
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
Indicates if the given LinphoneChatRoomBackend is available.
Parameters
- chatroom_backend: the
ChatRoomBackend
Returns
True if the chatroom backend is available, False otherwise
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
Creates a AccountListener listener to object that can be added later using Account.add_listener()
method
Creates a AccountCreatorListener listener to object that can be added later using AccountCreator.add_listener()
method
Creates a AlertListener listener to object that can be added later using Alert.add_listener()
method
Creates a CallListener listener to object that can be added later using Call.add_listener()
method
Creates a ChatMessageListener listener to object that can be added later using ChatMessage.add_listener()
method
Creates a ChatRoomListener listener to object that can be added later using ChatRoom.add_listener()
method
Creates a ConferenceListener listener to object that can be added later using Conference.add_listener()
method
Creates a ConferenceSchedulerListener listener to object that can be added later using ConferenceScheduler.add_listener()
method
Creates a CoreListener listener to object that can be added later using Core.add_listener()
method
Creates a EventListener listener to object that can be added later using Event.add_listener()
method
Creates a FriendListener listener to object that can be added later using Friend.add_listener()
method
Creates a FriendListListener listener to object that can be added later using FriendList.add_listener()
method
Creates a LoggingServiceListener listener to object that can be added later using LoggingService.add_listener()
method
Creates a MagicSearchListener listener to object that can be added later using MagicSearch.add_listener()
method
Creates a ParticipantDeviceListener listener to object that can be added later using ParticipantDevice.add_listener()
method
Creates a PlayerListener listener to object that can be added later using Player.add_listener()
method
Creates a XmlRpcRequestListener listener to object that can be added later using XmlRpcRequest.add_listener()
method
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...
Returns the capabilities associated to this friend.
Returns
an int representing the capabilities of the friend
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
Get the current FriendListener
object associated with a LinphoneFriend.
Returns
The current
FriendListener
object associated with the LinphoneFriend.
Returns a list of FriendDevice
for this friend, for all known addresses.
Returns
A list of
FriendDevice
.
Tells whether we already received presence information for a friend.
Returns
True if presence information has been received for the friend, False otherwise.
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.
Gets the contact's native URI.
Returns
the native URI set if any, None otherwise.
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.
Returns a list of phone numbers for this friend.
Returns
A list of phone numbers as string.
Gets the contact's picture URI.
Returns
the picture URI set if any, None otherwise.
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).
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.
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.
get subscription flag value
Returns
returns True is subscription is activated for this friend
Removes a listener from this this Friend
object
Parameters
- listener: The
FriendListener
object to remove
Adds a phone number in this friend.
Parameters
- phone_number: number to add
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
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.
Returns the version of a friend's capbility.
Parameters
- capability:
FriendCapability
object
Returns
the version of a friend's capbility.
Returns a list of FriendDevice
for this friend and a specific address.
Parameters
- address:
Address
object
Returns
A list of
FriendDevice
.
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.
Returns the security level of a friend for a given address which is the lowest among all devices we know for that address.
Parameters
- address:
Address
object
Returns
A
SecurityLevel
, which is the lowest among all known devices for that address.
Returns whether or not a friend has a capbility.
Parameters
- capability:
FriendCapability
object
Returns
whether or not a friend has a capbility
Returns whether or not a friend has a capbility with a given version.
Parameters
- capability:
FriendCapability
object - version: the version to test
Returns
whether or not a friend has a capbility with a given version or -1.0 if friend has not capability.
Returns whether or not a friend has a capbility with a given version or more.
Parameters
- capability:
FriendCapability
object - version: the version to test
Returns
whether or not a friend has a capbility with a given version or more.
Returns whether a friend contains the given phone number.
Parameters
- phone_number: the phone number to search for
Returns
True if found, False otherwise
Check that the given friend is in a friend list.
Returns
True if the friend is in a friend list, False otherwise.
Removes a phone number in this friend.
Parameters
- phone_number: number to remove
Removes a FriendPhoneNumber
from this friend.
Parameters
- phone_number: the
FriendPhoneNumber
to remove
Saves a friend either in database if configured, otherwise in linphonerc.
Parameters
- core: the linphone core
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
Object that represents a Friend
's device (name, trust level) for a given SIP
address.
Gets the address associated to this device.
Returns
the address (including gruu) to which this device is linked.
This object representing a list of Friend
.
You can use it to store contacts locally or synchronize them through CardDAV
protocol.
Get the current FriendListListener
object associated with a
LinphoneFriendList.
Returns
The current
FriendListListener
object associated with the LinphoneFriendList.
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
Get the display name of the friend list.
Returns
The display name of the friend list.
Get wheter the subscription of the friend list is bodyless or not.
Returns
Wheter the subscription of the friend list is bodyless or not.
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.
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. UseFriendList.rls_address
instead..
Gets whether subscription to NOTIFYs are enabled or not.
Returns
Whether subscriptions are enabled or not
Get the URI associated with the friend list.
Returns
The URI associated with the friend list.
Removes a listener from this this FriendList
object
Parameters
- listener: The
FriendListListener
object to remove
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.
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.
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.
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
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.
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.
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.
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.
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
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
Notify our presence to all the friends in the friend list that have subscribed to our presence directly (not using a RLS).
Parameters
- presence:
PresenceModel
object.
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.
Starts a CardDAV synchronization using value set using linphone_friend_list_set_uri.
Goes through all the Friend
that are dirty and does a CardDAV PUT to update
the server.
Object that represents a Friend
's phone number.
Gets the label associated to this phone number.
Returns
the label set if any, None otherwise.
Object representing a chain of protocol headers. It provides read/write access to the headers of the underlying protocol.
Add given header name and corresponding value.
Parameters
- name: the header's name
- value: the header's value
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).
Tell whether imdn delivered notifications are being notified when received.
Returns
Boolean value telling whether imdn delivered notifications are being notified when received.
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.
Tell whether imdn displayed notifications are being notified when received.
Returns
Boolean value telling whether imdn displayed notifications are being notified when received.
Tell whether is_composing notifications are being notified when received.
Returns
Boolean value telling whether is_composing notifications are being notified when received.
Tell whether imdn delivered notifications are being sent.
Returns
Boolean value telling whether imdn delivered notifications are being sent.
Tell whether imdn delivery error notifications are being sent.
Returns
Boolean value telling whether imdn delivery error notifications are being sent.
Tell whether imdn displayed notifications are being sent.
Returns
Boolean value telling whether imdn displayed notifications are being sent.
Tell whether is_composing notifications are being sent.
Returns
Boolean value telling whether is_composing notifications are being sent.
Object representing an informational message sent or received by the core.
Object that represents a Linphone Ldap.
Use a LdapParams
object to configure it.
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.
Create a new Ldap
, associate it with the LdapParams
and store it into the
configuration file.
Parameters
- lc: The
Core
object. - params: The
LdapParams
object.
Returns
The newly created
Ldap
object.
Object that is used to set the different parameters of a Ldap
.
Get the authentification method.
Check LdapAuthMethod
for authentification values.
Returns
The
LdapAuthMethod
.
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.
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.
Get the search is based on this filter to search contacts.
Returns
The filter to use.
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.
Get the minimum characters needed for doing a search on LDAP servers.
Returns
The minimum characters needed by a search.
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.
Get the password to pass to server when binding.
Returns
The password to pass to server when binding.
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.
Return whether the tls server certificate must be verified when connecting to a LDAP server.
Returns
The TLS verification mode from
LdapCertVerificationMode
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.
Get the domain to the sip address(sip:username@domain).
Returns
The SIP domain for the friend.
Get the timeout for TLS connection in milliseconds.
Returns
The timeout in milliseconds.
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.
Check parameters and return what are wrong.
Returns
The
LdapCheck
values. LinphoneLdapCheckOk if everything is ok.
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.
Returns the current callbacks being called while iterating on callbacks.
Returns
A pointer to the current
LoggingServiceListener
object
Get the domain where application logs are written (for example with
LoggingService.message
).
Returns
The domain where application logs are written.
Adds a listener to this LoggingService
object
Parameters
- listener: The
LoggingServiceListener
object to add
Removes a listener from this this LoggingService
object
Parameters
- listener: The
LoggingServiceListener
object to remove
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.
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
- level: the
LogLevel
to set
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.
Write a LinphoneLogLevelDebug message to the logs.
Parameters
- message: The log message.
Write a LinphoneLogLevelError message to the logs.
Parameters
- message: The log message.
Write a LinphoneLogLevelFatal message to the logs.
Parameters
- message: The log message.
Write a LinphoneLogLevelMessage message to the logs.
Parameters
- message: The log message.
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.
A MagicSearch
is used to do specifics searchs.
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.
Get the delimiter used for the search.
Returns
the delimiter used to find matched filter word
Returns whether or not the search is limited or not.
If not limited, the MagicSearch.search_limit
won't be applied.
Returns
True if the search is limited, False otherwise
Get the maximum value used to calculate the weight in search.
Returns
the maximum value used to calculate the weight in search
Get the minimum value used to calculate the weight in search.
Returns
the minimum value used to calculate the weight in search
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.
Returns whether the delimiter is being used for the search.
Returns
if the delimiter search is used
Adds a listener to this MagicSearch
object
Parameters
- listener: The
MagicSearchListener
object to add
Removes a listener from this this MagicSearch
object
Parameters
- listener: The
MagicSearchListener
object to remove
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 UseMagicSearch.contacts
instead..
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..
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 UseMagicSearch.contacts_list
instead..
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 UseMagicSearch.contacts_list_async
instead..
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
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
Object representing a Message Waiting Indication.
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.
Get the message waiting indication summary for a given context class.
Parameters
- contextClass: the
MessageWaitingIndicationContextClass
for which we want to get the summary.
Returns
The #MessageWaitingIndicationSummary for the given context class.
Object representing the summary for a context in a Message Waiting Indication.
Get the context class of the message waiting indication summary.
Returns
Policy to use to pass through NATs/firewalls.
Tell whether ICE is enabled.
Returns
Boolean value telling whether ICE is enabled.
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.
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.
Tell whether STUN is enabled.
Returns
Boolean value telling whether STUN is enabled.
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.
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.
Tells whether TCP TURN transport is enabled. Used when TURN is enabled.
Returns
Boolean value telling whether TCP TURN transport is enabled.
Tells whether TLS TURN transport is enabled. Used when TURN is enabled.
Returns
Boolean value telling whether TLS TURN transport is enabled.
Tell whether TURN is enabled.
Returns
Boolean value telling whether TURN is enabled.
Tells whether UDP TURN transport is enabled. Used when TURN is enabled.
Returns
Boolean value telling whether UDP TURN transport is enabled.
Tell whether uPnP is enabled.
Returns
Boolean value telling whether uPnP is enabled.
Identifies a member of a Conference
or ChatRoom
.
A participant is identified by it's SIP address. It can have many
ParticipantDevice
.
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
Gets the list of devices from a chat room's participant.
Returns
List of devices.
Tells whether a conference participant is an administrator of the conference.
Returns
A boolean value telling whether the participant is an administrator
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
Find a device in the list of devices from a chat room's participant.
Parameters
- address: A
Address
object
Returns
a
ParticipantDevice
or None if not found.
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
.
Gets the current LinphoneParticipantDeviceCbs.
Returns
The LinphoneParticipantDeviceCbs that has called the last callback.
Return whether the participant device is in a conference or not.
Returns
a boolean to state whether the device is in a conference
Return whether the participant device is muted or not.
Returns
True if the participant device is muted, False otherwise.
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
Return whether the participant device is screen sharing or not.
Returns
True if the participant device is screen sharing, False otherwise.
Get the thumbnail stream SSRC of the device.
Returns
the thumbnail stream's SSRC of the device
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
Get the thumbnail stream capability of the device.
Returns
the capability of the thumbnail stream of the device
MediaDirection
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
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
Adds a listener to this ParticipantDevice
object
Parameters
- listener: The
ParticipantDeviceListener
object to add
Removes a listener from this this ParticipantDevice
object
Parameters
- listener: The
ParticipantDeviceListener
object to remove
Create a window ID and return it.
Returns
the window ID of the device
Get the stream SSRC of the device.
Parameters
- stream_type: A
StreamType
Returns
the stream's SSRC of the device
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
- stream_type: A
StreamType
Returns
True if the stream of type stream_type is available for device, False otherwise
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
- stream_type: A
StreamType
Returns
the capability of stream of type stream_type of the device
MediaDirection
This object is only used on server side for ChatRoom
with
ChatRoomBackend.FlexisipChat
backend.
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
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.
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
Object defining all information related to a participant.
Get the role of the object ParticipantInfo
.
Returns
the
ParticipantRole
of theParticipantInfo
object.
Set the a custom parameter to object ParticipantInfo
.
Parameters
- name: the name of the parameter.
- value: the value of the parameter.
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.
Find whether a ParticipantInfo
has a parameter.
Parameters
- name: the name of the parameter.
Returns
True if the parameter is present, False otherwise
Find the value of a custom parameter of the object ParticipantInfo
.
Parameters
- name: the name of the parameter.
Object representing an RTP payload type.
Return a string describing a payload type.
The format of the string is
Returns
The description of the payload type.
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.
Check whether the payload is usable according the bandwidth targets set in the core.
Returns
True if the payload type is usable.
Tells whether the specified payload type represents a variable bitrate codec.
Returns
True if the payload type represents a VBR codec, False instead.
Get the normal bitrate in bits/s.
Returns
The normal bitrate in bits/s or -1 if an error has occured.
Returns the payload type number assigned for this codec.
Returns
The number of the payload type.
Get the format parameters for incoming streams.
Returns
The format parameters as string.
Get the format parameters for outgoing streams.
Returns
The format parameters as string.
Get the type of a payload type.
Returns
The type of the payload e.g. PAYLOAD_AUDIO_CONTINUOUS or PAYLOAD_VIDEO.
Instantiates a new payload type with values from source.
Returns
The newly created
PayloadType
object.
Enable/disable a payload type.
Parameters
- enabled: Set True for enabling and False for disabling.
Returns
0 for success, -1 for failure.
Check whether a palyoad type is enabled.
Returns
True if enabled, False if disabled.
Compare two payload types, and returns true if they are equal. Parameters (fmtp strings) are not compared, hence the name 'weak equals'.
Parameters
- other_payload_type: another
PayloadType
object
Returns
True if the payload types are "almost" equals.
Player interface.
Get the current position in the opened file.
Returns
The current position in the opened file
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
Get the volume gain of the player.
Returns
Percentage of the gain. Valid values are in [ 0.0 : 1.0 ].
Removes a listener from this this Player
object
Parameters
- listener: The
PlayerListener
object to remove
Sets a window id to be used to display video if any.
Parameters
- window_id: The window id pointer to use.
Create a window id to be used to display video if any.
Returns
window_id The window id pointer to use.
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
Pause the playing of a file.
Returns
0 on success, a negative value otherwise
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.
Start playing a file that has been opened with Player.open
.
Returns
0 on success, a negative value otherwise
Presence activity type holding information about a presence activity.
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.
Presence model type holding information about the presence of a person.
Gets the first activity of a presence model (there is usually only one).
Returns
A
PresenceActivity
object if successful, None otherwise.
Gets the basic status of a presence model.
Returns
The
PresenceBasicStatus
of thePresenceModel
object given as parameter.
Get the consolidated presence from a presence model.
Returns
The
ConsolidatedPresence
corresponding to the presence model
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().
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).
Gets the number of activities included in the presence model.
Returns
The number of activities included in the
PresenceModel
object.
Gets the number of persons included in the presence model.
Returns
The number of persons included in the
PresenceModel
object.
Gets the number of services included in the presence model.
Returns
The number of services included in the
PresenceModel
object.
Gets the presentity of a presence model.
Returns
A pointer to a const
Address
, or None if no contact is found.
Gets the timestamp of a presence model.
Returns
The timestamp of the
PresenceModel
object or -1 on error.
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.
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.
seealsoPresenceModel.new_with_activity
,.
PresenceModel.new_with_activity_and_note
The created presence model has the activity and the note specified in the
parameters.
Adds an activity to a presence model.
Parameters
- activity: The
PresenceActivity
object to add to the model.
Returns
0 if successful, a value < 0 in case of error.
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.
Adds a person to a presence model.
Parameters
- person: The
PresencePerson
object to add to the model.
Returns
0 if successful, a value < 0 in case of error.
Adds a service to a presence model.
Parameters
- service: The
PresenceService
object to add to the model.
Returns
0 if successful, a value < 0 in case of error.
Clears the activities of a presence model.
Returns
0 if successful, a value < 0 in case of error.
Clears all the notes of a presence model.
Returns
0 if successful, a value < 0 in case of error.
Clears the persons of a presence model.
Returns
0 if successful, a value < 0 in case of error.
Clears the services of a presence model.
Returns
0 if successful, a value < 0 in case of error.
Returns the version of the capability of a PresenceModel
.
Parameters
- capability: The
FriendCapability
to test.
Returns
the version of the capability of a
PresenceModel
or -1.0 if the model has not the capability.
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.
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.
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.
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.
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.
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.
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.
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
andPresenceModel.add_activity
.
Presence note type holding information about a presence note.
Presence person holding information about a presence person.
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().
Gets the number of activities included in the presence person.
Returns
The number of activities included in the
PresencePerson
object.
Gets the number of activities notes included in the presence person.
Returns
The number of activities notes included in the
PresencePerson
object.
Gets the number of notes included in the presence person.
Returns
The number of notes included in the
PresencePerson
object.
Adds an activities note to a presence person.
Parameters
- note: The
PresenceNote
object to add to the person.
Returns
0 if successful, a value < 0 in case of error.
Adds an activity to a presence person.
Parameters
- activity: The
PresenceActivity
object to add to the person.
Returns
0 if successful, a value < 0 in case of error.
Adds a note to a presence person.
Parameters
- note: The
PresenceNote
object to add to the person.
Returns
0 if successful, a value < 0 in case of error.
Clears the activities of a presence person.
Returns
0 if successful, a value < 0 in case of error.
Clears the activities notes of a presence person.
Returns
0 if successful, a value < 0 in case of error.
Clears the notes of a presence person.
Returns
0 if successful, a value < 0 in case of error.
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.
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.
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.
Presence service type holding information about a presence service.
Gets the basic status of a presence service.
Returns
The
PresenceBasicStatus
of thePresenceService
object given as parameter.
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().
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().
Gets the number of notes included in the presence service.
Returns
The number of notes included in the
PresenceService
object.
Gets the service descriptions of a presence service.
Returns
A containing the services descriptions.
The returned string is to be freed.
Adds a note to a presence service.
Parameters
- note: The
PresenceNote
object to add to the service.
Returns
0 if successful, a value < 0 in case of error.
Clears the notes of a presence service.
Returns
0 if successful, a value < 0 in case of error.
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.
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.
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.
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), orAVPFMode.Disabled
(disabled). Deprecated since version 06/04/2020 UseAccount
object instead.
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.
Get the conference factory uri.
Returns
The uri of the conference factory.
Deprecated since version 06/04/2020 UseAccount
object instead.
Returns the contact parameters.
Returns
previously set contact parameters.
Deprecated since version 06/04/2020 UseAccount
object instead.
Returns the contact URI parameters.
Returns
previously set contact URI parameters.
Deprecated since version 06/04/2020 UseAccount
object instead.
Get the Core
object to which is associated the ProxyConfig
.
Returns
The
Core
object to which is associated theProxyConfig
.
Deprecated since version 06/04/2020 UseAccount
object instead.
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 UseAccount
object instead.
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 UseAccount
object instead.
Gets the prefix set for this proxy config.
Returns
dialing prefix.
Deprecated since version 06/04/2020 UseAccount
object instead.
Get the domain name of the given proxy config.
Returns
The domain name of the proxy config.
Deprecated since version 06/04/2020 UseAccount
object instead.
Gets the proxy config expires.
Returns
the duration of registration. Deprecated since version 06/04/2020 Use
Account
object instead.
Gets the identity addres of the proxy config.
Returns
the SIP identity that belongs to this proxy configuration.
Deprecated since version 06/04/2020 UseAccount
object instead.
Get the idkey property of a ProxyConfig
.
Returns
The idkey string, or None.
Deprecated since version 06/04/2020 UseAccount
object instead.
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.
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.
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.
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.
seealsoCore.nat_policy
.
Deprecated since version 06/04/2020 Use Account
object instead.
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.
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.
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.
Retrieves the push notification configuration.
Returns
The
PushNotificationConfig
.
Deprecated since version 06/04/2020 UseAccount
object instead.
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 UseAccount
object instead.
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.
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.
Get the realm of the given proxy config.
Returns
The realm of the proxy config.
Deprecated since version 06/04/2020 UseAccount
object instead.
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 UseAccount
object instead.
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.
Gets the list of the routes set for this proxy config.
Returns
The list of routes as string.
Deprecated since version 06/04/2020 UseAccount
object instead.
Gets the proxy config proxy address.
Returns
the proxy's SIP address.
Deprecated since version 06/04/2020 UseAccount
object instead.
Get the registration state of the given proxy config.
Returns
The
RegistrationState
of the proxy config. Deprecated since version 06/04/2020 UseAccount
object instead.
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 UseAccount
object instead.
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.
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.
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.
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.
Commits modification made to the proxy configuration.
Returns
0 if successful, -1 otherwise Deprecated since version 06/04/2020 Use
Account
object instead.
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.
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 UseAccount
object instead.
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 UseAccount
object instead.
Normalize a human readable sip uri into a fully qualified LinphoneAddress.
A sip address should look like DisplayName
Parameters
- username: the string to parse
Returns
None if invalid input, normalized sip address otherwise.
Deprecated since version 06/04/2020 UseAccount
object instead.
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.
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.
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 UseAccount
object instead.
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.
Gets the app's bundle identifier for "contact uri parameter".
Returns
The app's bundle identifier if set, None otherwise.
Gets the call_snd for "contact uri parameter".
Returns
The call_snd, default value "notes_of_the_optimistic.caf".
Gets the call_str for "contact uri parameter".
Returns
The call_str, default value "IC_MSG".
Gets the groupchat_str for "contact uri parameter".
Returns
The groupchat_str, default value "GC_MSG".
Gets the msg_snd for "contact uri parameter".
Returns
The msg_snd, default value "msg.caf".
Gets the msg_str for "contact uri parameter".
Returns
The msg_str, default value "IM_MSG".
Gets the param for "contact uri parameter".
Returns
The param if set, None otherwise.
Gets the prid for "contact uri parameter".
Returns
The prid if set, None otherwise.
Gets the provider for "contact uri parameter".
Returns
The provider if set, None otherwise.
Gets the remote token for "contact uri parameter".
Returns
The remote token if set, None otherwise.
Gets the team id for "contact uri parameter".
Returns
The team id if set, None otherwise.
Gets the voip token for "contact uri parameter".
Returns
The voip token if set, None otherwise.
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.
Instantiate a new push notification parameters with values from source.
Returns
The newly created
PushNotificationConfig
object.
Checks if two Push Notification Configurations are identical.
Parameters
- other_config: The
PushNotificationConfig
object to compare to.
Returns
True only if the two configurations are identical.
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.
Tells whether or not this message contains a conference invitation cancellation.
Returns
True if this message carries a conference invitation cancellation, False otherwise.
Tells whether or not this message contains a new conference invitation.
Returns
True if this message carries a new conference invitation, False otherwise.
Tells whether or not this message contains a conference invitation update.
Returns
True if this message carries a conference invitation update, False otherwise.
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.
Structure describing a range of integers.
Object used to record the audio or video of a call.
Gets the duration of the recording.
Returns
the duration of the recording, in milliseconds.
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.
Object containing various parameters of a Recorder
.
The LinphoneSearchResult object represents a result of a search.
Returns the capabilities mask of the search result.
Returns
the capabilities mask associated to the search result
Gets the phone number of the search result if any.
Returns
The associed phone number or None.
Returns whether or not the search result has the given capability.
Parameters
- capability: the
FriendCapability
to check
Returns
True if it has the capability, False otherwise.
Object to get signal (wifi/4G etc...) informations.
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.
Linphone tunnel object.
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.
Get the dual tunnel client mode.
Returns
True if dual tunnel client mode is enabled, False otherwise
Check whether tunnel is set to transport SIP packets.
Returns
A boolean value telling whether SIP packets shall pass through the tunnel
Remove all tunnel server addresses previously entered with Tunnel.add_server
Check whether the tunnel is connected.
Returns
A boolean value telling if the tunnel is connected
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.
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.
Tunnel settings.
Get the UDP packet round trip delay in ms for a tunnel configuration.
Returns
The UDP packet round trip delay in ms.
Get the IP address or hostname of the tunnel server.
Returns
The tunnel server IP address or hostname.
Get the IP address or hostname of the second tunnel server when using dual tunnel client.
Returns
The tunnel server IP address or hostname.
Object storing contact information using vCard 4.0 format.
Gets the eTag of the vCard.
Returns
the eTag of the vCard in the CardDAV server, otherwise 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
Returns the FN attribute of the vCard, or None if it isn't set yet.
Returns
the display name of the vCard, or 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
Gets the Organization of the vCard.
Returns
the Organization of the vCard or None.
Returns the list of phone numbers in the vCard (all the TEL attributes) or None.
Returns
The phone numbers as string.
Returns the list of phone numbers in the vCard (all the TEL attributes) or None.
Returns
The phone numbers as
FriendPhoneNumber
.
Returns the first PHOTO property or None.
Returns
The picture URI as string or None if none has been set.
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.
Gets the URL of the vCard.
Returns
the URL of the vCard in the CardDAV server, otherwise None.
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
Adds a phone number in the vCard, using the TEL property.
Parameters
- phone: the phone number to add
Adds a FriendPhoneNumber
in the vCard, using the TEL property.
Parameters
- phoneNumber: the
FriendPhoneNumber
to add
Adds a SIP address in the vCard, using the IMPP property.
Parameters
- sip_address: the SIP address to add
Returns the vCard4 representation of the LinphoneVcard.
Returns
a const char * that represents the vCard.
Edits the preferred SIP address in the vCard (or the first one), using the IMPP property.
Parameters
- sip_address: the new SIP address
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)
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.
Remove all the extend properties per property name.
Parameters
- name: the name to remove the extended properties on.
Removes a phone number in the vCard (if it exists), using the TEL property.
Parameters
- phone: the phone number to remove
Removes a FriendPhoneNumber
in the vCard (if it exists), using the TEL
property.
Parameters
- phoneNumber: the
FriendPhoneNumber
to remove
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.
Gets the value for the automatically accept video policy.
Returns
whether or not to automatically accept video requests is enabled
Gets the value for the automatically accept video policy.
Returns
the
MediaDirection
that will be set for video stream when automatically accepted.
Gets the value for the automatically initiate video policy.
Returns
whether or not to automatically initiate video calls is enabled
Instantiates a new VideoActivationPolicy
object with same values as the
source.
Returns
the newly created
VideoActivationPolicy
object
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.
Tells whether a VideoDefinition
is undefined.
Returns
A boolean value telling whether the
VideoDefinition
is undefined.
Tells whether two VideoDefinition
objects are equal (the widths and the
heights are the same but can be switched).
Parameters
- video_definition2:
VideoDefinition
object
Returns
A boolean value telling whether the two
VideoDefinition
objects are equal.
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
Tells whether two VideoDefinition
objects are strictly equal (the widths are
the same and the heights are the same).
Parameters
- video_definition2:
VideoDefinition
object
Returns
A boolean value telling whether the two
VideoDefinition
objects are strictly equal.
Object that is used to describe a video source.
Gets the call of a VideoSourceDescriptor
.
Returns
The
Call
of the video source descriptor if it's type is LinphoneVideoSourceCall, None otherwise.
Gets the camera id of a VideoSourceDescriptor
.
Returns
The camera id of the video source descriptor if it's type is LinphoneVideoSourceCamera, None otherwise.
Gets the image path of a VideoSourceDescriptor
.
Returns
The image path of the video source descriptor if it's type is LinphoneVideoSourceImage, None otherwise.
Gets the screen sharing description of a VideoSourceDescriptor
.
Returns
The native screen sharing description
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.
Instantiate a new video source descriptor with values from source.
Returns
The newly created
VideoSourceDescriptor
object.
Sets the source of a VideoSourceDescriptor
as screen sharing.
native_data depends of the type and the current platform:
Parameters
- _type: The
VideoSourceScreenSharingType
type of native_data. - native_data: The screen handle that will be used as a video source.
The XmlRpcRequest
object representing a XML-RPC request to be sent.
Get the content of the XML-RPC request.
Returns
The string representation of the content of the XML-RPC request.
Get the current XmlRpcRequestListener
object associated with a
LinphoneXmlRpcRequest.
Returns
The current
XmlRpcRequestListener
object associated with the LinphoneXmlRpcRequest.
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.
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.
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.
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.
Adds a listener to this XmlRpcRequest
object
Parameters
- listener: The
XmlRpcRequestListener
object to add
Removes a listener from this this XmlRpcRequest
object
Parameters
- listener: The
XmlRpcRequestListener
object to remove
The XmlRpcSession
object used to send XML-RPC requests and handle their
responses.
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