2. API reference¶
2.1. Enums¶
2.1.1. linphone.AVPFMode¶
Enum describing RTP AVPF activation modes.
Value | Description |
---|---|
Default | Use default value defined at upper level |
Disabled | AVPF is disabled |
Enabled | AVPF is enabled |
2.1.2. linphone.AccountCreatorStatus¶
Enum describing the status of a LinphoneAccountCreator operation.
Value | Description |
---|---|
Ok | |
Failed | |
EmailInvalid | |
UsernameInvalid | |
UsernameTooShort | |
UsernameInvalidSize | |
PasswordTooShort | |
DomainInvalid | |
RouteInvalid | |
DisplayNameInvalid | |
TransportNotSupported |
2.1.4. linphone.CallDir¶
Enum representing the direction of a call.
Value | Description |
---|---|
Outgoing | outgoing calls |
Incoming | incoming calls |
2.1.5. linphone.CallState¶
LinphoneCallState enum represents the different state a call can reach into. The application is notified of state changes through the LinphoneCoreVTable::call_state_changed callback.
Value | Description |
---|---|
Idle | Initial call state |
IncomingReceived | This is a new incoming call |
OutgoingInit | An outgoing call is started |
OutgoingProgress | An outgoing call is in progress |
OutgoingRinging | An outgoing call is ringing at remote end |
OutgoingEarlyMedia | An outgoing call is proposed early media |
Connected | Connected, the call is answered |
StreamsRunning | The media streams are established and running |
Pausing | The call is pausing at the initiative of local end |
Paused | The call is paused, remote end has accepted the pause |
Resuming | The call is being resumed by local end |
Refered | The call is being transfered to another party, resulting in a new outgoing call to follow immediately |
Error | The call encountered an error |
End | The call ended normally |
PausedByRemote | The call is paused by remote end |
UpdatedByRemote | The call’s parameters change is requested by remote end, used for example when video is added by remote |
IncomingEarlyMedia | We are proposing early media to an incoming call |
Updating | A call update has been initiated by us |
Released | The call object is no more retained by the core |
EarlyUpdatedByRemote | |
EarlyUpdating |
2.1.6. linphone.CallStatus¶
Enum representing the status of a call
Value | Description |
---|---|
Success | The call was sucessful |
Aborted | The call was aborted |
Missed | The call was missed (unanswered) |
Declined | The call was declined, either locally or by remote end |
2.1.7. linphone.ChatMessageState¶
LinphoneChatMessageState is used to notify if messages have been succesfully delivered or not.
Value | Description |
---|---|
Idle | Initial state |
InProgress | Delivery in progress |
Delivered | Message successfully delivered and acknowledged by remote end point |
NotDelivered | Message was not delivered |
FileTransferError | Message was received(and acknowledged) but cannot get file from server |
FileTransferDone | File transfer has been completed successfully. |
2.1.8. linphone.ConfiguringState¶
LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed
Value | Description |
---|---|
Successful | |
Failed | |
Skipped |
2.1.9. linphone.CoreLogCollectionUploadState¶
LinphoneCoreLogCollectionUploadState is used to notify if log collection upload have been succesfully delivered or not.
Value | Description |
---|---|
InProgress | Delivery in progress |
Delivered | Log collection upload successfully delivered and acknowledged by remote end point |
NotDelivered | Log collection upload was not delivered |
2.1.10. linphone.FirewallPolicy¶
Policy to use to pass through firewalls.
Value | Description |
---|---|
PolicyNoFirewall | Do not use any mechanism to pass through firewalls |
PolicyUseNatAddress | Use the specified public adress |
PolicyUseStun | Use a STUN server to get the public address |
PolicyUseIce | Use the ICE protocol |
PolicyUseUpnp | Use the uPnP protocol |
2.1.11. linphone.GlobalState¶
LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed
Value | Description |
---|---|
Off | |
Startup | |
On | |
Shutdown | |
Configuring |
2.1.12. linphone.IceState¶
Enum describing ICE states.
Value | Description |
---|---|
NotActivated | ICE has not been activated for this call or stream |
Failed | ICE processing has failed |
InProgress | ICE process is in progress |
HostConnection | ICE has established a direct connection to the remote host |
ReflexiveConnection | ICE has established a connection to the remote host through one or several NATs |
RelayConnection | ICE has established a connection through a relay |
2.1.13. linphone.MediaDirection¶
Indicates for a given media the stream direction
Value | Description |
---|---|
Invalid | |
Inactive | |
SendOnly | No active media not supported yet |
RecvOnly | Send only mode |
SendRecv | recv only mode |
2.1.14. linphone.MediaEncryption¶
Enum describing type of media encryption types.
Value | Description |
---|---|
None | No media encryption is used |
SRTP | Use SRTP media encryption |
ZRTP | Use ZRTP media encryption |
DTLS | Use DTLS media encryption |
2.1.15. linphone.PayloadTypeType¶
Type of linphone.PayloadType
.
Value | Description |
---|---|
AudioContinuous | |
AudioPacketized | |
Video | |
Text | |
Other |
2.1.16. linphone.PresenceActivityType¶
Activities as defined in section 3.2 of RFC 4480
Value | Description |
---|---|
Offline | This value is not defined in the RFC, it corresponds to no activity with a basic status of closed. |
Online | This value is not defined in the RFC, it corresponds to no activity with a basic status of open. |
Appointment | The person has a calendar appointment, without specifying exactly of what type. This activity is indicated if more detailed information is not available or the person chooses not to reveal more information. |
Away | The person is physically away from all interactive communication devices. |
Breakfast | The person is eating the first meal of the day, usually eaten in the morning. |
Busy | The person is busy, without further details. |
Dinner | The person is having his or her main meal of the day, eaten in the evening or at midday. |
Holiday | This is a scheduled national or local holiday. |
InTransit | The person is riding in a vehicle, such as a car, but not steering. |
LookingForWork | The person is looking for (paid) work. |
Lunch | The person is eating his or her midday meal. |
Meal | The person is scheduled for a meal, without specifying whether it is breakfast, lunch, or dinner, or some other meal. |
Meeting | The person is in an assembly or gathering of people, as for a business, social, or religious purpose. A meeting is a sub-class of an appointment. |
OnThePhone | The person is talking on the telephone. |
Other | The person is engaged in an activity with no defined representation. A string describing the activity in plain text SHOULD be provided. |
Performance | A performance is a sub-class of an appointment and includes musical, theatrical, and cinematic performances as well as lectures. It is distinguished from a meeting by the fact that the person may either be lecturing or be in the audience, with a potentially large number of other people, making interruptions particularly noticeable. |
PermanentAbsence | The person will not return for the foreseeable future, e.g., because it is no longer working for the company. |
Playing | The person is occupying himself or herself in amusement, sport, or other recreation. |
Presentation | The person is giving a presentation, lecture, or participating in a formal round-table discussion. |
Shopping | The person is visiting stores in search of goods or services. |
Sleeping | The person is sleeping. |
Spectator | The person is observing an event, such as a sports event. |
Steering | The person is controlling a vehicle, watercraft, or plane. |
Travel | The person is on a business or personal trip, but not necessarily in-transit. |
TV | The person is watching television. |
Unknown | The activity of the person is unknown. |
Vacation | A period of time devoted to pleasure, rest, or relaxation. |
Working | The person is engaged in, typically paid, labor, as part of a profession or job. |
Worship | The person is participating in religious rites. |
2.1.17. linphone.PresenceBasicStatus¶
Basic status as defined in section 4.1.4 of RFC 3863
Value | Description |
---|---|
Open | This value means that the associated contact element, if any, is ready to accept communication. |
Closed | This value means that the associated contact element, if any, is unable to accept communication. |
2.1.18. linphone.Privacy¶
Defines privacy policy to apply as described by rfc3323
Value | Description |
---|---|
None | Privacy services must not perform any privacy function |
User | Request that privacy services provide a user-level privacy function. With this mode, from header is hidden, usually replaced by From: Anonymous <sip:n> |
Header | Request that privacy services modify headers that cannot be set arbitrarily by the user (Contact/Via). |
Session | Request that privacy services provide privacy for session media |
Id | rfc3325 The presence of this privacy type in a Privacy header field indicates that the user would like the Network Asserted Identity to be kept private with respect to SIP entities outside the Trust Domain with which the user authenticated. Note that a user requesting multiple types of privacy MUST include all of the requested privacy types in its Privacy header field value |
Critical | Privacy service must perform the specified services or fail the request |
Default | Special keyword to use privacy as defined either globally or by proxy using linphone_proxy_config_set_privacy() |
2.1.19. linphone.PublishState¶
Enum for publish states.
Value | Description |
---|---|
None | Initial state, do not use |
Progress | An outgoing publish was created and submitted |
Ok | Publish is accepted. |
Error | Publish encoutered an error, linphone_event_get_reason() gives reason code |
Expiring | Publish is about to expire, only sent if [sip]->refresh_generic_publish property is set to 0. |
Cleared | Event has been un published |
2.1.20. linphone.Reason¶
Enum describing various failure reasons or contextual information for some events.
Value | Description |
---|---|
None | |
NoResponse | No response received from remote |
Forbidden | Authentication failed due to bad credentials or resource forbidden |
Declined | The call has been declined |
NotFound | Destination of the call was not found. |
NotAnswered | The call was not answered in time (request timeout) |
Busy | Phone line was busy |
UnsupportedContent | Unsupported content |
IOError | Transport error: connection failures, disconnections etc... |
DoNotDisturb | Do not disturb reason |
Unauthorized | Operation is unauthorized because missing credential |
NotAcceptable | Operation like call update rejected by peer |
NoMatch | Operation could not be executed by server or remote client because it didn’t have any context for it |
MovedPermanently | Resource moved permanently |
Gone | Resource no longer exists |
TemporarilyUnavailable | Temporarily unavailable |
AddressIncomplete | Address incomplete |
NotImplemented | Not implemented |
BadGateway | Bad gateway |
ServerTimeout | Server timeout |
Unknown | Unknown reason |
2.1.21. linphone.RegistrationState¶
LinphoneRegistrationState describes proxy registration states.
Value | Description |
---|---|
None | Initial state for registrations |
Progress | Registration is in progress |
Ok | Registration is successful |
Cleared | Unregistration succeeded |
Failed | Registration failed |
2.1.22. linphone.StreamType¶
Enum describing the stream types.
Value | Description |
---|---|
Audio | |
Video | |
Text | |
Unknown |
2.1.23. linphone.SubscribePolicy¶
Enum controlling behavior for incoming subscription request.nUse by linphone_friend_set_inc_subscribe_policy()
Value | Description |
---|---|
SPWait | Does not automatically accept an incoming subscription request. This policy implies that a decision has to be taken for each incoming subscription request notified by callback LinphoneCoreVTable.new_subscription_requested |
SPDeny | Rejects incoming subscription request. |
SPAccept | Automatically accepts a subscription request. |
2.1.24. linphone.SubscriptionDir¶
Enum for subscription direction (incoming or outgoing).
Value | Description |
---|---|
Incoming | Incoming subscription. |
Outgoing | Outgoing subscription. |
InvalidDir | Invalid subscription direction. |
2.1.25. linphone.SubscriptionState¶
Enum for subscription states.
Value | Description |
---|---|
None | Initial state, should not be used. |
OutgoingProgress | An outgoing subcription was sent |
IncomingReceived | An incoming subcription is received |
Pending | Subscription is pending, waiting for user approval |
Active | Subscription is accepted. |
Terminated | Subscription is terminated normally |
Error | Subscription encountered an error, indicated by linphone_event_get_reason() |
Expiring | Subscription is about to expire, only sent if [sip]->refresh_generic_subscribe property is set to 0. |
2.1.26. linphone.TransportType¶
Enum describing transport type for LinphoneAddress.
Value | Description |
---|---|
Udp | |
Tcp | |
Tls | |
Dtls |
2.1.27. linphone.TunnelMode¶
Enum describing the tunnel modes.
Value | Description |
---|---|
Disable | The tunnel is disabled. |
Enable | The tunnel is enabled. |
Auto | The tunnel is enabled automatically if it is required. |
2.1.28. linphone.UpnpState¶
Enum describing uPnP states.
Value | Description |
---|---|
Idle | uPnP is not activate |
Pending | uPnP process is in progress |
Adding | Internal use: Only used by port binding |
Removing | Internal use: Only used by port binding |
NotAvailable | uPnP is not available |
Ok | uPnP is enabled |
Ko | uPnP processing has failed |
Blacklisted | IGD router is blacklisted |
2.1.29. linphone.XmlRpcArgType¶
Enum describing the types of argument for LinphoneXmlRpcRequest.
Value | Description |
---|---|
None | |
Int | |
String |
2.1.30. linphone.XmlRpcStatus¶
Enum describing the status of a LinphoneXmlRpcRequest.
Value | Description |
---|---|
Pending | |
Ok | |
Failed |
2.2. Classes¶
-
class
linphone.
AccountCreator
¶ The LinphoneAccountCreator object used to create an account on a server via XML-RPC.
-
callbacks
¶ [linphone.AccountCreatorCbs] Get the LinphoneAccountCreatorCbs object associated with a LinphoneAccountCreator.
-
configure
()¶ Configure an account (create a proxy config and authentication info for it).
Returns: A LinphoneProxyConfig object if successful, None otherwise Return type: linphone.ProxyConfig
-
create_account
()¶ Send an XML-RPC request to create a Linphone account.
Returns: LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorFailed otherwise Return type: int
-
display_name
¶ [string] Set the email.
-
domain
¶ [string] Set the domain.
-
email
¶ [string] Set the email.
-
new
()¶ Create a LinphoneAccountCreator.
Parameters: - core (linphone.Core) – The LinphoneCore used for the XML-RPC communication
- xmlrpc_url (string) – The URL to the XML-RPC server. Must be NON None.
Returns: The new LinphoneAccountCreator object
Return type:
[bool] Enable the newsletter subscription.
-
password
¶ [string] Set the password.
-
route
¶ [string] Set the route.
-
test_existence
()¶ Send an XML-RPC request to test the existence of a Linphone account.
Returns: LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorFailed otherwise Return type: int
-
test_validation
()¶ Send an XML-RPC request to test the validation of a Linphone account.
Returns: LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorFailed otherwise Return type: int
-
transport
¶ [int] Set the transport.
-
user_data
¶ A place to store some user data.
-
username
¶ [string] Set the username.
-
-
class
linphone.
AccountCreatorCbs
¶ An object to handle the callbacks for handling the LinphoneAccountCreator operations.
-
create_account
¶ [callable] Set the create account callback.
-
existence_tested
¶ [callable] Set the existence tested callback.
-
user_data
¶ A place to store some user data.
-
validation_tested
¶ [callable] Set the validation tested callback.
-
-
class
linphone.
Address
¶ Object that represents a SIP address.
The LinphoneAddress is an opaque object to represents SIP addresses, ie the content of SIP’s ‘from’ and ‘to’ headers. A SIP address is made of display name, username, domain name, port, and various uri headers (such as tags). It looks like ‘Alice <sip: >’. The LinphoneAddress has methods to extract and manipulate all parts of the address. When some part of the address (for example the username) is empty, the accessor methods return None.
-
as_string
()¶ Returns the address as a string. The returned char * must be freed by the application. Use ms_free().
Returns: Return type: string
-
as_string_uri_only
()¶ 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: Return type: string
-
clean
()¶ Removes address’s tags and uri headers so that it is displayable to the user.
-
clone
()¶ Clones a LinphoneAddress object.
Returns: Return type: linphone.Address
-
display_name
¶ [string] Sets the display name.
-
domain
¶ [string] Sets the domain.
-
equal
()¶ Compare two LinphoneAddress taking the tags and headers into account.
Parameters: a2 (linphone.Address) – LinphoneAddress object Returns: Boolean value telling if the LinphoneAddress objects are equal. Return type: bool
-
new
()¶ Constructs a LinphoneAddress object by parsing the user supplied address, given as a string.
Parameters: addr (string) – Returns: Return type: linphone.Address
-
password
¶ [string] Set the password encoded in the address. It is used for basic authentication (not recommended).
-
port
¶ [int] Sets the port number.
-
scheme
¶ [string] Returns the address scheme, normally sip.
-
secure
¶ [bool] Make the address refer to a secure location (sips scheme)
-
set_header
()¶ Set a header into the address. Headers appear in the URI with ‘?’, such as <sip: ?SomeHeader=SomeValue>.
Parameters: - header_name (string) – the header name
- header_value (string) – the header value
-
sip
¶ [bool] returns true if address is a routable sip address
-
transport
¶ [int] Set a transport.
-
user_data
¶ A place to store some user data.
-
username
¶ [string] Sets the username.
-
weak_equal
()¶ Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port.
Parameters: a2 (linphone.Address) – LinphoneAddress object Returns: Boolean value telling if the LinphoneAddress objects are equal. Return type: bool
-
-
class
linphone.
AuthInfo
¶ -
domain
¶ [string] Sets the domain for which this authentication is valid.
-
ha1
¶ [string] Sets the ha1.
-
new
()¶ Creates a #LinphoneAuthInfo object with supplied information. 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 (string) – The username that needs to be authenticated
- userid (string) – The userid used for authenticating (use None if you don’t know what it is)
- passwd (string) – The password in clear text
- ha1 (string) – The ha1-encrypted password if password is not given in clear text.
- realm (string) – The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don’t use this parameter.
- domain (string) – The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
Returns: A #LinphoneAuthInfo object. linphone_auth_info_destroy() must be used to destroy it when no longer needed. The LinphoneCore makes a copy of LinphoneAuthInfo passed through
linphone.Core.add_auth_info()
.Return type:
-
passwd
¶ [string] Sets the password.
-
realm
¶ [string] Sets the realm.
-
user_data
¶ A place to store some user data.
-
userid
¶ [string] Sets the userid.
-
username
¶ [string] Sets the username.
-
-
class
linphone.
Buffer
¶ The LinphoneContent object representing a data buffer.
-
content
¶ [ByteArray] Set the content of the data buffer.
-
empty
¶ [bool] Tell whether the LinphoneBuffer is empty.
-
new
()¶ Create a new empty LinphoneBuffer object.
Returns: A new LinphoneBuffer object. Return type: linphone.Buffer
-
new_from_data
()¶ Create a new LinphoneBuffer object from existing data.
Parameters: data (ByteArray) – The initial data to store in the LinphoneBuffer. Returns: A new LinphoneBuffer object. Return type: linphone.Buffer
-
new_from_string
()¶ Create a new LinphoneBuffer object from a string.
Parameters: data (string) – The initial string content of the LinphoneBuffer. Returns: A new LinphoneBuffer object. Return type: linphone.Buffer
-
size
¶ [int] Set the size of the content of the data buffer.
-
string_content
¶ [string] Set the string content of the data buffer.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
Call
¶ The LinphoneCall object represents a call issued or received by the LinphoneCore
-
audio_route
¶ [int] Change the playback output device (currently only used for blackberry)
-
audio_stats
¶ [linphone.CallStats] Access last known statistics for audio stream, for a given call.
-
authentication_token_verified
¶ [bool] Set the result of ZRTP short code verification by user. If remote party also does the same, it will update the ZRTP cache so that user’s verification will not be required for the two users.
-
average_quality
¶ [float] Returns call quality averaged over all the duration of the call.
See
linphone.Call.current_quality
for more details about quality measurement.
-
call_log
¶ [linphone.CallLog] Returns the call log associated to this call.
-
camera_enabled
¶ [bool] Indicate whether camera input should be sent to remote end.
-
core
¶ [linphone.Core] Get the core that has created the specified call.
-
current_params
¶ [linphone.CallParams] Returns current parameters associated to the call.
-
current_quality
¶ [float] Obtain real-time quality rating of the call
Based on local RTP statistics and RTCP feedback, a quality rating is computed and updated during all the duration of the call. This function returns its value at the time of the function call. It is expected that the rating is updated at least every 5 seconds or so. The rating is a floating point number comprised between 0 and 5.
4-5 = good quality 3-4 = average quality 2-3 = poor quality 1-2 = very poor quality 0-1 = can’t be worse, mostly unusable
-
dir
¶ [int] Returns direction of the call (incoming or outgoing).
-
duration
¶ [int] Returns call’s duration in seconds.
-
echo_cancellation_enabled
¶ [bool] Enables or disable echo cancellation for this call
-
echo_limiter_enabled
¶ [bool] Enables or disable echo limiter for this call
-
error_info
¶ [linphone.ErrorInfo] Returns full details about call errors or termination reasons.
-
has_transfer_pending
()¶ Returns true 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: Return type: bool
-
media_in_progress
()¶ Indicates whether an operation is in progress at the media side. It can 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. Return type: bool
-
microphone_volume_gain
¶ [float] Set microphone volume gain. If the sound backend supports it, the new gain will synchronized with the system mixer.
-
native_video_window_id
¶ [int] Set the native video window id where the video is to be displayed.
-
play_volume
¶ [float] Returns the measured sound volume played locally (received from remote). It is expressed in dbm0.
-
reason
¶ [int] Returns the reason for a call termination (either error or normal termination)
-
record_volume
¶ [float] Returns the measured sound volume recorded locally (sent to remote). It is expressed in dbm0.
-
refer_to
¶ [string] Returns the refer-to uri (if the call was transfered).
-
remote_address
¶ [linphone.Address] Returns the remote address associated to this call
-
remote_address_as_string
¶ [string] Returns the remote address associated to this call as a string.
The result string must be freed by user using ms_free().
-
remote_contact
¶ [string] Returns the far end’s sip contact as a string, if available.
-
remote_params
¶ [linphone.CallParams] 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.
-
remote_user_agent
¶ [string] Returns the far end’s user agent description string, if available.
-
replaced_call
¶ [linphone.Call] 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.
-
send_vfu_request
()¶ Request remote side to send us a Video Fast Update.
-
speaker_volume_gain
¶ [float] Set speaker volume gain. If the sound backend supports it, the new gain will synchronized with the system mixer.
-
start_recording
()¶ Start call recording. The output file where audio is recorded must be previously specified with
linphone.CallParams.record_file
.
-
state
¶ [int] Retrieves the call’s current state.
-
stop_recording
()¶ Stop call recording.
-
take_preview_snapshot
()¶ 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 (string) – a path where to write the jpeg content. Returns: 0 if successfull, -1 otherwise (typically if jpeg format is not supported). Return type: int
-
take_video_snapshot
()¶ 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 (string) – a path where to write the jpeg content. Returns: 0 if successfull, -1 otherwise (typically if jpeg format is not supported). Return type: int
-
text_stats
¶ [linphone.CallStats] Access last known statistics for video stream, for a given call.
-
transfer_target_call
¶ [linphone.Call] When this call has received a transfer request, returns the new call that was automatically created as a result of the transfer.
-
transferer_call
¶ [linphone.Call] Returns 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.
-
user_data
¶ A place to store some user data.
-
video_stats
¶ [linphone.CallStats] Access last known statistics for video stream, for a given call.
-
-
class
linphone.
CallLog
¶ Structure representing a call log.
-
call_id
¶ [string] Get the call ID used by the call.
-
dir
¶ [int] Get the direction of the call.
-
duration
¶ [int] Get the duration of the call since connected.
-
from_address
¶ [linphone.Address] Get the origin address (ie from) of the call.
-
quality
¶ [float] Get the overall quality indication of the call.
-
ref_key
¶ [string] Associate a persistent reference key 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.
-
remote_address
¶ [linphone.Address] Get the remote address (that is from or to depending on call direction).
-
start_date
¶ [DateTime] Get the start date of the call.
-
status
¶ [int] Get the status of the call.
-
to_address
¶ [linphone.Address] Get the destination address (ie to) of the call.
-
to_str
()¶ Get a human readable string describing the call.: the returned string must be freed by the application (use ms_free()).
Returns: A human readable string describing the call. Return type: string
-
user_data
¶ A place to store some user data.
-
video_enabled
¶ [bool] Tell whether video was enabled at the end of the call or not.
-
-
class
linphone.
CallParams
¶ The LinphoneCallParams is an object containing various call related parameters. It can be used to retrieve parameters from a currently running call or modify the call’s characteristics dynamically.
-
add_custom_header
()¶ Add a custom SIP header in the INVITE for a call.
Parameters: - header_name (string) – The name of the header to add.
- header_value (string) – The content of the header to add.
-
add_custom_sdp_attribute
()¶ Add a custom attribute related to all the streams in the SDP exchanged within SIP messages during a call.
Parameters: - attribute_name (string) – The name of the attribute to add.
- attribute_value (string) – The content value of the attribute to add.
-
add_custom_sdp_media_attribute
()¶ Add a custom attribute related to a specific stream in the SDP exchanged within SIP messages during a call.
Parameters: - type (int) – The type of the stream to add a custom SDP attribute to.
- attribute_name (string) – The name of the attribute to add.
- attribute_value (string) – The content value of the attribute to add.
-
audio_bandwidth_limit
¶ [int] Refine bandwidth settings for this call by setting a bandwidth limit for audio streams. As a consequence, codecs whose bitrates are not compatible with this limit won’t be used.
-
audio_direction
¶ [int] Set the audio stream direction.
-
audio_enabled
¶ [bool] Enable audio stream.
-
audio_multicast_enabled
¶ [bool] Use to enable multicast rtp for audio stream.
-
clear_custom_sdp_attributes
()¶ Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
-
clear_custom_sdp_media_attributes
()¶ Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.
Parameters: type (int) – The type of the stream to clear the custom SDP attributes from.
-
copy
()¶ Copy an existing LinphoneCallParams object to a new LinphoneCallParams object.
Returns: A copy of the LinphoneCallParams object. Return type: linphone.CallParams
-
early_media_sending_enabled
¶ [bool] Enable sending of real early media (during outgoing calls).
-
get_custom_header
()¶ Get a custom SIP header.
Parameters: header_name (string) – The name of the header to get. Returns: The content of the header or None if not found. Return type: string
-
get_custom_sdp_attribute
()¶ Get a custom SDP attribute that is related to all the streams.
Parameters: attribute_name (string) – The name of the attribute to get. Returns: The content value of the attribute or None if not found. Return type: string
-
get_custom_sdp_media_attribute
()¶ Get a custom SDP attribute that is related to a specific stream.
Parameters: - type (int) – The type of the stream to add a custom SDP attribute to.
- attribute_name (string) – The name of the attribute to get.
Returns: The content value of the attribute or None if not found.
Return type: string
-
local_conference_mode
¶ [bool] Tell whether the call is part of the locally managed conference.
-
low_bandwidth_enabled
¶ [bool] Indicate low bandwith mode. Configuring a call to low bandwidth mode will result in the core to activate several settings for the call in order to ensure that bitrate usage is lowered to the minimum possible. Typically, ptime (packetization time) will be increased, audio codec’s output bitrate will be targetted to 20kbit/s provided that it is achievable by the codec selected after SDP handshake. Video is automatically disabled.
-
media_encryption
¶ [int] Set requested media encryption for a call.
-
realtime_text_enabled
¶ [bool] Use to enable real time text following rfc4103. If enabled, outgoing calls put a m=text line in SDP offer .
-
received_framerate
¶ [float] Get the framerate of the video that is received.
-
received_video_size
¶ [linphone.VideoSize] Get the size of the video that is received.
-
record_file
¶ [string] Enable recording of the call. This function must be used before the call parameters are assigned to the call. The call recording can be started and paused after the call is established with
linphone.Call.start_recording()
and linphone_call_pause_recording().
-
rtp_profile
¶ [string] Get the RTP profile being used.
-
sent_framerate
¶ [float] Get the framerate of the video that is sent.
-
sent_video_size
¶ [linphone.VideoSize] Gets the size of the video that is sent.
-
session_name
¶ [string] Set the session name of the media session (ie in SDP). Subject from the SIP message (which is different) can be set using linphone_call_params_set_custom_header().
-
used_audio_codec
¶ [linphone.PayloadType] Get the audio codec used in the call, described as a LinphonePayloadType object.
-
used_text_codec
¶ [linphone.PayloadType] Get the text codec used in the call, described as a LinphonePayloadType structure.
-
used_video_codec
¶ [linphone.PayloadType] Get the video codec used in the call, described as a LinphonePayloadType structure.
-
user_data
¶ A place to store some user data.
-
video_direction
¶ [int] Set the video stream direction.
-
video_enabled
¶ [bool] Enable video stream.
-
video_multicast_enabled
¶ [bool] Use to enable multicast rtp for video stream. If enabled, outgoing calls put a multicast address from
linphone.Core.video_multicast_addr
into video cline. In case of outgoing call video stream is sent to this multicast address. For incoming calls behavior is unchanged.
-
-
class
linphone.
CallStats
¶ The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams.
To receive these informations periodically and as soon as they are computed, the application is invited to place a LinphoneCoreCallStatsUpdatedCb callback in the LinphoneCoreVTable structure it passes for instanciating the LinphoneCore object (see linphone_core_new() ).
At any time, the application can access last computed statistics using
linphone.Call.audio_stats
orlinphone.Call.video_stats
.-
download_bandwidth
¶ [float] Get the bandwidth measurement of the received stream, expressed in kbit/s, including IP/UDP/RTP headers.
-
get_late_packets_cumulative_number
()¶ Gets the cumulative number of late packets
Parameters: call (linphone.Call) – Returns: The cumulative number of late packets Return type: 64bits unsigned int
-
get_receiver_interarrival_jitter
()¶ Gets the remote reported interarrival jitter
Parameters: call (linphone.Call) – Returns: The interarrival jitter at last received receiver report Return type: float
-
get_sender_interarrival_jitter
()¶ Gets the local interarrival jitter
Parameters: call (linphone.Call) – Returns: The interarrival jitter at last emitted sender report Return type: float
-
ice_state
¶ [int] Get the state of ICE processing.
-
receiver_loss_rate
¶ [float] Gets the remote reported loss rate since last report
-
sender_loss_rate
¶ [float] Get the local loss rate since last report
-
upload_bandwidth
¶ [float] Get the bandwidth measurement of the sent stream, expressed in kbit/s, including IP/UDP/RTP headers.
-
upnp_state
¶ [int] Get the state of uPnP processing.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
ChatMessage
¶ A chat room message to hold content to be sent. Can be created by linphone_chat_room_create_message() .
-
add_custom_header
()¶ Add custom headers to the message.
Parameters: - header_name (string) – name of the header_name
- header_value (string) – header value
-
appdata
¶ [string] 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.
Invoking this function will attempt to update the message storage to reflect the changeif it is enabled.
-
callbacks
¶ [linphone.ChatMessageCbs] Get the LinphoneChatMessageCbs object associated with the LinphoneChatMessage.
-
cancel_file_transfer
()¶ Cancel an ongoing file transfer attached to this message.(upload or download)
-
chat_room
¶ [linphone.ChatRoom] Returns the chatroom this message belongs to.
-
clone
()¶ Duplicate a LinphoneChatMessage
Returns: Return type: linphone.ChatMessage
-
download_file
()¶ Start the download of the file referenced in a LinphoneChatMessage from remote server.
Returns: Return type: int
-
error_info
¶ [linphone.ErrorInfo] Get full details about delivery error of a chat message.
-
external_body_url
¶ [string] Linphone message can carry external body as defined by rfc2017
-
file_transfer_filepath
¶ [string] Set the path to the file to read from or write to during the file transfer.
-
file_transfer_information
¶ [linphone.Content] Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer)
-
from_address
¶ [linphone.Address] Set origin of the message
-
get_custom_header
()¶ Retrieve a custom header value given its name.
Parameters: header_name (string) – header name searched Returns: Return type: string
-
local_address
¶ [linphone.Address] Returns the origin address of a message if it was a outgoing message, or the destination address if it was an incoming message.
-
outgoing
¶ [bool] Returns TRUE if the message has been sent, returns FALSE if the message has been received.
-
peer_address
¶ [linphone.Address] get peer address associated to this LinphoneChatRoom
-
put_char
()¶ 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: charater (unsigned int) – Returns: 0 if succeed. Return type: int
-
read
¶ [bool] Returns TRUE if the message has been read, otherwise returns FALSE.
-
state
¶ [int] Get the state of the message
-
storage_id
¶ [unsigned int] Returns the id used to identify this message in the storage database
-
text
¶ [string] Get text part of this message
-
time
¶ [DateTime] Get the time the message was sent.
-
to_address
¶ [linphone.Address] Set destination of the message
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
ChatMessageCbs
¶ An object to handle the callbacks for the handling a LinphoneChatMessage objects.
-
file_transfer_progress_indication
¶ [callable] Set the file transfer progress indication callback.
-
file_transfer_recv
¶ [callable] Set the file transfer receive callback.
-
file_transfer_send
¶ [callable] Set the file transfer send callback.
-
msg_state_changed
¶ [callable] Set the message state changed callback.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
ChatRoom
¶ A chat room is the place where text messages are exchanged. Can be created by linphone_core_create_chat_room().
-
call
¶ [linphone.Call] get Curent Call associated to this chatroom if any To commit a message, use linphone_chat_room_send_message
-
char
¶ [unsigned int] When realtime text is enabled
linphone.CallParams.realtime_text_enabled
, LinphoneCoreIsComposingReceivedCb is call everytime a char is received from peer. At the end of remote typing a regular LinphoneChatMessage is received with committed data from LinphoneCoreMessageReceivedCb .
-
compose
()¶ Notifies the destination of the chat message being composed that the user is typing a new message.
-
core
¶ [linphone.Core] Returns back pointer to LinphoneCore object.
-
create_file_transfer_message
()¶ Create a message attached to a dedicated chat room with a particular content. Use linphone_chat_room_send_message to initiate the transfer
Parameters: initial_content (linphone.Content) – LinphoneContent initial content. LinphoneCoreVTable.file_transfer_send is invoked later to notify file transfer progress and collect next chunk of the message if #LinphoneContent.data is None. Returns: a new LinphoneChatMessage Return type: linphone.ChatMessage
-
create_message
()¶ Create a message attached to a dedicated chat room;
Parameters: message (string) – text message, None if absent. Returns: a new LinphoneChatMessage Return type: linphone.ChatMessage
-
create_message_2
()¶ Create a message attached to a dedicated chat room;
Parameters: - message (string) – text message, None if absent.
- external_body_url (string) – the URL given in external body or None.
- state (int) – the LinphoneChatMessage.State of the message.
- time (DateTime) – the time_t at which the message has been received/sent.
- is_read (bool) – TRUE if the message should be flagged as read, FALSE otherwise.
- is_incoming (bool) – TRUE if the message has been received, FALSE otherwise.
Returns: a new LinphoneChatMessage
Return type:
-
delete_history
()¶ Delete all messages from the history
-
delete_message
()¶ Delete a message from the chat room history.
Parameters: msg (linphone.ChatMessage) – The LinphoneChatMessage object to remove.
-
get_history
()¶ Gets nb_message most recent messages from cr chat room, sorted from oldest to most recent.
Parameters: nb_message (int) – Number of message to retrieve. 0 means everything. Returns: A list of LinphoneChatMessage objects. Return type: list of linphone.LinphoneChatMessage
-
get_history_range
()¶ Gets the partial list of messages in the given range, sorted from oldest to most recent.
Parameters: - begin (int) – The first message of the range to be retrieved. History most recent message has index 0.
- end (int) – The last message of the range to be retrieved. History oldest message has index of history size - 1 (use
linphone.ChatRoom.history_size
to retrieve history size)
Returns: A list of LinphoneChatMessage objects.
Return type: list of linphone.LinphoneChatMessage
-
history_size
¶ [int] Gets the number of messages in a chat room.
-
mark_as_read
()¶ Mark all messages of the conversation as read
-
remote_composing
¶ [bool] Tells whether the remote is currently composing a message.
-
send_chat_message
()¶ Send a message to peer member of this chat room.
Parameters: msg (linphone.ChatMessage) – LinphoneChatMessage object The state of the message sending will be notified via the callbacks defined in the LinphoneChatMessageCbs object that can be obtained by calling linphone.ChatMessage.callbacks
. The LinphoneChatMessage reference is transfered to the function and thus doesn’t need to be unref’d by the application.
-
unread_messages_count
¶ [int] Gets the number of unread messages in the chatroom.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
Content
¶ The LinphoneContent object holds data that can be embedded in a signaling message.
-
buffer
¶ [ByteArray] Set the content data buffer.
-
encoding
¶ [string] Set the encoding of the data buffer, for example gzip.
-
name
¶ [string] Set 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.
-
size
¶ [int] Set the content data size, excluding null character despite null character is always set for convenience.
-
string_buffer
¶ [string] Set the string content data buffer.
-
subtype
¶ [string] Set the mime subtype of the content data.
-
type
¶ [string] Set the mime type of the content data.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
Core
¶ Linphone core main object created by function linphone_core_new() .
-
abort_authentication
()¶ This method is used to abort a user authentication request initiated by LinphoneCore from the auth_info_requested callback of LinphoneCoreVTable.
Parameters: info (linphone.AuthInfo) –
-
accept_call
()¶ 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 LinphoneCallIncoming event with the associated LinphoneCall object. The application can later accept the call using this method.
Parameters: call (linphone.Call) – the LinphoneCall object representing the call to be answered. Returns: Return type: int
-
accept_call_update
()¶ 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 linphone_core_defer_update_call() so that it can have the time to prompt the user.
linphone.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,
linphone.Core.accept_call_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 (seelinphone.CallParams.video_enabled
).Parameters: - call (linphone.Call) – the LinphoneCall object
- params (linphone.CallParams) – a LinphoneCallParams object describing the call parameters to accept.
Returns: 0 if successful, -1 otherwise (actually when this function call is performed outside ot LinphoneCallUpdatedByRemote state).
Return type: int
-
accept_call_with_params
()¶ 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 LinphoneCallIncoming event with the associated LinphoneCall object. The application can later accept the call using this method.
Parameters: - call (linphone.Call) – the LinphoneCall object representing the call to be answered.
- params (linphone.CallParams) – the specific parameters for this call, for example whether video is accepted or not. Use None to use default parameters.
Returns: Return type: int
-
accept_early_media
()¶ Accept an early media session for an incoming call. This is identical as calling
linphone.Core.accept_early_media_with_params()
with None call parameters.Parameters: call (linphone.Call) – the incoming call Returns: 0 if successful, -1 otherwise. Return type: int
-
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
linphone.Core.accept_call()
orlinphone.Core.accept_call_with_params()
.Parameters: - call (linphone.Call) – the call
- params (linphone.CallParams) – the call params, can be None.
Returns: 0 if successful, -1 otherwise.
Return type: int
-
adaptive_rate_algorithm
¶ [string] Sets adaptive rate algorithm. It will be used for each new calls starting from now. Calls already started will not be updated.
-
adaptive_rate_control_enabled
¶ [bool] Enable adaptive rate control.
Adaptive rate control consists in using RTCP feedback provided information to dynamically control the output bitrate of the audio and video encoders, so that we can adapt to the network conditions and available bandwidth. Control of the audio encoder is done in case of audio-only call, and control of the video encoder is done for audio & video calls. Adaptive rate control feature is enabled by default.
-
add_all_to_conference
()¶ Add all calls into a conference.
Returns: 0 if successful, -1 otherwise Return type: int
-
add_auth_info
()¶ Adds authentication information to the LinphoneCore.
This information will be used during all SIP transactions that require authentication.
Parameters: info (linphone.AuthInfo) –
-
add_friend
()¶ Add a friend to the current buddy list, if subscription attribute is set, a SIP SUBSCRIBE message is sent.
Parameters: fr (linphone.Friend) – LinphoneFriend to add
-
add_proxy_config
()¶ Add a proxy configuration. This will start registration on the proxy, if registration is enabled.
Parameters: config (linphone.ProxyConfig) – Returns: Return type: int
-
add_supported_tag
()¶ This function controls signaling features supported by the core. They are typically included in a SIP Supported header.
Parameters: tag (string) – the feature tag name
-
add_to_conference
()¶ Merge a call into a conference.
Parameters: call (linphone.Call) – an established call, either in LinphoneCallStreamsRunning or LinphoneCallPaused state. Returns: 0 if successful, -1 otherwise. Return type: int
-
audio_adaptive_jittcomp_enabled
¶ [bool] Enable or disable the audio adaptive jitter compensation.
-
audio_codecs
¶ [list of linphone.PayloadType] Sets the list of audio codecs. The list is taken by the LinphoneCore thus the application should not free it. This list is made of struct PayloadType describing the codec parameters.
-
audio_dscp
¶ [int] Set the DSCP field for outgoing audio streams.
The DSCP defines the quality of service in IP packets.
-
audio_jittcomp
¶ [int] Sets the nominal audio jitter buffer size in milliseconds. The value takes effect immediately for all running and pending calls, if any. A value of 0 disables the jitter buffer.
-
audio_multicast_addr
¶ [string] Use to set multicast address to be used for audio stream.
-
audio_multicast_enabled
¶ [bool] Use to enable multicast rtp for audio stream.
-
audio_multicast_ttl
¶ [int] Use to set multicast ttl to be used for audio stream.
-
audio_port
¶ [int] Sets the UDP port used for audio streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
-
auth_info_list
¶ [list of linphone.LinphoneAuthInfo] Returns an unmodifiable list of currently entered LinphoneAuthInfo.
-
avpf_mode
¶ [int] Enable RTCP feedback (also known as RTP/AVPF profile). Setting LinphoneAVPFDefault is equivalent to LinphoneAVPFDisabled. This setting can be overriden per LinphoneProxyConfig with
linphone.ProxyConfig.avpf_mode
. The value set here is used for calls placed or received out of any proxy configured, or if the proxy config is configured with LinphoneAVPFDefault.
-
avpf_rr_interval
¶ [int] Set the avpf report interval in seconds. This value can be overriden by the proxy config using
linphone.ProxyConfig.avpf_rr_interval
.
-
call_logs
¶ [list of linphone.LinphoneCallLog] Get the list of call logs (past calls).
-
call_logs_database_path
¶ [string] Sets the database filename where call logs will be stored. If the file does not exist, it will be created.
-
calls
¶ [list of linphone.LinphoneCall] Returns the current list of calls. Note that this list is read-only and might be changed by the core after a function call to
linphone.Core.iterate()
. Similarly the LinphoneCall objects inside it might be destroyed without prior notice. To hold references to LinphoneCall object into your program, you must use linphone_call_ref() .
-
calls_nb
¶ [int] Get the number of Call
-
capture_device
¶ [string] Sets the sound device used for capture.
-
chat_database_path
¶ [string] Sets the database filename where chat messages will be stored. If the file does not exist, it will be created.
-
chat_enabled
¶ [bool] Returns whether chat is enabled.
-
chat_rooms
¶ [list of linphone.LinphoneChatRoom] Returns an list of chat rooms
-
clear_all_auth_info
()¶ Clear all authentication information.
-
clear_call_logs
()¶ Erase the call log.
-
clear_proxy_config
()¶ Erase all proxies from config.
-
compress_log_collection
()¶ Compress the log collection in a single file.
Returns: The path of the compressed log collection file (to be freed calling ms_free()). Return type: string
-
conference_local_input_volume
¶ [float] Returns the sound volume (mic input) of the local participant of the conference.
-
conference_size
¶ [int] Returns the number of participants to the conference, including the local participant.
-
config
¶ [linphone.LpConfig] Returns the LpConfig object used to manage the storage (config) file.
The application can use the LpConfig object to insert its own private sections and pairs of key=value in the configuration file.
-
create_address
()¶ Create a LinphoneAddress object by parsing the user supplied address, given as a string.
Parameters: address (string) – String containing the user supplied address Returns: The create LinphoneAddress object Return type: linphone.Address
-
create_auth_info
()¶ Create an authentication information with default values from Linphone core.
Parameters: - username (string) – String containing the username part of the authentication credentials
- userid (string) – String containing the username to use to calculate the authentication digest (optional)
- passwd (string) – String containing the password of the authentication credentials (optional, either passwd or ha1 must be set)
- ha1 (string) – String containing a ha1 hash of the password (optional, either passwd or ha1 must be set)
- realm (string) – String used to discriminate different SIP authentication domains (optional)
- domain (string) – String containing the SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
Returns: #LinphoneAuthInfo with default values set
Return type:
-
create_call_params
()¶ Create a LinphoneCallParams suitable for
linphone.Core.invite_with_params()
,linphone.Core.accept_call_with_params()
,linphone.Core.accept_early_media_with_params()
,linphone.Core.accept_call_update()
. The parameters are initialized according to the current LinphoneCore configuration and the current state of the LinphoneCall.Parameters: call (linphone.Call) – the 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 LinphoneCallParams Return type: linphone.CallParams
-
create_content
()¶ Create a content with default values from Linphone core.
Returns: LinphoneContent object with default values set Return type: linphone.Content
-
create_friend
()¶ Create a default LinphoneFriend.
Returns: The created LinphoneFriend object Return type: linphone.Friend
-
create_friend_with_address
()¶ Create a LinphoneFriend from the given address.
Parameters: address (string) – A string containing the address to create the LinphoneFriend from Returns: The created LinphoneFriend object Return type: linphone.Friend
-
create_lp_config
()¶ Create a LpConfig object from a user config file.
Parameters: filename (string) – The filename of the config file to read to fill the instantiated LpConfig Returns: Return type: linphone.LpConfig
-
create_presence_activity
()¶ Create a LinphonePresenceActivity with the given type and description.
Parameters: - acttype (int) – The LinphonePresenceActivityType to set for the activity.
- description (string) – 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 LinphonePresenceActivity object.
Return type:
-
create_presence_model
()¶ Create a default LinphonePresenceModel.
Returns: The created LinphonePresenceModel object. Return type: linphone.PresenceModel
-
create_presence_model_with_activity
()¶ Create a LinphonePresenceModel with the given activity type and activity description.
Parameters: - acttype (int) – The LinphonePresenceActivityType to set for the activity of the created model.
- description (string) – 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 LinphonePresenceModel object.
Return type:
-
create_presence_model_with_activity_and_note
()¶ Create a LinphonePresenceModel with the given activity type, activity description, note content and note language.
Parameters: - acttype (int) – The LinphonePresenceActivityType to set for the activity of the created model.
- description (string) – An additional description of the activity to set for the activity. Can be None if no additional description is to be added.
- note (string) – The content of the note to be added to the created model.
- lang (string) – The language of the note to be added to the created model.
Returns: The created LinphonePresenceModel object.
Return type:
-
create_presence_note
()¶ Create a LinphonePresenceNote with the given content and language.
Parameters: - content (string) – The content of the note to be created.
- lang (string) – The language of the note to be created.
Returns: The created LinphonePresenceNote object.
Return type:
-
create_presence_person
()¶ Create a LinphonePresencePerson with the given id.
Parameters: id (string) – The id of the person to be created. Returns: The created LinphonePresencePerson object. Return type: linphone.PresencePerson
-
create_presence_service
()¶ Create a LinphonePresenceService with the given id, basic status and contact.
Parameters: - id (string) – The id of the service to be created.
- basic_status (int) – The basic status of the service to be created.
- contact (string) – A string containing a contact information corresponding to the service to be created.
Returns: The created LinphonePresenceService object.
Return type:
-
create_proxy_config
()¶ Create a proxy config with default values from Linphone core.
Returns: LinphoneProxyConfig with default values set Return type: linphone.ProxyConfig
-
create_publish
()¶ Create a publish context for an event state. After being created, the publish must be sent using
linphone.Event.send_publish()
. After expiry, the publication is refreshed unless it is terminated before.Parameters: - resource (linphone.Address) – the resource uri for the event
- event (string) – the event name
- expires (int) – the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
Returns: the LinphoneEvent holding the context of the publish.
Return type:
-
create_subscribe
()¶ 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
linphone.Core.subscribe()
the subscription isn’t sent immediately. It will be send when callinglinphone.Event.send_subscribe()
.Parameters: - resource (linphone.Address) – the destination resource
- event (string) – the event name
- expires (int) – the whished duration of the subscription
Returns: a LinphoneEvent holding the context of the created subcription.
Return type:
-
current_call
¶ [linphone.Call] Returns The _LinphoneCall struct of the current call if one is in call
-
current_call_remote_address
¶ [linphone.Address] Get the remote address of the current call.
-
current_preview_video_size
¶ [linphone.VideoSize] Returns the effective video size for the captured video as provided by the camera. When preview is disabled or not yet started, this function returns a zeroed video size.
-
current_vtable
¶ [linphone.CoreVTable] Gets the current VTable. This is meant only to be called from a callback to be able to get the user_data associated with the vtable that called the callback.
-
decline_call
()¶ Decline a pending incoming call, with a reason.
Parameters: - call (linphone.Call) – the LinphoneCall, must be in the IncomingReceived state.
- reason (int) – the reason for rejecting the call: LinphoneReasonDeclined or LinphoneReasonBusy
Returns: Return type: int
-
default_proxy_config
¶ [linphone.ProxyConfig] Sets the default proxy.
This default proxy must be part of the list of already entered LinphoneProxyConfig. Toggling it as default will make LinphoneCore use the identity associated with the proxy configuration in all incoming and outgoing calls.
-
defer_call_update
()¶ When receiving a LinphoneCallUpdatedByRemote state notification, prevent LinphoneCore from performing an automatic answer.
When receiving a LinphoneCallUpdatedByRemote state notification (ie an incoming reINVITE), the default behaviour of LinphoneCore is defined by the defer_update_default option of the sip section of the config. If this option is 0 (the default) then the LinphoneCore 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 calllinphone.Core.accept_call_update()
to answer the reINVITE, with eventually video enabled in the LinphoneCallParams 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.
Parameters: call (linphone.Call) – Returns: 0 if successful, -1 if the linphone.Core.defer_call_update()
was done outside a valid LinphoneCallUpdatedByRemote notification.Return type: int
-
delayed_timeout
¶ [int] Set the in delayed timeout in seconds.
After this timeout period, a delayed call (internal call initialisation or resolution) is resumed.
-
delete_chat_room
()¶ Removes a chatroom including all message history from the LinphoneCore.
Parameters: cr (linphone.ChatRoom) –
-
device_rotation
¶ [int] Tells the core the device current orientation. This can be used by capture filters on mobile devices to select between portrait/landscape mode and to produce properly oriented images. The exact meaning of the value in rotation if left to each device specific implementations.
-
disable_chat
()¶ Inconditionnaly disable incoming chat messages.
Parameters: deny_reason (int) – the deny reason (#LinphoneReasonNone has no effect).
-
dns_srv_enabled
¶ [bool] Enable or disable DNS SRV resolution.
-
download_bandwidth
¶ [int] Sets maximum available download bandwidth This is IP bandwidth, in kbit/s. This information is used signaled to other parties during calls (within SDP messages) so that the remote end can have sufficient knowledge to properly configure its audio & video codec output bitrate to not overflow available bandwidth.
-
download_ptime
¶ [int] Set audio packetization time linphone expects to receive from peer. A value of zero means that ptime is not specified.
-
echo_cancellation_enabled
¶ [bool] Enables or disable echo cancellation. Value is saved and used for subsequent calls. This actually controls software echo cancellation. If hardware echo cancellation is available, it will be always used and activated for calls, regardless of the value passed to this function. When hardware echo cancellation is available, the software one is of course not activated.
-
echo_limiter_enabled
¶ [bool] Enables or disable echo limiter.
-
enable_chat
()¶ Enable reception of incoming chat messages. By default it is enabled but it can be disabled with
linphone.Core.disable_chat()
.
-
enable_payload_type
()¶ Enable or disable the use of the specified payload type.
Parameters: - pt (linphone.PayloadType) – The LinphonePayloadType to enable or disable. It can be retrieved using
linphone.Core.find_payload_type()
- enable (bool) – TRUE to enable the payload type, FALSE to disable it.
Returns: 0 if successful, any other value otherwise.
Return type: int
- pt (linphone.PayloadType) – The LinphonePayloadType to enable or disable. It can be retrieved using
-
enter_conference
()¶ Moves the local participant inside the conference.
linphone.Core.leave_conference()
andlinphone.Core.enter_conference()
the application can decide to temporarily move out and in the local participant from the conference.Returns: 0 if successful, -1 otherwise Return type: int
-
file_transfer_server
¶ [string] Globaly set an http file transfer server to be used for content type application/vnd.gsma.rcs-ft-http+xml. This value can also be set for a dedicated account using linphone_proxy_config_set_file_transfer_server
-
find_auth_info
()¶ 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 (string) – the authentication ‘realm’ (optional)
- username (string) – the SIP username to be authenticated (mandatory)
- sip_domain (string) –
Returns: a #LinphoneAuthInfo
Return type:
-
find_call_from_uri
()¶ Search from the list of current calls if a remote address match uri
Parameters: uri (string) – which should match call remote uri Returns: LinphoneCall or None is no match is found Return type: linphone.Call
-
find_friend
()¶ Search a LinphoneFriend by its address.
Parameters: addr (linphone.Address) – The address to use to search the friend. Returns: The LinphoneFriend object corresponding to the given address. Return type: linphone.Friend
-
find_payload_type
()¶ 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 (string) – payload mime type (I.E SPEEX, PCMU, VP8)
- rate (int) – can be LINPHONE_FIND_PAYLOAD_IGNORE_RATE
- channels (int) – number of channels, can be LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
Returns: Returns None if not found.
Return type:
-
firewall_policy
¶ [int] Set the policy to use to pass through firewalls.
-
friend_list
¶ [list of linphone.LinphoneFriend] Get Buddy list of LinphoneFriend
-
get_call_by_remote_address
()¶ Get the call with the remote_address specified
Parameters: remote_address (string) – Returns: the LinphoneCall of the call if found Return type: linphone.Call
-
get_call_by_remote_address2
()¶ Get the call with the remote_address specified
Parameters: remote_address (linphone.Address) – Returns: the LinphoneCall of the call if found Return type: linphone.Call
-
get_call_history_for_address
()¶ Get the list of call logs (past calls) that matches the given LinphoneAddress . At the contrary of
linphone.Core.call_logs
, it is your responsability to unref the logs and free this list once you are done using it.Parameters: addr (linphone.Address) – Returns: A list of LinphoneCallLog objects. Return type: list of linphone.LinphoneCallLog
-
get_chat_room
()¶ Get a chat room whose peer is the supplied address. If it does not exist yet, it will be created. No reference is transfered to the application. The LinphoneCore keeps a reference on the chat room.
Parameters: addr (linphone.Address) – a linphone address. Returns: LinphoneChatRoom where messaging can take place. Return type: linphone.ChatRoom
-
get_chat_room_from_uri
()¶ Get a chat room for messaging from a sip uri like sip: . If it does not exist yet, it will be created. No reference is transfered to the application. The LinphoneCore keeps a reference on the chat room.
Parameters: to (string) – The destination address for messages. Returns: LinphoneChatRoom where messaging can take place. Return type: linphone.ChatRoom
-
get_friend_by_ref_key
()¶ Search a LinphoneFriend by its reference key.
Parameters: key (string) – The reference key to use to search the friend. Returns: The LinphoneFriend object corresponding to the given reference key. Return type: linphone.Friend
-
get_payload_type_bitrate
()¶ Get the bitrate explicitely set with
linphone.Core.set_payload_type_bitrate()
.Parameters: pt (linphone.PayloadType) – the LinphonePayloadType to modify. Returns: bitrate the IP bitrate in kbit/s, or -1 if an error occured. Return type: int
-
get_payload_type_number
()¶ Returns the payload type number assigned for this codec.
Parameters: pt (linphone.PayloadType) – Returns: Return type: int
-
get_text_port_range
()¶ Get the video port range from which is randomly chosen the UDP port used for text streaming.
Parameters: - min_port (int) –
- max_port (int) –
-
guess_hostname
¶ [bool] Tells LinphoneCore to guess local hostname automatically in primary contact.
-
identity
¶ [string] Returns the default identity SIP address.
This is an helper function:
If no default proxy is set, this will return the primary contact ( see
linphone.Core.primary_contact
). If a default proxy is set it returns the registered identity on the proxy.
-
in_call
()¶ Returns TRUE if there is a call running.
Returns: Return type: bool
-
in_call_timeout
¶ [int] Set the in call timeout in seconds.
After this timeout period, the call is automatically hangup.
-
in_conference
¶ [bool] Indicates whether the local participant is part of a conference.
-
inc_timeout
¶ [int] Set the incoming call timeout in seconds.
If an incoming call isn’t answered for this timeout period, it is automatically declined.
-
incoming_invite_pending
¶ [bool] Tells whether there is an incoming invite pending.
-
invite
()¶ Initiates an outgoing call
linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.Parameters: url (string) – the destination of the call (sip address, or phone number). Returns: a LinphoneCall object or None in case of failure Return type: linphone.Call
-
invite_address
()¶ Initiates an outgoing call given a destination LinphoneAddress
linphone.Address.new()
, or created by linphone_core_interpret_url(). 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: addr (linphone.Address) – the destination of the call (sip address). Returns: a LinphoneCall object or None in case of failure Return type: linphone.Call
-
invite_address_with_params
()¶ Initiates an outgoing call given a destination LinphoneAddress
linphone.Address.new()
, or created by linphone_core_interpret_url(). 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: - addr (linphone.Address) – the destination of the call (sip address).
- params (linphone.CallParams) – call parameters
Returns: a LinphoneCall object or None in case of failure
Return type:
-
invite_with_params
()¶ Initiates an outgoing call according to supplied call parameters
linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.Parameters: - url (string) – the destination of the call (sip address, or phone number).
- p (linphone.CallParams) – call parameters
Returns: a LinphoneCall object or None in case of failure
Return type:
-
ipv6_enabled
¶ [bool] Turns IPv6 support on or off.
IPv6 support is exclusive with IPv4 in liblinphone: when IPv6 is turned on, IPv4 calls won’t be possible anymore. By default IPv6 support is off.
-
iterate
()¶ Main loop function. It is crucial that your application call it periodically.
linphone.Core.iterate()
performs various backgrounds tasks:
-
keep_alive_enabled
¶ [bool] enable signaling keep alive. small udp packet sent periodically to keep udp NAT association
Enables signaling keep alive
-
last_outgoing_call_log
¶ [linphone.CallLog] Get the latest outgoing call log.
-
leave_conference
()¶ Moves the local participant out of the conference.
Returns: 0 if successful, -1 otherwise. Return type: int
-
log_collection_enabled
()¶ Tells whether the linphone core log collection is enabled.
Returns: The state of the linphone core log collection. Return type: linphone.LogCollectionState
-
log_collection_upload_server_url
¶ [string] Set the url of the server where to upload the collected log files.
-
max_calls
¶ [int] Set the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
-
media_encryption
¶ [int] Choose the media encryption policy to be used for RTP packets.
-
media_encryption_mandatory
¶ [bool] Define behaviour when encryption parameters negociation fails on outgoing call.
-
media_encryption_supported
()¶ Check if a media encryption type is supported
Parameters: menc (int) – LinphoneMediaEncryption Returns: whether a media encryption scheme is supported by the LinphoneCore engine Return type: bool
-
mic_enabled
¶ [bool] Enable or disable the microphone.
-
mic_gain_db
¶ [float] Allow to control microphone level: gain in db
-
migrate_logs_from_rc_to_db
()¶ Migrates the call logs from the linphonerc to the database if not done yet
-
migrate_to_multi_transport
()¶ Migrate configuration so that all SIP transports are enabled. Versions of linphone < 3.7 did not support using multiple SIP transport simultaneously. This function helps application to migrate the configuration so that all transports are enabled. Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. This function must be used just after creating the core, before any call to
linphone.Core.iterate()
Returns: 1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error. Return type: int
-
missed_calls_count
¶ [int] Get the number of missed calls. Once checked, this counter can be reset with
linphone.Core.reset_missed_calls_count()
.
-
mtu
¶ [int] Sets the maximum transmission unit size in bytes. This information is useful for sending RTP packets. Default value is 1500.
-
nat_address
¶ [string] Set the public IP address of NAT when using the firewall policy is set to use NAT.
-
native_preview_window_id
¶ [int] Set the native window id where the preview video (local camera) is to be displayed. This has to be used in conjonction with
linphone.Core.use_preview_window()
. MacOS, Linux, Windows: if not set or zero the core will create its own window, unless the special id -1 is given.
-
native_video_window_id
¶ [int] Set the native video window id where the video is to be displayed. For MacOS, Linux, Windows: if not set or LINPHONE_VIDEO_DISPLAY_AUTO the core will create its own window, unless the special id LINPHONE_VIDEO_DISPLAY_NONE is given.
-
network_reachable
¶ [bool] This method is called by the application to notify the linphone core library when network is reachable. Calling this method with true trigger linphone to initiate a registration process for all proxies. Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes.
-
new
()¶ Instantiate a LinphoneCore object.
Parameters: - vtable (dictionary) – The callbacks.
- configPath (string) – A path to a config file. If it does not exists it will be created. The config file is used to store all settings, call logs, friends, proxies... so that all these settings become persistent over the life of the LinphoneCore object. It is allowed to set to None. In that case LinphoneCore will not store any settings.
- factoryConfigPath (string) – A path to a read-only config file that can be used to store hard-coded preference such as proxy settings or internal preferences. The settings in this factory file always override the one in the normal config file. It is OPTIONAL, use None if unneeded.
Return type:
-
new_with_config
()¶ Instantiate a LinphoneCore object from a LpConfig.
Parameters: - vtable (dictionary) – The callbacks.
- config – A LpConfig object holding the configuration of the LinphoneCore to be instantiated.
Return type:
-
nortp_timeout
¶ [int] Sets the no-rtp timeout value in seconds.
See
linphone.Core.nortp_timeout
for details.
-
notify_all_friends
()¶ Notify all friends that have subscribed
Parameters: presence (linphone.PresenceModel) – LinphonePresenceModel to notify
-
pause_all_calls
()¶ Pause all currently running calls.
Returns: Return type: int
-
pause_call
()¶ Pauses the call. If a music file has been setup using
linphone.Core.play_file
, this file will be played to the remote user.Parameters: call (linphone.Call) – Returns: Return type: int
-
payload_type_enabled
()¶ Tells whether the specified payload type is enabled.
Parameters: pt (linphone.PayloadType) – The LinphonePayloadType we want to know is enabled or not. Returns: TRUE if the payload type is enabled, FALSE if disabled. Return type: bool
-
payload_type_is_vbr
()¶ Tells whether the specified payload type represents a variable bitrate codec.
Parameters: pt (linphone.PayloadType) – The LinphonePayloadType we want to know Returns: TRUE if the payload type represents a VBR codec, FALSE if disabled. Return type: bool
-
play_dtmf
()¶ Plays a dtmf sound to the local user.
Parameters: - dtmf (int) – DTMF to play [‘0’..‘16’] | ‘#’ | ‘#’
- duration_ms (int) – duration in ms, -1 means play until next further call to
linphone.Core.stop_dtmf()
-
play_file
¶ [string] Sets a wav file to be played when putting somebody on hold, or when files are used instead of soundcards (see
linphone.Core.use_files
).The file must be a 16 bit linear wav file.
-
play_level
¶ [int] Set sound playback level in 0-100 scale
-
play_local
()¶ 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 (string) – path to audio file in wav PCM 16 bit format. Returns: Return type: int
-
playback_device
¶ [string] Sets the sound device used for playback.
-
playback_gain_db
¶ [float] Allow to control play level before entering sound card: gain in db
-
preferred_framerate
¶ [float] Set the preferred frame rate for video. Based on the available bandwidth constraints and network conditions, the video encoder remains free to lower the framerate. There is no warranty that the preferred frame rate be the actual framerate. used during a call. Default value is 0, which means use encoder’s default fps value.
-
preferred_video_size
¶ [linphone.VideoSize] Sets the preferred video size.
This applies only to the stream that is captured and sent to the remote party, since we accept all standard video size on the receive path.
-
preferred_video_size_by_name
¶ [string] Sets the preferred video size by its name.
This is identical to
linphone.Core.preferred_video_size
except that it takes the name of the video resolution as input. Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...
-
presence_model
¶ [linphone.PresenceModel] Set my presence model
-
preview_video_size
¶ [linphone.VideoSize] Sets the video size for the captured (preview) video. This method is for advanced usage where a video capture must be set independently of the size of the stream actually sent through the call. This allows for example to have the preview window with HD resolution even if due to bandwidth constraint the sent video size is small. Using this feature increases the CPU consumption, since a rescaling will be done internally.
-
preview_video_size_by_name
¶ [string] Sets the preview video size by its name. See
linphone.Core.preview_video_size
for more information about this feature.Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...
-
primary_contact
¶ [string] Sets the local from identity.
This data is used in absence of any proxy configuration or when no default proxy configuration is set. See LinphoneProxyConfig
-
primary_contact_parsed
¶ [linphone.Address] Same as
linphone.Core.primary_contact
but the result is a LinphoneAddress object instead of const char*
-
provisioning_uri
¶ [string] Set URI where to download xml configuration file at startup. This can also be set from configuration file or factory config file, from [misc] section, item config-uri. Calling this function does not load the configuration. It will write the value into configuration so that configuration from remote URI will take place at next LinphoneCore start.
-
proxy_config_list
¶ [list of linphone.LinphoneProxyConfig] Returns an unmodifiable list of entered proxy configurations.
-
publish
()¶ Publish an event state. This first create a LinphoneEvent with
linphone.Core.create_publish()
and callslinphone.Event.send_publish()
to actually send it. After expiry, the publication is refreshed unless it is terminated before.Parameters: - resource (linphone.Address) – the resource uri for the event
- event (string) – the event name
- expires (int) – the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
- body (linphone.Content) – the actual published data
Returns: the LinphoneEvent holding the context of the publish.
Return type:
-
rec_level
¶ [int] Set sound capture level in 0-100 scale
-
record_file
¶ [string] Sets a wav file where incoming stream is to be recorded, when files are used instead of soundcards (see
linphone.Core.use_files
).This feature is different from call recording (
linphone.CallParams.record_file
) The file will be a 16 bit linear wav file.
-
redirect_call
()¶ Redirect the specified call to the given redirect URI.
Parameters: - call (linphone.Call) – The LinphoneCall to redirect.
- redirect_uri (string) – The URI to redirect the call to.
Returns: 0 if successful, -1 on error.
Return type: int
-
refresh_registers
()¶ force registration refresh to be initiated upon next iterate
-
reject_subscriber
()¶ Black list a friend. same as
linphone.Friend.inc_subscribe_policy
with LinphoneSPDeny policy;Parameters: lf (linphone.Friend) – LinphoneFriend to add
-
reload_sound_devices
()¶ 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.
-
reload_video_devices
()¶ 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.
-
remote_ringback_tone
¶ [string] Specify a ring back tone to be played to far end during incoming calls.
-
remove_auth_info
()¶ Removes an authentication information object.
Parameters: info (linphone.AuthInfo) –
-
remove_call_log
()¶ 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 (linphone.CallLog) – LinphoneCallLog object to remove.
-
remove_friend
()¶ remove a friend from the buddy list
Parameters: fr (linphone.Friend) – LinphoneFriend to add
-
remove_from_conference
()¶ Remove a call from the conference.
In other words, unless
linphone.Core.leave_conference()
is explicitly called, the last remote participant of a conference is automatically put in a simple call in running state.Parameters: call (linphone.Call) – a call that has been previously merged into the conference. Returns: 0 if successful, -1 otherwise. Return type: int
-
remove_proxy_config
()¶ Removes a proxy configuration.
LinphoneCore will then automatically unregister and place the proxy configuration on a deleted list. For that reason, a removed proxy does NOT need to be freed.
Parameters: config (linphone.ProxyConfig) –
-
remove_supported_tag
()¶ Remove a supported tag.
Parameters: tag (string) – the tag to remove
-
reset_log_collection
()¶ Reset the log collection by removing the log files.
-
reset_missed_calls_count
()¶ Reset the counter of missed calls.
-
resume_call
()¶ Resumes the call.
Parameters: call (linphone.Call) – Returns: Return type: int
-
ring
¶ [string] Sets the path to a wav file used for ringing.
-
ring_during_incoming_early_media
¶ [bool] Enable or disable the ring play during an incoming early media call.
-
ring_level
¶ [int] Set sound ring level in 0-100 scale
-
ringback
¶ [string] Sets the path to a wav file used for ringing back.
Ringback means the ring that is heard when it’s ringing at the remote party. The file must be a wav 16bit linear.
-
ringer_device
¶ [string] Sets the sound device used for ringing.
-
root_ca
¶ [string] Sets the path to a file or folder containing trusted root CAs (PEM format)
-
sdp_200_ack_enabled
¶ [bool] Control when media offer is sent in SIP INVITE.
-
self_view_enabled
¶ [bool] Enables or disable self view during calls.
Self-view refers to having local webcam image inserted in corner of the video window during calls. This function works at any time, including during calls.
-
set_audio_port_range
()¶ Sets the UDP port range from which to randomly select the port used for audio streaming.
Parameters: - min_port (int) –
- max_port (int) –
-
set_call_error_tone
()¶ Assign an audio file to be played locally upon call failure, for a given reason.
Parameters: - reason (int) – the LinphoneReason representing the failure error code.
- audiofile (string) – a wav file to be played when such call failure happens.
-
set_payload_type_bitrate
()¶ Set an explicit bitrate (IP bitrate, not codec bitrate) for a given codec, in kbit/s.
Parameters: - pt (linphone.PayloadType) – the LinphonePayloadType to modify.
- bitrate (int) – the IP bitrate in kbit/s.
-
set_payload_type_number
()¶ Force a number for a payload type. The LinphoneCore does payload type number assignment automatically. THis function is to be used mainly for tests, in order to override the automatic assignment mechanism.
Parameters: - pt (linphone.PayloadType) –
- number (int) –
-
set_text_port_range
()¶ Sets the UDP port range from which to randomly select the port used for text streaming.
Parameters: - min_port (int) –
- max_port (int) –
-
set_user_agent
()¶ Sets the user agent string used in SIP messages.
Parameters: - name (string) –
- ver (string) –
-
set_video_port_range
()¶ Sets the UDP port range from which to randomly select the port used for video streaming.
Parameters: - min_port (int) –
- max_port (int) –
-
sip_dscp
¶ [int] Set the DSCP field for SIP signaling channel.
-
sip_transport_timeout
¶ [int] Set the SIP transport timeout.
-
sip_transports
¶ [
linphone.SipTransports
] Sets the ports to be used for each transport. 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.
-
sip_transports_used
¶ [
linphone.SipTransports
] 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 tolinphone.Core.sip_transports
, the random port choosed by the system is returned.
-
sound_device_can_capture
()¶ Returns true if the specified sound device can capture sound.
Parameters: devid (string) – the device name as returned by linphone_core_get_sound_devices() Returns: Return type: bool
-
sound_device_can_playback
()¶ Returns true if the specified sound device can play sound.
Parameters: devid (string) – the device name as returned by linphone_core_get_sound_devices() Returns: Return type: bool
-
sound_devices
¶ [list of string] Get the available sound devices.
-
sound_resources_locked
()¶ Check if a call will need the sound resources.
Returns: Return type: bool
-
start_dtmf_stream
()¶ Special function to warm up dtmf feeback stream.
linphone.Core.stop_dtmf_stream()
must() be called before entering FG mode
-
static_picture
¶ [string] Set the path to the image file to stream when Static picture is set as the video device.
-
static_picture_fps
¶ [float] Set the frame rate for static picture.
-
stop_dtmf
()¶ Stops playing a dtmf started by
linphone.Core.play_dtmf()
.
-
stop_dtmf_stream
()¶ Special function to stop dtmf feed back function. Must be called before entering BG mode
-
stop_ringing
()¶ 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.
-
stun_server
¶ [string] Set the STUN server address to use when the firewall policy is set to STUN.
-
subscribe
()¶ 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 (linphone.Address) – the destination resource
- event (string) – the event name
- expires (int) – the whished duration of the subscription
- body (linphone.Content) – an optional body, may be None.
Returns: a LinphoneEvent holding the context of the created subcription.
Return type:
-
supported_file_formats
¶ [string] Returns a null terminated table of strings containing the file format extension supported for call recording.
-
terminate_all_calls
()¶ Terminates all the calls.
Returns: Return type: int
-
terminate_call
()¶ Terminates a call.
Parameters: the_call (linphone.Call) – the LinphoneCall object representing the call to be terminated. Returns: Return type: int
-
terminate_conference
()¶ Terminates the conference and the calls associated with it.
Returns: 0 if successful, -1 otherwise Return type: int
-
text_codecs
¶ [list of linphone.PayloadType] Returns the list of available text codecs. This list is unmodifiable. The ->data field of the MSList points a PayloadType structure holding the codec information. It is possible to make copy of the list with ms_list_copy() in order to modify it (such as the order of codecs).
-
text_port
¶ [int] Sets the UDP port used for text streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
-
transfer_call
()¶ 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: - call (linphone.Call) –
- url (string) –
Returns: Return type: int
-
transfer_call_to_another
()¶ Transfer a call to destination of another running call. This is used for attended transfer scenarios.
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: - call (linphone.Call) – a running call you want to transfer
- dest (linphone.Call) – a running call whose remote person will receive the transfer
Returns: Return type: int
-
tunnel
¶ [linphone.Tunnel] get tunnel instance if available
-
tunnel_available
()¶ True if tunnel support was compiled.
Returns: Return type: bool
-
update_call
()¶ Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore.
In this version this is limited to the following use cases:
In case no changes are requested through the LinphoneCallParams argument, then this argument can be omitted and set to None.
Parameters: - call (linphone.Call) – the call to be updated
- params (linphone.CallParams) – the new call parameters to use. (may be None)
Returns: 0 if successful, -1 otherwise.
Return type: int
-
upload_bandwidth
¶ [int] Sets maximum 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.
-
upload_log_collection
()¶ Upload the log collection to the configured server url.
-
upload_ptime
¶ [int] Set audio packetization time linphone will send (in absence of requirement from peer) A value of 0 stands for the current codec default packetization time.
-
upnp_available
()¶ Return the availability of uPnP.
Returns: true if uPnP is available otherwise return false. Return type: bool
-
upnp_external_ipaddress
¶ [string] 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).
-
upnp_state
¶ [int] Return the internal state of uPnP.
-
use_files
¶ [bool] Ask the core to stream audio from and to files, instead of using the soundcard.
-
use_info_for_dtmf
¶ [bool] Sets whether SIP INFO is to be used for sending digits.
-
use_preview_window
()¶ 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 (bool) – TRUE to use a separate window, FALSE to insert the preview in the remote video window.
-
use_rfc2833_for_dtmf
¶ [bool] Sets whether RFC2833 is to be used for sending digits.
-
user_certificates_path
¶ [string] Set the path to the directory storing the user’s x509 certificates (used by dtls)
-
user_data
¶ A place to store some user data.
-
verify_server_certificates
()¶ Specify whether the tls server certificate must be verified when connecting to a SIP/TLS server.
Parameters: yesno (bool) –
-
verify_server_cn
()¶ Specify whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.
Parameters: yesno (bool) –
-
version
¶ [string] Returns liblinphone’s version as a string.
-
video_adaptive_jittcomp_enabled
¶ [bool] Enable or disable the video adaptive jitter compensation.
-
video_capture_enabled
¶ [bool] Enable or disable video capture.
This function does not have any effect during calls. It just indicates the LinphoneCore to initiate future calls with video capture or not.
-
video_codecs
¶ [list of linphone.PayloadType] Sets the list of video codecs. The list is taken by the LinphoneCore thus the application should not free it. This list is made of struct PayloadType describing the codec parameters.
-
video_device
¶ [string] Sets the active video device.
-
video_devices
¶ [list of string] Get the available video capture devices.
-
video_display_enabled
¶ [bool] Enable or disable video display.
This function does not have any effect during calls. It just indicates the LinphoneCore to initiate future calls with video display or not.
-
video_display_filter
¶ [string] Set the name of the mediastreamer2 filter to be used for rendering video. This is for advanced users of the library, mainly to workaround hardware/driver bugs.
-
video_dscp
¶ [int] Set the DSCP field for outgoing video streams.
The DSCP defines the quality of service in IP packets.
-
video_jittcomp
¶ [int] Sets the nominal video jitter buffer size in milliseconds. The value takes effect immediately for all running and pending calls, if any. A value of 0 disables the jitter buffer.
-
video_multicast_addr
¶ [string] Use to set multicast address to be used for video stream.
-
video_multicast_enabled
¶ [bool] Use to enable multicast rtp for video stream. If enabled, outgoing calls put a multicast address from
linphone.Core.video_multicast_addr
into video cline. In case of outgoing call video stream is sent to this multicast address. For incoming calls behavior is unchanged.
-
video_multicast_ttl
¶ [int] Use to set multicast ttl to be used for video stream.
-
video_port
¶ [int] Sets the UDP port used for video streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
-
video_preview_enabled
¶ [bool] Controls video preview enablement.
Video preview refers to the action of displaying the local webcam image to the user while not in call.
-
video_source_reuse_enabled
¶ [bool] Enable or disable video source reuse when switching from preview to actual video call.
This source reuse is useful when you always display the preview, even before calls are initiated. By keeping the video source for the transition to a real video call, you will smooth out the source close/reopen cycle.
This function does not have any effect durfing calls. It just indicates the LinphoneCore 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.
-
zrtp_secrets_file
¶ [string] Set the path to the file storing the zrtp secrets cache.
-
-
class
linphone.
ErrorInfo
¶ Object representing full details about a signaling error or status. All LinphoneErrorInfo 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.
-
details
¶ [string] Provides additional information regarding the failure. With SIP protocol, the Reason and Warning headers are returned.
-
phrase
¶ [string] Get textual phrase from the error info. This is the text that is provided by the peer in the protocol (SIP).
-
protocol_code
¶ [int] Get the status code from the low level protocol (ex a SIP status code).
-
reason
¶ [int] Get reason code from the error info.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
Event
¶ Object representing an event state, which is subcribed or published.
-
accept_subscription
()¶ Accept an incoming subcription.
Returns: Return type: int
-
add_custom_header
()¶ Add a custom header to an outgoing susbscription or publish.
Parameters: - name (string) – header’s name
- value (string) – the header’s value.
-
core
¶ [linphone.Core] Returns back pointer to the LinphoneCore that created this LinphoneEvent
-
deny_subscription
()¶ Deny an incoming subscription with given reason.
Parameters: reason (int) – Returns: Return type: int
-
error_info
¶ [linphone.ErrorInfo] Get full details about an error occured.
-
from
¶ [linphone.Address] Get the from address of the subscription.
-
get_custom_header
()¶ Obtain the value of a given header for an incoming subscription.
Parameters: name (string) – header’s name Returns: the header’s value or None if such header doesn’t exist. Return type: string
-
name
¶ [string] Get the name of the event as specified in the event package RFC.
-
notify
()¶ Send a notification.
Parameters: body (linphone.Content) – an optional body containing the actual notification data. Returns: 0 if successful, -1 otherwise. Return type: int
-
publish_state
¶ [int] Get publish state. If the event object was not created by a publish mechanism, LinphonePublishNone is returned.
-
reason
¶ [int] Return reason code (in case of error state reached).
-
resource
¶ [linphone.Address] Get the resource address of the subscription or publish.
-
send_publish
()¶ Send a publish created by
linphone.Core.create_publish()
.Parameters: body (linphone.Content) – the new data to be published Returns: Return type: int
-
send_subscribe
()¶ Send a subscription previously created by
linphone.Core.create_subscribe()
.Parameters: body (linphone.Content) – optional content to attach with the subscription. Returns: 0 if successful, -1 otherwise. Return type: int
-
subscription_dir
¶ [int] Get subscription direction. If the object wasn’t created by a subscription mechanism, LinphoneSubscriptionInvalidDir is returned.
-
subscription_state
¶ [int] Get subscription state. If the event object was not created by a subscription mechanism, LinphoneSubscriptionNone is returned.
-
terminate
()¶ Terminate an incoming or outgoing subscription that was previously acccepted, or a previous publication. This function does not unref the object. The core will unref() if it does not need this object anymore.
For subscribed event, when the subscription is terminated normally or because of an error, the core will unref. For published events, no unref is performed. This is because it is allowed to re-publish an expired publish, as well as retry it in case of error.
-
update_publish
()¶ Update (refresh) a publish.
Parameters: body (linphone.Content) – the new data to be published Returns: Return type: int
-
update_subscribe
()¶ Update (refresh) an outgoing subscription.
Parameters: body (linphone.Content) – an optional body to include in the subscription update, may be None. Returns: Return type: int
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
Friend
¶ Represents a buddy, all presence actions like subscription and status change notification are performed on this object
-
address
¶ [linphone.Address] Set LinphoneAddress for this friend
-
core
¶ [linphone.Core] Returns the LinphoneCore object managing this friend, if any.
-
done
()¶ Commits modification made to the friend configuration.
-
edit
()¶ Starts editing a friend configuration.
Because friend configuration must be consistent, applications MUST call
linphone.Friend.edit()
before doing any attempts to modify friend configuration (such as address or subscription policy and so on). Once the modifications are done, then the application must calllinphone.Friend.done()
to commit the changes.
-
in_list
()¶ Check that the given friend is in a friend list.
Returns: TRUE if the friend is in a friend list, FALSE otherwise. Return type: bool
-
inc_subscribe_policy
¶ [int] Configure incoming subscription policy for this friend.
-
name
¶ [string] Set the display name for this friend
-
new
()¶ Contructor
Returns: a new empty LinphoneFriend Return type: linphone.Friend
-
new_with_address
()¶ Contructor same as
linphone.Friend.new()
+linphone.Friend.address
Parameters: addr (string) – a buddy address, must be a sip uri like sip: Returns: a new LinphoneFriend with address initialized Return type: linphone.Friend
-
presence_model
¶ [linphone.PresenceModel] Get the presence model of a friend
-
ref_key
¶ [string] Set the reference key of a friend.
-
subscribes_enabled
¶ [bool] Configure LinphoneFriend to subscribe to presence information
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
LpConfig
¶ The LpConfig object is used to manipulate a configuration file.
The format of the configuration file is a .ini like format:
Example:
-
clean_section
()¶ Removes every pair of key,value in a section and remove the section.
Parameters: section (string) –
-
dump_as_xml
()¶ Dumps the LpConfig as XML into a buffer
Returns: The buffer that contains the XML dump Return type: string
-
get_default_float
()¶ Retrieves a default configuration item as a float, given its section, key, and default value.
The default float value is returned if the config item isn’t found.
Parameters: - section (string) –
- key (string) –
- default_value (float) –
Returns: Return type: float
-
get_default_int
()¶ Retrieves a default configuration item as an integer, given its section, key, and default value.
The default integer value is returned if the config item isn’t found.
Parameters: - section (string) –
- key (string) –
- default_value (int) –
Returns: Return type: int
-
get_default_int64
()¶ 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 (string) –
- key (string) –
- default_value (64bits int) –
Returns: Return type: 64bits int
-
get_default_string
()¶ 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 (string) –
- key (string) –
- default_value (string) –
Returns: Return type: string
-
get_float
()¶ Retrieves a configuration item as a float, given its section, key, and default value.
The default float value is returned if the config item isn’t found.
Parameters: - section (string) –
- key (string) –
- default_value (float) –
Returns: Return type: float
-
get_int
()¶ Retrieves a configuration item as an integer, given its section, key, and default value.
The default integer value is returned if the config item isn’t found.
Parameters: - section (string) –
- key (string) –
- default_value (int) –
Returns: Return type: int
-
get_int64
()¶ 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 (string) –
- key (string) –
- default_value (64bits int) –
Returns: Return type: 64bits int
-
get_section_param_string
()¶ 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 (string) –
- key (string) –
- default_value (string) –
Returns: Return type: string
-
get_string
()¶ 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 (string) –
- key (string) –
- default_string (string) –
Returns: Return type: string
-
has_section
()¶ Returns 1 if a given section is present in the configuration.
Parameters: section (string) – Returns: Return type: int
-
new
()¶ Instantiates a LpConfig object from a user config file. The caller of this constructor owns a reference. lp_config_unref() must be called when this object is no longer needed.
Parameters: filename (string) – the filename of the config file to read to fill the instantiated LpConfig Returns: Return type: linphone.LpConfig
-
new_from_buffer
()¶ Instantiates a LpConfig object from a user provided buffer. The caller of this constructor owns a reference. lp_config_unref() must be called when this object is no longer needed.
Parameters: buffer (string) – the buffer from which the lpconfig will be retrieved. We expect the buffer to be null-terminated. Returns: Return type: linphone.LpConfig
-
new_with_factory
()¶ Instantiates a LpConfig object from a user config file and a factory config file. The caller of this constructor owns a reference. lp_config_unref() must be called when this object is no longer needed.
Parameters: - config_filename (string) – the filename of the user config file to read to fill the instantiated LpConfig
- factory_config_filename (string) – the filename of the factory config file to read to fill the instantiated LpConfig
Returns: Return type:
-
read_file
()¶ Reads a user config file and fill the LpConfig with the read config values.
Parameters: filename (string) – The filename of the config file to read to fill the LpConfig Returns: Return type: int
-
sections_names
¶ [list of string] Get the sections’ names in the lp config.
-
set_float
()¶ Sets a float config item
Parameters: - section (string) –
- key (string) –
- value (float) –
-
set_int
()¶ Sets an integer config item
Parameters: - section (string) –
- key (string) –
- value (int) –
-
set_int64
()¶ Sets a 64 bits integer config item
Parameters: - section (string) –
- key (string) –
- value (64bits int) –
-
set_int_hex
()¶ Sets an integer config item, but store it as hexadecimal
Parameters: - section (string) –
- key (string) –
- value (int) –
-
set_range
()¶ Sets a range config item
Parameters: - section (string) –
- key (string) –
- min_value (int) –
- max_value (int) –
-
set_string
()¶ Sets a string config item
Parameters: - section (string) –
- key (string) –
- value (string) –
-
sync
()¶ Writes the config file to disk.
Returns: Return type: int
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
PayloadType
¶ Object representing an RTP payload type.
-
channels
¶ [int] Get the number of channels.
-
mime_type
¶ [string] Get the mime type.
-
normal_bitrate
¶ [int] Get the normal bitrate in bits/s.
-
type
¶ [int] Get the type of payload.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
PresenceActivity
¶ Presence activity type holding information about a presence activity.
-
description
¶ [string] Sets the description of a presence activity.
-
new
()¶ Creates a presence activity.
Parameters: - acttype (int) – The LinphonePresenceActivityType to set for the activity.
- description (string) – 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 presence activity, None on error.
Return type:
-
to_string
()¶ Gets the string representation of a presence activity. The returned string is to be freed by calling ms_free().
Returns: A pointer a dynamically allocated string representing the given activity. Return type: string
-
type
¶ [int] Sets the type of activity of a presence activity.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
PresenceModel
¶ Presence model type holding information about the presence of a person.
-
activity
¶ [linphone.PresenceActivity] Gets the first activity of a presence model (there is usually only one).
-
add_activity
()¶ Adds an activity to a presence model.
Parameters: activity (linphone.PresenceActivity) – The LinphonePresenceActivity object to add to the model. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
add_note
()¶ Adds a note to a presence model. 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.
Parameters: - note_content (string) – The note to be added to the presence model.
- lang (string) – 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.
Return type: int
-
add_person
()¶ Adds a person to a presence model.
Parameters: person (linphone.PresencePerson) – The LinphonePresencePerson object to add to the model. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
add_service
()¶ Adds a service to a presence model.
Parameters: service (linphone.PresenceService) – The LinphonePresenceService object to add to the model. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
basic_status
¶ [int] Sets the basic status of a presence model.
-
clear_activities
()¶ Clears the activities of a presence model.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
clear_notes
()¶ Clears all the notes of a presence model.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
clear_persons
()¶ Clears the persons of a presence model.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
clear_services
()¶ Clears the services of a presence model.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
contact
¶ [string] Sets the contact of a presence model.
-
get_note
()¶ Gets the first note of a presence model (there is usually only one).
Parameters: lang (string) – 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 LinphonePresenceNote object if successful, None otherwise. Return type: linphone.PresenceNote
-
get_nth_activity
()¶ Gets the nth activity of a presence model.
Parameters: idx (unsigned int) – The index of the activity to get (the first activity having the index 0). Returns: A pointer to a LinphonePresenceActivity object if successful, None otherwise. Return type: linphone.PresenceActivity
-
get_nth_person
()¶ Gets the nth person of a presence model.
Parameters: idx (unsigned int) – The index of the person to get (the first person having the index 0). Returns: A pointer to a LinphonePresencePerson object if successful, None otherwise. Return type: linphone.PresencePerson
-
get_nth_service
()¶ Gets the nth service of a presence model.
Parameters: idx (unsigned int) – The index of the service to get (the first service having the index 0). Returns: A pointer to a LinphonePresenceService object if successful, None otherwise. Return type: linphone.PresenceService
-
nb_activities
¶ [unsigned int] Gets the number of activities included in the presence model.
-
nb_persons
¶ [unsigned int] Gets the number of persons included in the presence model.
-
nb_services
¶ [unsigned int] Gets the number of services included in the presence model.
-
new
()¶ Creates a default presence model.
Returns: The created presence model, None on error. Return type: linphone.PresenceModel
-
new_with_activity
()¶ Creates a presence model specifying an activity.
Parameters: - activity (int) – The activity to set for the created presence model.
- description (string) – An additional description of the activity (mainly useful for the ‘other’ activity). Set it to None to not add a description.
Returns: The created presence model, or None if an error occured.
Return type:
-
new_with_activity_and_note
()¶ Creates a presence model specifying an activity and adding a note.
Parameters: - activity (int) – The activity to set for the created presence model.
- description (string) – An additional description of the activity (mainly useful for the ‘other’ activity). Set it to None to not add a description.
- note (string) – An additional note giving additional information about the contact presence.
- lang (string) – 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 presence model, or None if an error occured.
Return type:
-
set_activity
()¶ Sets the activity of a presence model (limits to only one activity). 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
linphone.PresenceModel.basic_status
,linphone.PresenceModel.clear_activities()
andlinphone.PresenceModel.add_activity()
.Parameters: - activity (int) – The LinphonePresenceActivityType to set for the model.
- description (string) – 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.
Return type: int
-
timestamp
¶ [DateTime] Gets the timestamp of a presence model.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
PresenceNote
¶ Presence note type holding information about a presence note.
-
content
¶ [string] Sets the content of a presence note.
-
lang
¶ [string] Sets the language of a presence note.
-
new
()¶ Creates a presence note.
Parameters: - content (string) – The content of the note to be created.
- lang (string) – The language of the note to be created. Can be None if no language is to be specified for the note.
Returns: The created presence note, None on error.
Return type:
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
PresencePerson
¶ Presence person holding information about a presence person.
-
add_activities_note
()¶ Adds an activities note to a presence person.
Parameters: note (linphone.PresenceNote) – The LinphonePresenceNote object to add to the person. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
add_activity
()¶ Adds an activity to a presence person.
Parameters: activity (linphone.PresenceActivity) – The LinphonePresenceActivity object to add to the person. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
add_note
()¶ Adds a note to a presence person.
Parameters: note (linphone.PresenceNote) – The LinphonePresenceNote object to add to the person. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
clear_activities
()¶ Clears the activities of a presence person.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
clear_activities_notes
()¶ Clears the activities notes of a presence person.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
clear_notes
()¶ Clears the notes of a presence person.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
get_nth_activities_note
()¶ Gets the nth activities note of a presence person.
Parameters: idx (unsigned int) – The index of the activities note to get (the first note having the index 0). Returns: A pointer to a LinphonePresenceNote object if successful, None otherwise. Return type: linphone.PresenceNote
-
get_nth_activity
()¶ Gets the nth activity of a presence person.
Parameters: idx (unsigned int) – The index of the activity to get (the first activity having the index 0). Returns: A pointer to a LinphonePresenceActivity object if successful, None otherwise. Return type: linphone.PresenceActivity
-
get_nth_note
()¶ Gets the nth note of a presence person.
Parameters: idx (unsigned int) – The index of the note to get (the first note having the index 0). Returns: A pointer to a LinphonePresenceNote object if successful, None otherwise. Return type: linphone.PresenceNote
-
id
¶ [string] Sets the id of a presence person.
-
nb_activities
¶ [unsigned int] Gets the number of activities included in the presence person.
-
nb_activities_notes
¶ [unsigned int] Gets the number of activities notes included in the presence person.
-
nb_notes
¶ [unsigned int] Gets the number of notes included in the presence person.
-
new
()¶ Creates a presence person.
Parameters: id (string) – The id of the presence person to be created. Can be None to generate it automatically. Returns: The created presence person, None on error. Return type: linphone.PresencePerson
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
PresenceService
¶ Presence service type holding information about a presence service.
-
add_note
()¶ Adds a note to a presence service.
Parameters: note (linphone.PresenceNote) – The LinphonePresenceNote object to add to the service. Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
basic_status
¶ [int] Sets the basic status of a presence service.
-
clear_notes
()¶ Clears the notes of a presence service.
Returns: 0 if successful, a value < 0 in case of error. Return type: int
-
contact
¶ [string] Sets the contact of a presence service.
-
get_nth_note
()¶ Gets the nth note of a presence service.
Parameters: idx (unsigned int) – The index of the note to get (the first note having the index 0). Returns: A pointer to a LinphonePresenceNote object if successful, None otherwise. Return type: linphone.PresenceNote
-
id
¶ [string] Sets the id of a presence service.
-
nb_notes
¶ [unsigned int] Gets the number of notes included in the presence service.
-
new
()¶ Creates a presence service. The created presence service has the basic status ‘closed’.
Parameters: - id (string) – The id of the presence service to be created. Can be None to generate it automatically.
- basic_status (int) – The LinphonePresenceBasicStatus to set for the LinphonePresenceService object.
- contact (string) – The contact string to set.
Returns: The created presence service, None on error.
Return type:
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
ProxyConfig
¶ The LinphoneProxyConfig object represents a proxy configuration to be used by the LinphoneCore object. Its fields must not be used directly in favour of the accessors methods. Once created and filled properly the LinphoneProxyConfig can be given to LinphoneCore with
linphone.Core.add_proxy_config()
. This will automatically triggers the registration, if enabled.The proxy configuration are persistent to restarts because they are saved in the configuration file. As a consequence, after linphone_core_new() there might already be a list of configured proxy that can be examined with
linphone.Core.proxy_config_list
.The default proxy (see linphone_core_set_default_proxy() ) is the one of the list that is used by default for calls.
-
avpf_mode
¶ [int] Enable the use of RTCP feedback (also known as AVPF profile).
-
avpf_rr_interval
¶ [unsigned int] Set the interval between regular RTCP reports when using AVPF/SAVPF.
-
contact_parameters
¶ [string] Set optional contact parameters that will be added to the contact information sent in the registration. :50421>;apple-push-id=43143-DFE23F-2323-FA2232.
-
contact_uri_parameters
¶ [string] Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI. :50421;apple-push-id=43143-DFE23F-2323-FA2232>.
-
core
¶ [linphone.Core] Get the LinphoneCore object to which is associated the LinphoneProxyConfig .
-
dial_escape_plus
¶ [bool] Sets whether liblinphone should replace + by international calling prefix in dialed numbers (passed to
linphone.Core.invite()
).
-
dial_prefix
¶ [string] Sets a dialing prefix to be automatically prepended when inviting a number with
linphone.Core.invite()
; This dialing prefix shall usually be the country code of the country where the user is living, without +.
-
domain
¶ [string] Get the domain name of the given proxy config.
-
done
()¶ Commits modification made to the proxy configuration.
Returns: Return type: int
-
edit
()¶ Starts editing a proxy configuration.
Because proxy configuration must be consistent, applications MUST call
linphone.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 calllinphone.ProxyConfig.done()
to commit the changes.
-
error
¶ [int] Get the reason why registration failed when the proxy config state is LinphoneRegistrationFailed.
-
error_info
¶ [linphone.ErrorInfo] Get detailed information why registration failed when the proxy config state is LinphoneRegistrationFailed.
-
expires
¶ [int] Sets the registration expiration time in seconds.
-
find_auth_info
()¶ Find authentication info matching proxy config, if any, similarly to
linphone.Core.find_auth_info()
.Returns: a #LinphoneAuthInfo matching proxy config criteria if possible, None if nothing can be found. Return type: linphone._LinphoneAuthInfo
-
get_custom_header
()¶ Obtain the value of a header sent by the server in last answer to REGISTER.
Parameters: header_name (string) – the header name for which to fetch corresponding value Returns: the value of the queried header. Return type: string
-
identity_address
¶ [linphone.Address] Sets the user identity as a SIP address.
This identity is normally formed with display name, username and domain, such as: Alice <sip: > The REGISTER messages will have from and to set to this identity.
-
is_phone_number
()¶ Detect if the given input is a phone number or not.
Parameters: username (string) – string to parse. Returns: TRUE if input is a phone number, FALSE otherwise. Return type: bool
-
normalize_phone_number
()¶ Normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 or +33888444222 depending on the LinphoneProxyConfig object. However this argument is OPTIONNAL and if not provided, a default one will be used. This function will always generate a normalized username; if input is not a phone number, output will be a copy of input.
Parameters: username (string) – the string to parse Returns: None if invalid phone number, normalized phone number from username input otherwise. Return type: string
-
normalize_sip_uri
()¶ Normalize a human readable sip uri into a fully qualified LinphoneAddress. A sip address should look like DisplayName <sip:username@domain:port> . Basically this function performs the following tasks
The result is a syntactically correct SIP address.
Parameters: username (string) – the string to parse Returns: None if invalid input, normalized sip address otherwise. Return type: linphone.Address
-
pause_register
()¶ 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.network_reachable`(lc,TRUE) will always request the proxy configs to refresh their registrations. The refreshing operations can be resumed with :py:meth:`linphone.ProxyConfig.refresh_register
.
-
publish_enabled
¶ [bool] Indicates either or not, PUBLISH must be issued for this LinphoneProxyConfig . In case this LinphoneProxyConfig has been added to LinphoneCore , follows the
linphone.ProxyConfig.edit()
rule.
-
publish_expires
¶ [int] Set the publish expiration time in second.
-
quality_reporting_collector
¶ [string] Set 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.
-
quality_reporting_enabled
¶ [bool] Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035.
-
quality_reporting_interval
¶ [unsigned int] Set the interval between 2 interval reports sending when using quality reporting. If call exceed interval size, an interval report will be sent to the collector. On call termination, a session report will be sent for the remaining period. Value must be 0 (disabled) or positive.
-
realm
¶ [string] Set the realm of the given proxy config.
-
refresh_register
()¶ Refresh a proxy registration. This is useful if for example you resuming from suspend, thus IP address may have changed.
-
register_enabled
¶ [bool] Indicates either or not, REGISTRATION must be issued for this LinphoneProxyConfig . In case this LinphoneProxyConfig has been added to LinphoneCore , follows the
linphone.ProxyConfig.edit()
rule.
-
route
¶ [string] 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 linphone_core_set_default_proxy() ). -1 if route is invalid, 0 otherwise.
-
server_addr
¶ [string] Sets the proxy address
Examples of valid sip proxy address are:
-
set_custom_header
()¶ Set the value of a custom header sent to the server in REGISTERs request.
Parameters: - header_name (string) – the header name
- header_value (string) – the header’s value
-
state
¶ [int] Get the registration state of the given proxy config.
-
transport
¶ [string] Get the transport from either service route, route or addr.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
SipTransports
¶ Object representing the SIP transports: its UDP, TCP, TLS and DTLS ports.
-
dtls_port
¶ [int] The port used for DTLS SIP transport
-
tcp_port
¶ [int] The port used for TCP SIP transport
-
tls_port
¶ [int] The port used for TLS SIP transport
-
udp_port
¶ [int] The port used for UDP SIP transport
-
-
class
linphone.
VideoSize
¶ Object representing the size of a video: its width and its height in pixels.
-
height
¶ [int] The height of the video
-
width
¶ [int] The width of the video
-
-
class
linphone.
XmlRpcRequest
¶ The LinphoneXmlRpcRequest object representing a XML-RPC request to be sent.
-
add_int_arg
()¶ Add an integer argument to an XML-RPC request.
Parameters: value (int) – The integer value of the added argument.
-
add_string_arg
()¶ Add a string argument to an XML-RPC request.
Parameters: value (string) – The string value of the added argument.
-
callbacks
¶ [linphone.XmlRpcRequestCbs] Get the LinphoneXmlRpcRequestCbs object associated with a LinphoneXmlRpcRequest.
-
content
¶ [string] Get the content of the XML-RPC request.
-
int_response
¶ [int] Get the response to an XML-RPC request sent with
linphone.XmlRpcSession.send_request()
and returning an integer response.
-
new
()¶ Create a new LinphoneXmlRpcRequest object.
Parameters: - method (string) – The XML-RPC method to call.
- return_type (int) – The expected XML-RPC response type.
Returns: A new LinphoneXmlRpcRequest object.
Return type:
-
status
¶ [int] Get the status of the XML-RPC request.
-
string_response
¶ [string] Get the response to an XML-RPC request sent with
linphone.XmlRpcSession.send_request()
and returning a string response.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
XmlRpcRequestCbs
¶ An object to handle the callbacks for handling the LinphoneXmlRpcRequest operations.
-
response
¶ [callable] Set the response callback.
-
user_data
¶ A place to store some user data.
-
-
class
linphone.
XmlRpcSession
¶ The LinphoneXmlRpcSession object used to send XML-RPC requests and handle their responses.
-
new
()¶ Create a new LinphoneXmlRpcSession object.
Parameters: - core (linphone.Core) – The LinphoneCore object used to send the XML-RPC requests.
- url (string) – The URL of the XML-RPC server to send the XML-RPC requests to.
Returns: A new LinphoneXmlRpcSession object.
Return type:
-
send_request
()¶ Send an XML-RPC request.
Parameters: request (linphone.XmlRpcRequest) – The LinphoneXmlRpcRequest to be sent.
-
user_data
¶ A place to store some user data.
-
-
linphone.
__version__
= '3.9.1'¶