Core
public class Core : LinphoneObject
Main object to instanciate and on which to keep a reference.
This object is the first object to instanciante, and will allow you to perform
all kind of tasks. To create it, use either Factory.createCore() or
Factory.createCoreWithConfig(), see Config
for more information about factory
and default config. On some platforms like Android or iOS you will need to give
it the Context of your application.
Once the Core
is in state Ready
, use start(). It will then go to state On
and from that you can start using it for calls and chat messages. It is
recommended to add a LinphoneCoreCbs listener using addCallbacks() to it to
monitor different events.
To be able to receive events from the network, you must schedule a call
iterate() often, like every 20ms. On Android & iOS isAutoIterateEnabled() is
enabled by default so you don’t have to worry about that unless you disable it
using linphone_core_set_auto_iterate_enabled or by setting in the [misc]
section of your configuration auto_iterate=0. - Warning: Our API isn’t
thread-safe but also isn’t blocking, so it is strongly recommend to always call
our methods from the main thread.
Once you don’t need it anymore, call stop() and release the reference on it so
it can gracefully shutdown.
-
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> Core
-
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Get the UIView in which the video is be rendered. Use nativeVideoWindowId for direct pointer management.
Declaration
Swift
public var nativeVideoWindow: UIView? { get set }
-
-
Get the UIView in which the camera preview is be rendered. Use nativePreviewWindowId for direct pointer management.
Declaration
Swift
public var nativePreviewWindow: UIView? { get set }
-
-
Used to notify if log collection upload have been succesfully delivered or not.
See moreDeclaration
Swift
public enum LogCollectionUploadState : Int
-
Declaration
Swift
public func addDelegate(delegate: CoreDelegate)
-
Declaration
Swift
public func removeDelegate(delegate: CoreDelegate)
-
Compress the log collection in a single file.
Declaration
Swift
public static func compressLogCollection() -> String
Return Value
The path of the compressed log collection file (to be freed calling ms_free()).
-
Enable the linphone core log collection to upload logs on a server.
Declaration
Swift
public static func enableLogCollection(state: LogCollectionState)
Parameters
state
LogCollectionState
value telling whether to enable log collection or not. -
Get the max file size in bytes of the files used for log collection.
Declaration
Swift
public static var getLogCollectionMaxFileSize: Int { get }
Return Value
The max file size in bytes of the files used for log collection.
-
Get the path where the log files will be written for log collection.
Declaration
Swift
public static var getLogCollectionPath: String { get }
Return Value
The path where the log files will be written.
-
Get the prefix of the filenames that will be used for log collection.
Declaration
Swift
public static var getLogCollectionPrefix: String { get }
Return Value
The prefix of the filenames used for log collection.
-
Are PostQuantum algoritms available.
Declaration
Swift
public static var getPostQuantumAvailable: Bool { get }
Return Value
true if Post Quantum algorithms are available false otherwise
-
Returns liblinphone’s version as a string.
Declaration
Swift
public static var getVersion: String { get }
Return Value
the current version of the
Core
-
Tells whether the linphone core log collection is enabled.
Declaration
Swift
public static func logCollectionEnabled() -> LogCollectionState
Return Value
The
LogCollectionState
of theCore
log collection. -
Reset the log collection by removing the log files.
Declaration
Swift
public static func resetLogCollection()
-
Enable logs serialization (output logs from either the thread that creates the linphone core or the thread that calls iterate()). Must be called before creating the linphone core.
Declaration
Swift
public static func serializeLogs()
-
Set the max file size in bytes of the files used for log collection. Warning: this function should only not be used to change size dynamically but instead only before calling enableLogCollection(). If you increase max size on runtime, logs chronological order COULD be broken.
Declaration
Swift
public static func setLogCollectionMaxFileSize(size: Int)
Parameters
size
The max file size in bytes of the files used for log collection.
-
Set the path of a directory where the log files will be written for log collection. When log collection is enabled, the function will close the file with the current prefix in the old path and it will open the new file with current prefix in the new path. If you need to change the path and the file at the same time, then you should deactivate log collection with enableLogCollection() before doing modifications.
Declaration
Swift
public static func setLogCollectionPath(path: String)
Parameters
path
The path where the log files will be written.
-
Set the prefix of the filenames that will be used for log collection. When log collection is enabled, the function will close the old file and it will open the new one in the current path. If you need to change the path and the file at the same time, then you should deactivate log collection with enableLogCollection() before doing modifications.
Declaration
Swift
public static func setLogCollectionPrefix(prefix: String)
Parameters
prefix
The prefix to use for the filenames for log collection.
-
True if tunnel support was compiled.
Declaration
Swift
public static func tunnelAvailable() -> Bool
Return Value
true if library was built with tunnel, false otherwise
-
Return the availability of uPnP.
Declaration
Swift
public static func upnpAvailable() -> Bool
Return Value
true if uPnP is available otherwise return false.
-
Tells whether VCARD support is builtin.
Declaration
Swift
public static func vcardSupported() -> Bool
Return Value
true if VCARD is supported, false otherwise.
-
Set the
AccountCreator
backend on theCore
.Declaration
Swift
public var accountCreatorBackend: AccountCreatorBackend { get set }
Return Value
-
Set the
AccountCreator
url on theCore
.Declaration
Swift
public var accountCreatorUrl: String { get set }
Return Value
url The URL to reach.
-
Returns an unmodifiable list of entered accounts.
Declaration
Swift
public var accountList: [Account] { get }
Return Value
-
Sets adaptive rate algorithm. It will be used for each new calls starting from now. Calls already started will not be updated.
See
See also: setAdaptiveRateAlgorithm()Declaration
Swift
public var adaptiveRateAlgorithm: String { get set }
Return Value
the adaptive rate algorithm. Currently two values are supported: ‘advanced’, which is the default value, or ‘basic’.
-
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.
See
See also: enableAdaptiveRateControl()Declaration
Swift
public var adaptiveRateControlEnabled: Bool { get set }
Return Value
true if adaptive rate control is enabled, false otherwise
-
Enable or disable the audio adaptive jitter compensation.
Declaration
Swift
public var audioAdaptiveJittcompEnabled: Bool { get set }
Return Value
true if the audio adaptive jitter compensation is enabled, false otherwise.
-
Returns a list of audio devices, with only the first device for each type To have the list of all audio devices, use getExtendedAudioDevices()
Declaration
Swift
public var audioDevices: [AudioDevice] { get }
Return Value
A list with the first
AudioDevice
of each type -
Set the DSCP field for outgoing audio streams. The DSCP defines the quality of service in IP packets.
Declaration
Swift
public var audioDscp: Int { get set }
Return Value
The current DSCP value
-
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.
Declaration
Swift
public var audioJittcomp: Int { get set }
Return Value
The nominal audio jitter buffer size in milliseconds
-
Use to set multicast address to be used for audio stream.
Declaration
Swift
public var audioMulticastAddr: String { get }
Return Value
an ipv4/6 multicast address or default value.
-
Declaration
Swift
public func setAudiomulticastaddr(newValue: String) throws
-
Use to enable multicast rtp for audio stream. If enabled, outgoing calls put a multicast address from getVideoMulticastAddr() into audio cline. In case of outgoing call audio stream is sent to this multicast address. For incoming calls behavior is unchanged.
Declaration
Swift
public var audioMulticastEnabled: Bool { get set }
Return Value
true if subsequent calls will propose multicast ip set by setAudioMulticastAddr()
-
Use to set multicast ttl to be used for audio stream.
Declaration
Swift
public var audioMulticastTtl: Int { get }
Return Value
a time to leave value
-
Declaration
Swift
public func setAudiomulticastttl(newValue: Int) throws
-
Redefine the list of the available payload types.
Declaration
Swift
public var audioPayloadTypes: [PayloadType] { get set }
Return Value
A freshly allocated list of the available payload types. The list must be destroyed with bctbx_list_free() after usage. The elements of the list haven’t to be unref.
-
Sets the UDP port used for audio streaming. A value of -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
Declaration
Swift
public var audioPort: Int { get set }
Return Value
The UDP port used for audio streaming
-
Auto download files attach to a chat message if it’s content type matches the one we use for icalendars.
Declaration
Swift
public var autoDownloadIcalendarsEnabled: Bool { get set }
Return Value
true if icalendars will be automatically downloaded, false otherwise.
-
Auto download files attach to a chat message if it’s content type matches the one we use for voice recordings.
Declaration
Swift
public var autoDownloadVoiceRecordingsEnabled: Bool { get set }
Return Value
true if voice recordings will be automatically downloaded, false otherwise.
-
Sets the timer used to schedule the call to core.iterate() method when in background (Android only).
Declaration
Swift
public var autoIterateBackgroundSchedule: Int { get set }
Return Value
The timing in milliseconds used to schedule the call while in background (default is 500ms).
-
Enable or disable the automatic schedule of iterate() method on Android & iOS. If enabled, iterate() will be called on the main thread every 20ms automatically. If disabled, it is the application that must do this job.
Declaration
Swift
public var autoIterateEnabled: Bool { get set }
Return Value
true if iterate() is scheduled automatically, false otherwise
-
Sets the timer used to schedule the call to core.iterate() method when in foreground (Android only).
Declaration
Swift
public var autoIterateForegroundSchedule: Int { get set }
Return Value
The timing in milliseconds used to schedule the call while in foreground (default is 20ms).
-
Enables the automatic sending of 180 Ringing when receiving a call.
Declaration
Swift
public var autoSendRingingEnabled: Bool { get set }
Return Value
true if the automatic sending of 180 Ringing is enabled, false otherwise.
-
Enables or disables automatic http proxy detection.
Declaration
Swift
public var automaticHttpProxyDetectionEnabled: Bool { get set }
Return Value
true if automatic http proxy is enabled or false.
-
Enable RTCP feedback (also known as RTP/AVPF profile). Setting
Default
is equivalent to LinphoneAVPFDisabled. This setting can be overriden perProxyConfig
with ProxyConfig.setAvpfMode(). 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.Declaration
Swift
public var avpfMode: AVPFMode { get set }
Return Value
The current
AVPFMode
mode -
Set the avpf report interval in seconds. This value can be overriden by the proxy config using ProxyConfig.setAvpfRrInterval().
Declaration
Swift
public var avpfRrInterval: Int { get set }
Return Value
The current AVPF report interval in seconds
-
Sets the database filename where call logs will be stored. If the file does not exist, it will be created.
- deprecated: 07/12/2021: Use only for migration purposes Gets the database filename where call logs will be stored.
- deprecated: 07/12/2021
Declaration
Swift
public var callLogsDatabasePath: String { get set }
Return Value
filesystem path.
-
Enables or disables call tone indications. This value is taken into account from next tine call parameters are created. This feature can also be enabled per-call using
CallParams
. Check whether tone indications of calls are enabled.Declaration
Swift
public var callToneIndicationsEnabled: Bool { get set }
Return Value
true if call tone indications are enabled
-
Special function to enable the callkit.
Declaration
Swift
public var callkitEnabled: Bool { get set }
Return Value
true if callkit is enabled, false otherwise.
-
Gets the current list of calls. Note that this list is read-only and might be changed by the core after a function call to iterate(). Similarly the
Call
objects inside it might be destroyed without prior notice. To hold references toCall
object into your program, you must use linphone_call_ref.Declaration
Swift
public var calls: [Call] { get }
Return Value
A list of
Call
-
Get the number of Call.
Declaration
Swift
public var callsNb: Int { get }
Return Value
The current number of calls
-
Get the camera sensor rotation. This is needed on some mobile platforms to get the number of degrees the camera sensor is rotated relative to the screen.
Declaration
Swift
public var cameraSensorRotation: Int { get }
Return Value
The camera sensor rotation in degrees (0 to 360) or -1 if it could not be retrieved
-
Define whether capability negotiation (RFC5939) is supported. Check if the capability negotiation (RFC5939) is supported or not.
Declaration
Swift
public var capabilityNegociationEnabled: Bool { get set }
Return Value
true if capability negotiation is supported; false otherwise.
-
Define whether capability negotiation (RFC5939) reINVITE is enabled.
Declaration
Swift
public var capabilityNegotiationReinviteEnabled: Bool { get set }
Return Value
true if capability negotiation reINVITE is enabled; false otherwise.
-
Sets the sound device used for capture.
Declaration
Swift
public var captureDevice: String { get }
Return Value
The name of the currently assigned sound device for capture.
-
Declaration
Swift
public func setCapturedevice(newValue: String) throws
-
Returns whether chat is enabled.
Declaration
Swift
public var chatEnabled: Bool { get }
Return Value
true if chat is enabled, false otherwise
-
Sets whether chat messages grouping is enabled or not. Set [sip] chat_messages_aggregation in your configuration file for the timer, default is 500ms.
Declaration
Swift
public var chatMessagesAggregationEnabled: Bool { get set }
Return Value
true if received chat messages will be notified as a bundle, false otherwise.
-
Returns a list of chat rooms.
Declaration
Swift
public var chatRooms: [ChatRoom] { get }
Return Value
List of chat rooms.
-
Get a pointer on the internal conference object.
Declaration
Swift
public var conference: Conference? { get }
Return Value
A pointer on
Conference
or nil if no conference are going on. -
Enable sending conference invitations in the chat message body instead of as a file attachment.
Declaration
Swift
public var conferenceIcsInMessageBodyEnabled: Bool { get set }
Return Value
true if ICS will be sent in the message body (by default), false if it will be sent as a file attachment.
-
Retrieve the list of conference information on DB.
Declaration
Swift
public var conferenceInformationList: [ConferenceInfo] { get }
Return Value
The list of conference infos .
-
Get the set input volume of the local participant.
Declaration
Swift
public var conferenceLocalInputVolume: Float { get }
Return Value
A value inside [0.0 ; 1.0]
-
Select whether the default conference participant list is open or closed.
Declaration
Swift
public var conferenceParticipantListType: ConferenceParticipantListType { get set }
Return Value
A
ConferenceParticipantListType
participant list type -
Enable the conference server feature. This has the effect to listen of the conference factory uri to create new conferences when receiving INVITE messages there.
Declaration
Swift
public var conferenceServerEnabled: Bool { get set }
Return Value
A boolean value telling whether the conference server feature is enabled or not
-
Get the number of participants including me, if it in, in the running conference. The local participant is included in the count only if it is in the conference.
- deprecated: 16/04/2021 Use Conference.getParticipantCount() instead.
Declaration
Swift
@available(*, deprecated) public var conferenceSize: Int { get }
Return Value
The number of participants including me, if it in.
-
Set my consolidated presence.
Declaration
Swift
public var consolidatedPresence: ConsolidatedPresence { get set }
Return Value
My
ConsolidatedPresence
presence -
Gets the current call.
Declaration
Swift
public var currentCall: Call? { get }
Return Value
The current call or nil if no call is running.
-
Get the remote address of the current call.
Declaration
Swift
public var currentCallRemoteAddress: Address? { get }
Return Value
The remote address of the current call or nil if there is no current call.
-
Gets the current LinphoneCoreCbs. This is meant only to be called from a callback to be able to get the user_data associated with the LinphoneCoreCbs that is calling the callback.
Declaration
Swift
public var currentDelegate: CoreDelegate? { get }
Return Value
the LinphoneCoreCbs that has called the last callback
-
Get the effective video definition provided by the camera for the captured video. When preview is disabled or not yet started this function returns a 0x0 video definition.
See
See also: setPreviewVideoDefinition()Declaration
Swift
public var currentPreviewVideoDefinition: VideoDefinition? { get }
Return Value
The captured
VideoDefinition
. -
Sets the default account. This default account must be part of the list of already entered LinphoneAccount. Toggling it as default will make
Core
use the identity associated with the account in all incoming and outgoing calls.Declaration
Swift
public var defaultAccount: Account? { get set }
Return Value
The default account.
-
Set the default conference layout.
Declaration
Swift
public var defaultConferenceLayout: ConferenceLayout { get set }
Return Value
conference layout
-
Set the default ephemeral lifetime in seconds.
Declaration
Swift
public var defaultEphemeralLifetime: Int { get set }
Return Value
lifetime of ephemeral messages in seconds
-
Retrieves the first list of
Friend
from the core.Declaration
Swift
public var defaultFriendList: FriendList? { get }
Return Value
the first
FriendList
object or nil. -
Sets the given
AudioDevice
as default input for next calls.Declaration
Swift
public var defaultInputAudioDevice: AudioDevice? { get set }
Return Value
The default input audio device
-
Sets the given
AudioDevice
as default output for next calls.Declaration
Swift
public var defaultOutputAudioDevice: AudioDevice? { get set }
Return Value
The default output audio device
-
Sets the default proxy. This default proxy must be part of the list of already entered LinphoneProxyConfig. Toggling it as default will make
Core
use the identity associated with the proxy configuration in all incoming and outgoing calls.Declaration
Swift
public var defaultProxyConfig: ProxyConfig? { get set }
Return Value
The default proxy configuration.
-
Get the name of the default mediastreamer2 filter used for rendering video on the current platform. This is for advanced users of the library, mainly to expose mediastreamer video filter name and status.
Declaration
Swift
public var defaultVideoDisplayFilter: String { get }
Return Value
The default video display filter.
-
Set the in delayed timeout in seconds. After this timeout period, a delayed call (internal call initialisation or resolution) is resumed.
Declaration
Swift
public var delayedTimeout: Int { get set }
Return Value
The current delayed timeout in seconds
-
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. IOS supported values are 0 for UIInterfaceOrientationPortrait and 270 for UIInterfaceOrientationLandscapeRight.
See
See also: setDeviceRotation()Declaration
Swift
public var deviceRotation: Int { get set }
Return Value
The current device orientation
-
Setup a new digest authentication policy applicable for SIP and HTTP. Setup a new digest authentication policy applicable for SIP and HTTP.
Declaration
Swift
public var digestAuthenticationPolicy: DigestAuthenticationPolicy? { get set }
Return Value
The current digest authentication policy.
-
Calling this method with disable=true will cause the microhone to be completely deactivated when muted, when given possible by the implementation on the platform on which liblinphone is running. Otherwise, sound recording remains active but silence is sent instead of recorded audio. Playback sound will be briefly interrupted while the audio is reconfigured. Currently only implemented for IOS, it will also disable Apple’s microphone recording indicator when microphone is muted.
Declaration
Swift
public var disableRecordOnMute: Bool { get set }
Return Value
True if you wish to entirely stop the audio recording when muting the microphone.
-
Enable or disable DNS search (use of local domain if the fully qualified name did return results).
Declaration
Swift
public var dnsSearchEnabled: Bool { get set }
Return Value
true if DNS search is enabled, false if disabled.
-
Forces liblinphone to use the supplied list of dns servers, instead of system’s ones.
Declaration
Swift
public var dnsServers: [String] { get set }
Parameters
servers
A list of strings containing the IP addresses of DNS servers to be used. Setting to nil restores default behaviour, which is to use the DNS server list provided by the system. The list is copied internally.
-
Forces liblinphone to use the supplied list of dns servers, instead of system’s ones and set dns_set_by_app at true or false according to value of servers list.
Declaration
Swift
public var dnsServersApp: [String] { get set }
Parameters
servers
A list of strings containing the IP addresses of DNS servers to be used. Setting to nil restores default behaviour, which is to use the DNS server list provided by the system. The list is copied internally.
-
Tells if the DNS was set by an application.
Declaration
Swift
public var dnsSetByApp: Bool { get }
Return Value
true if DNS was set by app, false otherwise.
-
Enable or disable DNS SRV resolution.
Declaration
Swift
public var dnsSrvEnabled: Bool { get set }
Return Value
true if DNS SRV resolution is enabled, false if disabled.
-
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.
Declaration
Swift
public var downloadBandwidth: Int { get set }
Return Value
the download bandiwdth in kbits/s, 0 for infinite
-
Set audio packetization time linphone expects to receive from peer. A value of zero means that ptime is not specified.
Declaration
Swift
public var downloadPtime: Int { get set }
Return Value
the download packetization time set
-
Gets the currently stored calibration delay for the software echo cancellation.
Declaration
Swift
public var echoCancellationCalibration: Int { get }
Return Value
the current calibration value, -1 if it failed, 0 if not done or not needed, a positive value if a software echo canceller is required after running startEchoCancellerCalibration().
-
Enables or disable echo cancellation. Value is saved and used for subsequent calls. This actually controls software echo cancellation only. When ‘enable’ is set to false, software echo cancellation is disabled, but hardware one, if available, remains activated. When set to true, software echo cancellation is activated in either of these two conditions: Returns true if echo cancellation is enabled.
Declaration
Swift
public var echoCancellationEnabled: Bool { get set }
Return Value
A boolean value telling whether echo cancellation is enabled or disabled
-
Set the name of the mediastreamer2 filter to be used for echo cancelling. This is for advanced users of the library.
Declaration
Swift
public var echoCancellerFilterName: String { get set }
Return Value
The name of the mediastreamer2 filter used for echo cancelling.
-
Enables or disable echo limiter.
Declaration
Swift
public var echoLimiterEnabled: Bool { get set }
Return Value
true if the echo limiter is enabled, false otherwise.
-
Enable or disable the UPDATE method support.
Declaration
Swift
public var enableSipUpdate: Int { get set }
Parameters
value
Enable or disable it
-
Sets expected available upload bandwidth This is IP bandwidth, in kbit/s. This information is used by liblinphone together with remote side available bandwidth signaled in SDP messages to properly configure audio & video codec’s output bitrate.
Declaration
Swift
public var expectedBandwidth: Int { get set }
Parameters
bandwidth
the bandwidth in kbits/s, 0 for infinite
-
Returns the list of all audio devices.
Declaration
Swift
public var extendedAudioDevices: [AudioDevice] { get }
Return Value
A list of all
AudioDevice
-
Globaly set an http file transfer server to be used for content type application/vnd.gsma.rcs-ft-http+xml. Url may be like: “https://file.linphone.org/upload.php”. This value can also be set for a dedicated account using linphone_proxy_config_set_file_transfer_server.
Declaration
Swift
public var fileTransferServer: String { get set }
Return Value
URL of the file server.
-
Artificially cause the relay path to be selected when ICE is used. This is mainly a function for test, for example to validate that the relay service (ever TURN or media-aware SIP proxy) is working as expected. Indeed, in many cases a path through host or server reflexive candidate will be found by ICE, which makes difficult to make sure that the relay service is working as expected.
See
See also: enableForcedIceRelay().Declaration
Swift
public var forcedIceRelayEnabled: Bool { get set }
Return Value
a boolean value indicating whether forced relay is enabled.
-
Sets whether or not to start friend lists subscription when in foreground.
Declaration
Swift
public var friendListSubscriptionEnabled: Bool { get set }
Return Value
whether or not the feature is enabled
-
Sets the database filename where friends will be stored. If the file does not exist, it will be created.
Declaration
Swift
public var friendsDatabasePath: String { get set }
Return Value
filesystem path.
-
Retrieves the list of
FriendList
from the core.Declaration
Swift
public var friendsLists: [FriendList] { get }
Return Value
A list of
FriendList
. -
Retrieve the list of future conference information on DB.
Declaration
Swift
public var futureConferenceInformationList: [ConferenceInfo] { get }
Return Value
The list of future conference infos .
-
Enable RFC3389 generic comfort noise algorithm (CN payload type). It is disabled by default, because this algorithm is only relevant for legacy codecs (PCMU, PCMA, G722). Enablement requires a SDK built with full G729 support: -DENABLE_G729=ON -DENABLE_G729B_CNG=ON . - Warning: : the G729 support is not included in Liblinphone default licence - the purchase of a license extension is required.
Declaration
Swift
public var genericComfortNoiseEnabled: Bool { get set }
Return Value
true if generic comfort noise is enabled, false otherwise.
-
Returns the global state of core.
Declaration
Swift
public var globalState: GlobalState { get }
Return Value
a
GlobalState
enum. -
Tells
Core
to guess local hostname automatically in primary contact.Declaration
Swift
public var guessHostname: Bool { get set }
Return Value
true if guess hostname enabled, false otherwise.
-
Set http proxy address to be used for signaling during next channel connection. Use setNetworkReachable() FASLE/true to force channel restart.
Declaration
Swift
public var httpProxyHost: String { get set }
Return Value
hostname of IP adress of the http proxy (can be nil to disable).
-
Set http proxy port to be used for signaling.
Declaration
Swift
public var httpProxyPort: Int { get set }
Return Value
port of the http proxy.
-
Gets the default identity SIP address. This is an helper function. If no default proxy is set, this will return the primary contact ( see getPrimaryContact() ). If a default proxy is set it returns the registered identity on the proxy.
Declaration
Swift
public var identity: String { get }
Return Value
The default identity SIP address.
-
Get the
ImNotifPolicy
object controlling the instant messaging notifications.Declaration
Swift
public var imNotifPolicy: ImNotifPolicy? { get }
Return Value
A
ImNotifPolicy
object. -
Set the in call timeout in seconds. After this timeout period, the call is automatically hangup. A value of 0 disables this feature.
Declaration
Swift
public var inCallTimeout: Int { get set }
Return Value
The current in call timeout in seconds
-
Set the incoming call timeout in seconds. If an incoming call isn’t answered for this timeout period, it is automatically declined.
Declaration
Swift
public var incTimeout: Int { get set }
Return Value
The current incoming call timeout in seconds
-
Sets the given
AudioDevice
as input for all active calls.Declaration
Swift
public var inputAudioDevice: AudioDevice? { get set }
Return Value
The input audio device for the current or first call, nil if there is no call.
-
Turns IPv6 support on or off.
See
See also: enableIpv6() for more details on how IPv6 is supported in liblinphone.Declaration
Swift
public var ipv6Enabled: Bool { get set }
Return Value
A boolean value telling whether IPv6 is enabled or not
-
Gets if the auto download for incoming icalendars is enabled or not.
- deprecated: 16/12/2021 Use autoDownloadIcalendarsEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isAutoDownloadIcalendarsEnabled: Bool { get }
Return Value
true if icalendars will be automatically downloaded, false otherwise.
-
Gets if the auto download for incoming voice recordings is enabled or not.
- deprecated: 16/12/2021 Use autoDownloadVoiceRecordingsEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isAutoDownloadVoiceRecordingsEnabled: Bool { get }
Return Value
true if voice recordings will be automatically downloaded, false otherwise.
-
Gets whether auto iterate is enabled or not (Android & iOS only).
- deprecated: 16/12/2021 Use autoIterateEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isAutoIterateEnabled: Bool { get }
Return Value
true if iterate() is scheduled automatically, false otherwise
-
Check whether the device is echo canceller calibration is required.
Declaration
Swift
public var isEchoCancellerCalibrationRequired: Bool { get }
Return Value
true if it is required, false otherwise
-
Returns whether or not friend lists subscription are enabled.
- deprecated: 16/12/2021 Use friendListSubscriptionEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isFriendListSubscriptionEnabled: Bool { get }
Return Value
whether or not the feature is enabled
-
Gets whether the Core is considering itself in background or not. The Core foreground/background state depends on the last call made to enterBackground() or enterForeground(). - Returns: true if the Core is in background, false otherwise.
Declaration
Swift
public var isInBackground: Bool { get }
-
Indicates whether the local participant is part of a conference.
Warning
That function automatically fails in the case of conferences using a conferencet server (focus). If you use such a conference, you should use Conference.removeParticipant() instead.- deprecated: 09/03/2021 Use Conference.isIn() instead.
Declaration
Swift
@available(*, deprecated) public var isInConference: Bool { get }
Return Value
true if the local participant is in a conference, false otherwise.
-
Tells whether there is an incoming invite pending.
Declaration
Swift
public var isIncomingInvitePending: Bool { get }
Return Value
A boolean telling whether an incoming invite is pending or not.
-
Check if the configured media encryption is mandatory or not.
Declaration
Swift
public var isMediaEncryptionMandatory: Bool { get }
Return Value
true if media encryption is mandatory; false otherwise.
-
Returns whether the native ringing is enabled or not.
- deprecated: 16/12/2021 Use nativeRingingEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isNativeRingingEnabled: Bool { get }
Return Value
True if we use the native ringing, false otherwise
-
return network state either as positioned by the application or by linphone itself.
Declaration
Swift
public var isNetworkReachable: Bool { get }
Return Value
true if network is reachable, false otherwise
-
Gets whether push notifications are available or not (Android & iOS only).
Declaration
Swift
public var isPushNotificationAvailable: Bool { get }
Return Value
true if push notifications are available, false otherwise
-
Gets whether push notifications are enabled or not (Android & iOS only). If not, the app will have to handle all the push-related settings for each accounts
- deprecated: 16/12/2021 Use pushNotificationEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isPushNotificationEnabled: Bool { get }
Return Value
true if push notifications are enabled, false otherwise
-
Gets if the record aware feature is enabled or not.
- deprecated: 16/12/2021 Use recordAwareEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isRecordAwareEnabled: Bool { get }
Return Value
true if the record aware feature is enabled, false otherwise.
-
Returns whether or not sender name is hidden in forward message.
Declaration
Swift
public var isSenderNameHiddenInForwardMessage: Bool { get }
Return Value
whether or not the feature
-
Get whether the tls server certificate must be verified when connecting to a SIP/TLS server.
Declaration
Swift
public var isVerifyServerCertificates: Bool { get }
Return Value
True if the tls server certificate must be verified
-
Get whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.
Declaration
Swift
public var isVerifyServerCn: Bool { get }
Return Value
True if the tls server certificate common name must be verified
-
Gets whether the device will vibrate while an incoming call is ringing (Android only).
- deprecated: 16/12/2021 Use vibrationOnIncomingCallEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isVibrationOnIncomingCallEnabled: Bool { get }
Return Value
true if the device will vibrate (if possible), false otherwise
-
Enables signaling keep alive, small udp packet sent periodically to keep udp NAT association.
Declaration
Swift
public var keepAliveEnabled: Bool { get set }
Return Value
A boolean value telling whether signaling keep alive is enabled
-
Get the latest outgoing call log. Conference calls are not returned by this function! Requires ENABLE_DB_STORAGE to work.
Declaration
Swift
public var lastOutgoingCallLog: CallLog? { get }
Return Value
The last outgoing call log if any.
-
Returns a list of entered LDAPs. Items must be freed with linphone_ldap_unref
Declaration
Swift
public var ldapList: [Ldap] { get }
Return Value
-
Tells to LinphoneCore to use LIME X3DH.
Declaration
Swift
public var limeX3DhEnabled: Bool { get set }
Return Value
The current lime state
-
Set the x3dh server url. If empty, this function will disable LIME X3DH from core. Otherwise, or if different from the existing value, this will (re-)initialize the LIME X3DH engine.
- deprecated: 26/08/2022 Use AccountParams.setLimeServerUrl() instead. Get the x3dh server url.
- deprecated: 26/08/2022 Use AccountParams.getLimeServerUrl() instead.
Declaration
Swift
public var limeX3DhServerUrl: String { get set }
Return Value
The x3dh server url.
-
Set the linphone specs list value telling what functionalities the linphone client supports.
Declaration
Swift
public var linphoneSpecsList: [String] { get set }
Return Value
A list of supported specs. The list must be freed with bctbx_list_free() after usage.
-
Special function to check if the local network permission has been granted by the user (useful for iOS). The test performed by this function may popup the local network permission dialog, for that reason it could be a good idea to check it twice to conclude that the user has deny the permission.
Declaration
Swift
public var localPermissionEnabled: Bool { get }
Return Value
true if local permission request is granted, false otherwise.
-
Set the url of the server where to upload the collected log files.
Declaration
Swift
public var logCollectionUploadServerUrl: String { get set }
Return Value
The url of the server where to upload the collected log files.
-
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
Declaration
Swift
public var maxCalls: Int { get set }
Return Value
max number of simultaneous calls
-
Sets the size under which incoming files in chat messages will be downloaded automatically.
Declaration
Swift
public var maxSizeForAutoDownloadIncomingFiles: Int { get set }
Return Value
The size in bytes, -1 if autodownload feature is disabled, 0 to download them all no matter the size
-
Sets the sound device used for media.
Declaration
Swift
public var mediaDevice: String { get }
Return Value
The name of the currently assigned sound device for capture.
-
Declaration
Swift
public func setMediadevice(newValue: String) throws
-
Choose the media encryption policy to be used for RTP packets.
Declaration
Swift
public var mediaEncryption: MediaEncryption { get }
Return Value
The
MediaEncryption
policy being used. -
Declaration
Swift
public func setMediaencryption(newValue: MediaEncryption) throws
-
Define whether the configured media encryption is mandatory, if it is and the negotation cannot result in the desired media encryption then the call will fail. If not an INVITE will be resent with encryption disabled.
Declaration
Swift
public var mediaEncryptionMandatory: Bool? { get set }
Parameters
mandatory
true to set it mandatory; false otherwise.
-
This method is called by the application to notify the linphone core library when the media (RTP) network is reachable. This is for advanced usage, when SIP and RTP layers are required to use different interfaces. Most applications just need setNetworkReachable().
Declaration
Swift
public var mediaNetworkReachable: Bool? { get set }
Parameters
reachable
true if network is reachable, false otherwise
-
Sets the media resources mode. Value values are: unique and shared. When the mode is set to unique, then only one call in the state StreamsRunning is allowed. While acepting a call, the core will try to free media resource used by the current call. If it is unsuccessful, then the call is not accepted. If mode is set to shared, then the media resources of the current call (if any) are not emptied when taking a new call. If the user whishes to free them, he/she is responsible to call linphone_core_preempt_sound_resources himself/herself
Declaration
Swift
public var mediaResourceMode: MediaResourceMode { get set }
Return Value
The media resource mode
-
Enable or disable the microphone. This effectively enable or disable microphone (mute) for currently the running call or conference if any, as well as it applies to future currently running calls or conferences.
Declaration
Swift
public var micEnabled: Bool { get set }
Return Value
true if the microphone is enabled, false if disabled.
-
Allow to control microphone level: gain in db.
Declaration
Swift
public var micGainDb: Float { get set }
Return Value
The current microphone gain
-
Get the number of missed calls. Once checked, this counter can be reset with resetMissedCallsCount().
Declaration
Swift
public var missedCallsCount: Int { get }
Return Value
The number of missed calls.
-
Sets the maximum transmission unit size in bytes. This information is useful for sending RTP packets. Default value is 1500.
Declaration
Swift
public var mtu: Int { get set }
-
Deprecated. This function was used to force a given IP address to appear in SDP. Unfortunately, this cannot work as explained by https://www.rfc-editor.org/rfc/rfc5389#section-2 .
- deprecated: 12/10/2022 Deprecated. Get the public IP address of NAT being used.
- deprecated: 12/10/2022
Declaration
Swift
public var natAddress: String { get set }
Return Value
The public IP address of NAT being used.
-
Set the policy to use to pass through NATs/firewalls. It may be overridden by a NAT policy for a specific proxy config.
See
See also: AccountParams.setNatPolicy() Get The policy that is used to pass through NATs/firewalls. It may be overridden by a NAT policy for a specific proxy config.See
See also: AccountParams.getNatPolicy()Declaration
Swift
public var natPolicy: NatPolicy? { get set }
Return Value
NatPolicy
object in use. -
Set the native window id where the preview video (local camera) is to be displayed. This has to be used in conjonction with usePreviewWindow(). see setNativeVideoWindowId() for general details about window_id On Android : #org.linphone.mediastream.video.capture.CaptureTextureView is used for setNativePreviewWindowId(). It is inherited from #TextureView and takes care of rotating the captured image from the camera and scale it to keep it’s ratio.
Declaration
Swift
public var nativePreviewWindowId: UnsafeMutableRawPointer? { get set }
Return Value
The native window handle of the video preview window.
-
Sets whether to use the native ringing (Android only).
Declaration
Swift
public var nativeRingingEnabled: Bool { get set }
Return Value
True if we use the native ringing, false otherwise
-
Set the native video window id where the video is to be displayed. On Desktop platforms(MacOS, Linux, Windows), the display filter is “MSOGL” by default. That means : If window_id is not set or set to LINPHONE_VIDEO_DISPLAY_NONE, then the core will not create its own window, unless the special id LINPHONE_VIDEO_DISPLAY_AUTO is given. This is currently only supported for Linux X11 (#Window type), Windows UWP (#SwapChainPanel type) and Windows (#HWND type). The CSharp Wrapper on Windows for UWP takes directly a #SwapChainPanel without Marshalling. On other platforms, window_id is a #MSOglContextInfo defined in msogl.h of mediastreamer2 There is a special case for Qt : The “MSQOGL” filter must be selected by using linphone_core_set_video_display_filter. Setting window id is only used to stop rendering by passing LINPHONE_VIDEO_DISPLAY_NONE. getNativeVideoWindowId() returns a
QQuickFramebufferObject::Renderer and createNativeVideoWindowId() creates one.
After a creation, setNativeVideoWindowId() must be called with the new object. On mobile operating systems, LINPHONE_VIDEO_DISPLAY_AUTO is not supported and window_id depends of the platform : iOS : It is a #UIView. Android : It is a
TextureView.
Declaration
Swift
public var nativeVideoWindowId: UnsafeMutableRawPointer? { get set }
Return Value
The native window handle of the video window.
-
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.
Declaration
Swift
public var networkReachable: Bool? { get set }
Parameters
reachable
true if network is reachable, false otherwise
-
Sets the no-rtp timeout value in seconds.
See
See also: getNortpTimeout() for details. Gets the value of the no-rtp timeout. When no RTP or RTCP packets have been received for a whileCore
will consider the call is broken (remote end crashed or disconnected from the network), and thus will terminate the call. The no-rtp timeout is the duration above which the call is considered broken.Declaration
Swift
public var nortpTimeout: Int { get set }
Return Value
The value of the no-rtp timeout in seconds
-
Sets the given
AudioDevice
as output for all active calls.Declaration
Swift
public var outputAudioDevice: AudioDevice? { get set }
Return Value
The output audio device for the current or first call, nil if there is no call.
-
Sets a wav file to be played when putting somebody on hold, or when files are used instead of soundcards (see setUseFiles()). The file must be a 16 bit linear wav file.
Declaration
Swift
public var playFile: String { get set }
Return Value
The path to the file that is played when putting somebody on hold.
-
Sets the sound device used for playback.
Declaration
Swift
public var playbackDevice: String { get }
Return Value
The name of the currently assigned sound device for playback.
-
Declaration
Swift
public func setPlaybackdevice(newValue: String) throws
-
Allow to control play level before entering sound card: gain in db.
Declaration
Swift
public var playbackGainDb: Float { get set }
Return Value
The current playback gain
-
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”.
Declaration
Swift
public var preferredFramerate: Float { get set }
Return Value
frame rate in number of frames per seconds.
-
Set the preferred video definition for the stream that is captured and sent to the remote party. All standard video definitions are accepted on the receive path.
Declaration
Swift
public var preferredVideoDefinition: VideoDefinition? { get set }
Return Value
The preferred
VideoDefinition
-
Sets the preferred video definition by its name. Call Factory.getSupportedVideoDefinitions() to have a list of supported video definitions.
Declaration
Swift
public var preferredVideoDefinitionByName: String { get set }
Parameters
name
The name of the definition to set
-
Set my presence model.
Declaration
Swift
public var presenceModel: PresenceModel? { get set }
Return Value
A
PresenceModel
object, or nil if no presence model has been set. -
Set the video definition for the captured (preview) video. This method is for advanced usage where a video capture must be set independently of the definition of the stream actually sent through the call. This allows for example to have the preview window in High Definition even if due to bandwidth constraint the sent video definition is small. Using this feature increases the CPU consumption, since a rescaling will be done internally.
See
See also: setPreviewVideoDefinition()Declaration
Swift
public var previewVideoDefinition: VideoDefinition? { get set }
Return Value
The captured
VideoDefinition
if it was previously set by setPreviewVideoDefinition(), otherwise a 0x0 LinphoneVideoDefinition. -
Declaration
Swift
public var previewVideoDefinitionByName: String { get set }
Parameters
name
The name of the definition to set
-
Sets the local “from” identity. This data is used in absence of any proxy configuration or when no default proxy configuration is set. See
ProxyConfig
Declaration
Swift
public var primaryContact: String { get }
Return Value
the primary contact identity
-
Declaration
Swift
public func setPrimarycontact(newValue: String) throws
-
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
Core
start.Declaration
Swift
public var provisioningUri: String { get }
Return Value
the provisioning URI.
-
Declaration
Swift
public func setProvisioninguri(newValue: String) throws
-
Returns an unmodifiable list of entered proxy configurations.
Declaration
Swift
public var proxyConfigList: [ProxyConfig] { get }
Return Value
A list of
ProxyConfig
. -
Configure the minimum interval between a push notification and the corresponding incoming INVITE. If exceeded, Linphone Call is transitioned to CallError and further incoming invite associated to this push is declined if any.
Declaration
Swift
public var pushIncomingCallTimeout: Int { get set }
Return Value
The current push incoming call timeout in seconds
-
Gets the push notification configuration object if it exists.
Declaration
Swift
public var pushNotificationConfig: PushNotificationConfig? { get }
Return Value
the
PushNotificationConfig
if it exists, nil otherwise. -
Enable or disable push notifications on Android & iOS. If enabled, it will try to get the push token add configure each account with push_notification_allowed set to true with push parameters. IOS: will also instanciate a PushRegistry, so make sure that your app does not instanciate one too or there will be a conflict.
Declaration
Swift
public var pushNotificationEnabled: Bool { get set }
Return Value
true if push notifications are enabled, false otherwise
-
Controls QRCode enablement.
Declaration
Swift
public var qrcodeVideoPreviewEnabled: Bool { get set }
Return Value
A boolean value telling whether QRCode is enabled in the preview.
-
Gets if realtime text is enabled or not.
Declaration
Swift
public var realtimeTextEnabled: Bool { get }
Return Value
true if realtime text is enabled, false otherwise
-
Enables the record aware feature that will warn other users when recording.
Declaration
Swift
public var recordAwareEnabled: Bool { get set }
Return Value
true if the record aware feature is enabled, false otherwise.
-
Sets a wav file where incoming stream is to be recorded, when files are used instead of soundcards (see setUseFiles()). This feature is different from call recording (CallParams.setRecordFile()) The file will be a 16 bit linear wav file.
Get the wav file where incoming stream is recorded, when files are used instead of soundcards (see setUseFiles()). This feature is different from call recording (CallParams.setRecordFile()) The file is a 16 bit linear wav file.
Declaration
Swift
public var recordFile: String { get set }
Return Value
The path to the file where incoming stream is recorded.
-
Specify a ring back tone to be played to far end during incoming calls.
Declaration
Swift
public var remoteRingbackTone: String { get set }
Return Value
the path to the remote ring back tone to be played.
-
Turns NACK context on or off.
Declaration
Swift
public var retransmissionOnNackEnabled: Bool { get set }
Return Value
A boolean value telling whether NACK context is enabled or not
-
Sets the path to a wav file used for ringing. The file must be a wav 16bit linear. If null, ringing is disable unless
linphone_core_get_use_native_ringing() is enabled, in which case we use the
device ringtone.
Declaration
Swift
public var ring: String { get set }
Return Value
The path to the wav file used for ringing.
-
Enable or disable the ring play during an incoming early media call.
Declaration
Swift
public var ringDuringIncomingEarlyMedia: Bool { get set }
-
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.
Declaration
Swift
public var ringback: String { get set }
Return Value
The path to the wav file used for ringing back.
-
Sets the sound device used for ringing.
Declaration
Swift
public var ringerDevice: String { get }
Return Value
The name of the currently assigned sound device for ringing.
-
Declaration
Swift
public func setRingerdevice(newValue: String) throws
-
Sets the path to a file or folder containing trusted root CAs (PEM format)
Declaration
Swift
public var rootCa: String { get set }
Return Value
The path to a file or folder containing the trusted root CAs.
-
Sets the trusted root CAs (PEM format)
Declaration
Swift
public var rootCaData: String { get set }
Parameters
data
The trusted root CAs as a string
-
Enables or disables RTP bundle mode (Media Multiplexing). See https://datatracker.ietf.org/doc/html/rfc8843 for more information about the feature. When enabled, liblinphone will try to negociate the use of a single port for all streams when doing an outgoing call. It automatically enables rtcp-mux. This feature can also be enabled per-call using
CallParams
.Declaration
Swift
public var rtpBundleEnabled: Bool { get set }
Return Value
a boolean indicating the enablement of rtp bundle mode.
-
Control when media offer is sent in SIP INVITE.
Declaration
Swift
public var sdp200AckEnabled: Bool { get set }
Return Value
true if INVITE has to be sent whitout SDP.
-
Enables or disable self view during calls.
See
See also: enableSelfView() for details.Declaration
Swift
public var selfViewEnabled: Bool { get set }
Return Value
A boolean value telling whether self view is enabled
-
Enable whether or not to hide sender name in forward message.
Declaration
Swift
public var senderNameHiddenInForwardMessageEnabled: Bool? { get set }
Parameters
enable
whether or not to enable the feature
-
Enable the Session Timers support.
Declaration
Swift
public var sessionExpiresEnabled: Bool { get set }
-
Sets the session expires minSE value, forced to a minimum of 90 by default. Returns the session expires min value, 90 by default.
Declaration
Swift
public var sessionExpiresMinValue: Int { get set }
-
Sets the session expires refresher value.
Declaration
Swift
public var sessionExpiresRefresherValue: SessionExpiresRefresher { get set }
-
Sets the session expires value, 0 by default. Returns the session expires value.
Declaration
Swift
public var sessionExpiresValue: Int { get set }
-
Set the DSCP field for SIP signaling channel. The DSCP defines the quality of service in IP packets.
Declaration
Swift
public var sipDscp: Int { get set }
Return Value
The current DSCP value
-
This method is called by the application to notify the linphone core library when the SIP network is reachable. This is for advanced usage, when SIP and RTP layers are required to use different interfaces. Most applications just need setNetworkReachable().
Declaration
Swift
public var sipNetworkReachable: Bool? { get set }
Parameters
reachable
true if network is reachable, false otherwise
-
Set the SIP transport timeout.
Declaration
Swift
public var sipTransportTimeout: Int { get set }
Return Value
The SIP transport timeout in milliseconds.
-
Gets the list of the available sound devices.
- deprecated: 10/04/2021 Use getAudioDevices() instead.
Declaration
Swift
@available(*, deprecated) public var soundDevicesList: [String] { get }
Return Value
An unmodifiable array of strings contanining the names of the available sound devices that is nil terminated.
-
Set the crypto suites available to the core.
Declaration
Swift
public var srtpCryptoSuites: String { get set }
Return Value
a comma separated list of supported suites
-
Set the path to the image file to stream when “Static picture” is set as the video device.
Declaration
Swift
public var staticPicture: String { get }
Return Value
The path to the image file streamed when “Static picture” is set as the video device.
-
Declaration
Swift
public func setStaticpicture(newValue: String) throws
-
Set the frame rate for static picture.
Declaration
Swift
public var staticPictureFps: Float { get }
Return Value
The frame rate used for static picture.
-
Declaration
Swift
public func setStaticpicturefps(newValue: Float) throws
-
Set the STUN server address to use when the firewall policy is set to STUN.
Declaration
Swift
public var stunServer: String { get set }
Return Value
The STUN server address being used.
-
Returns a null terminated table of strings containing the file format extension supported for call recording.
Declaration
Swift
public var supportedFileFormatsList: [String] { get }
Return Value
The supported formats, typically ‘wav’ and ‘mkv’.
-
Set the supported tags.
Declaration
Swift
public var supportedTag: String { get set }
-
Define what level of support is provided to the 100rel attribute.
Declaration
Swift
public var tag100RelSupportLevel: SupportLevel { get set }
Return Value
The 100 rel support level
-
Define whether tcap lines are going to be merged if capability negotiation (RFC5939) is supported.
Declaration
Swift
public var tcapLineMergingEnabled: Bool? { get set }
Parameters
merge
true to merge tcap lines with consecutive indexes; false otherwise.
-
Check if tcap lines are going to the merged if the capability negotiation (RFC5939) is supported or not.
Declaration
Swift
public var tcapLinesMergingEnabled: Bool { get }
Return Value
true if tcap lines with consecutive indexes are going to be merged; false otherwise.
-
Redefine the list of the available payload types.
Declaration
Swift
public var textPayloadTypes: [PayloadType] { get set }
Return Value
A freshly allocated list of the available payload types. The list must be destroyed with bctbx_list_free() after usage. The elements of the list haven’t to be unref.
-
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.
Declaration
Swift
public var textPort: Int { get set }
Return Value
The UDP port used for text streaming
-
Sets a TLS certificate used for TLS authentication The certificate won’t be stored, you have to set it after each
Core
startup.Declaration
Swift
public var tlsCert: String { get set }
Return Value
the TLS certificate or nil if not set yet.
-
Sets a TLS certificate path used for TLS authentication The path will be stored in the rc file and automatically restored on startup.
Declaration
Swift
public var tlsCertPath: String { get set }
Return Value
the TLS certificate path or nil if not set yet.
-
Sets a TLS key used for TLS authentication The key won’t be stored, you have to set it after each
Core
startup.Declaration
Swift
public var tlsKey: String { get set }
Return Value
the TLS key or nil if not set yet.
-
Sets a TLS key path used for TLS authentication The path will be stored in the rc file and automatically restored on startup.
Declaration
Swift
public var tlsKeyPath: String { get set }
Return Value
the TLS key path or nil if not set yet.
-
Sets the ports to be used for each of transport (UDP or TCP) 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 choosen randomly by the system. A value of LC_SIP_TRANSPORT_DONTBIND (-2) means that the socket will not be bound explicitely, in other words liblinphone won’t listen for incoming connections at all. This mode is suitable for a pure client application (ex: a mobile application).
Declaration
Swift
public var transports: Transports? { get }
Return Value
A
Transports
structure with the configured ports -
Declaration
Swift
public func setTransports(newValue: Transports) throws
-
Retrieves the real port number assigned for each sip transport (udp, tcp, tls). A zero value means that the transport is not activated. If LC_SIP_TRANSPORT_RANDOM was passed to linphone_core_set_sip_transports, the random port choosed by the system is returned.
Declaration
Swift
public var transportsUsed: Transports? { get }
Return Value
A
Transports
structure with the ports being used -
Return the global unread chat message count.
Declaration
Swift
public var unreadChatMessageCount: Int { get }
Return Value
The global unread chat message count.
-
Return the unread chat message count for all active local address. (Primary contact + proxy configs.)
Declaration
Swift
public var unreadChatMessageCountFromActiveLocals: Int { get }
Return Value
The unread chat message count.
-
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.
Declaration
Swift
public var uploadBandwidth: Int { get set }
Return Value
the upload bandiwdth in kbits/s, 0 for infinite
-
Set audio packetization time linphone will send (in absence of requirement from peer) A value of 0 stands for the current codec default packetization time.
Declaration
Swift
public var uploadPtime: Int { get set }
Return Value
the upload packetization time set
-
Return the external ip address of router. In some cases the uPnP can have an external ip address but not a usable uPnP (state different of Ok).
Declaration
Swift
public var upnpExternalIpaddress: String { get }
Return Value
a null terminated string containing the external ip address. If the the external ip address is not available return null.
-
Return the internal state of uPnP.
Declaration
Swift
public var upnpState: UpnpState { get }
Return Value
an LinphoneUpnpState.
-
Ask the core to stream audio from and to files, instead of using the soundcard.
Declaration
Swift
public var useFiles: Bool { get set }
Return Value
A boolean value representing whether linphone is streaming audio from and to files or not.
-
Sets whether SIP INFO is to be used to send digits.
Declaration
Swift
public var useInfoForDtmf: Bool { get set }
Return Value
A boolean value telling whether SIP INFO is used to send digits
-
Sets whether RFC2833 is to be used to send digits.
Declaration
Swift
public var useRfc2833ForDtmf: Bool { get set }
Return Value
A boolean value telling whether RFC2833 is used to send digits
-
Gets the user-agent as a string.
Declaration
Swift
public var userAgent: String { get }
Return Value
liblinphone’s user agent as a string.
-
Set the path to the directory storing the user’s x509 certificates (used by dtls)
Declaration
Swift
public var userCertificatesPath: String { get set }
Return Value
The path to the directory storing the user’s certificates.
-
Associate a user pointer to the linphone core.
Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }
Return Value
The user data associated with the
Core
object. -
Enable vibration will incoming call is ringing (Android only). Gets whether the device will vibrate while an incoming call is ringing (Android only).
Declaration
Swift
public var vibrationOnIncomingCallEnabled: Bool { get set }
Return Value
true if the device will vibrate (if possible), false otherwise
-
Sets the default policy for video. This policy defines whether:
Declaration
Swift
public var videoActivationPolicy: VideoActivationPolicy? { get set }
Return Value
The video policy being used
-
Enable or disable the video adaptive jitter compensation.
Declaration
Swift
public var videoAdaptiveJittcompEnabled: Bool { get set }
Return Value
true if the video adaptive jitter compensation is enabled, false otherwise.
-
Enable or disable video capture. This function does not have any effect during calls. It just indicates the
Core
to initiate future calls with video capture or not.Declaration
Swift
public var videoCaptureEnabled: Bool { get set }
Return Value
true if video capture is enabled, false if disabled.
-
Sets the active video device.
Declaration
Swift
public var videoDevice: String { get }
Return Value
The name of the currently active video device.
-
Declaration
Swift
public func setVideodevice(newValue: String) throws
-
Gets the list of the available video capture devices.
Declaration
Swift
public var videoDevicesList: [String] { get }
Return Value
An unmodifiable array of strings contanining the names of the available video capture devices that is nil terminated.
-
Enable or disable video display. This function does not have any effect during calls. It just indicates the
Core
to initiate future calls with video display or not.Declaration
Swift
public var videoDisplayEnabled: Bool { get set }
Return Value
true if video display is enabled, false if disabled.
-
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.
Declaration
Swift
public var videoDisplayFilter: String { get set }
Return Value
The currently selected video display filter.
-
Set the DSCP field for outgoing video streams. The DSCP defines the quality of service in IP packets.
Declaration
Swift
public var videoDscp: Int { get set }
Return Value
The current DSCP value
-
Returns true if either capture or display is enabled, false otherwise. same as ( videoCaptureEnabled() | videoDisplayEnabled() )
Declaration
Swift
public var videoEnabled: Bool { get }
Return Value
true if either capture or display is enabled, false otherwise.
-
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.
Declaration
Swift
public var videoJittcomp: Int { get set }
Return Value
The nominal video jitter buffer size in milliseconds
-
Use to set multicast address to be used for video stream.
Declaration
Swift
public var videoMulticastAddr: String { get }
Return Value
an ipv4/6 multicast address, or default value.
-
Declaration
Swift
public func setVideomulticastaddr(newValue: String) throws
-
Use to enable multicast rtp for video stream. If enabled, outgoing calls put a multicast address from getVideoMulticastAddr() into video cline. In case of outgoing call video stream is sent to this multicast address. For incoming calls behavior is unchanged.
Declaration
Swift
public var videoMulticastEnabled: Bool { get set }
Return Value
true if subsequent calls will propose multicast ip set by setVideoMulticastAddr()
-
Use to set multicast ttl to be used for video stream.
Declaration
Swift
public var videoMulticastTtl: Int { get }
Return Value
a time to leave value
-
Declaration
Swift
public func setVideomulticastttl(newValue: Int) throws
-
Redefine the list of the available video payload types.
Declaration
Swift
public var videoPayloadTypes: [PayloadType] { get set }
Return Value
A freshly allocated list of the available payload types. The list must be destroyed with bctbx_list_free() after usage. The elements of the list haven’t to be unref.
-
Sets the UDP port used for video streaming. A value of -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
Declaration
Swift
public var videoPort: Int { get set }
Return Value
The UDP port used for video streaming
-
Set the video preset to be used for video calls.
Declaration
Swift
public var videoPreset: String { get set }
Return Value
The name of the video preset used for video calls (can be nil if the default video preset is used).
-
Controls video preview enablement.
Declaration
Swift
public var videoPreviewEnabled: Bool { get set }
Return Value
A boolean value telling whether video preview is enabled
-
Enable or disable video source reuse when switching from preview to actual video call. This source reuse is useful when you always display the preview, even before calls are initiated. By keeping the video source for the transition to a real video call, you will smooth out the source close/reopen cycle. This function does not have any effect durfing calls. It just indicates the
Core
to initiate future calls with video source reuse or not. Also, at the end of a video call, the source will be closed whatsoever for now.Declaration
Swift
public var videoSourceReuseEnabled: Bool? { get set }
Parameters
enable
true to enable video source reuse. false to disable it for subsequent calls.
-
Turns Wifi only mode on or off. If enabled, app won’t register when active network isn’t WiFi or Ethernet. - Warning: Only works for Android platform.
Warning
Only works for Android platform.Declaration
Swift
public var wifiOnlyEnabled: Bool { get set }
Return Value
A boolean value telling whether Wifi only mode is enabled or not
-
Define whether RTP port is set to 0 when a stream is inactive.
Declaration
Swift
public var zeroRtpPortForStreamInactiveEnabled: Bool { get set }
Return Value
true if the RTP port is set to 0 if the stream direction is inactive; false otherwise.
-
Define whether ZRTP go clear is enabled. Check if the ZRTP go clear is enabled or not.
Declaration
Swift
public var zrtpGoClearEnabled: Bool { get set }
Return Value
true if ZTRP go clear is enabled; false otherwise.
-
Set the path to the file storing the zrtp secrets cache.
Get the path to the file storing the zrtp secrets cache.
Declaration
Swift
public var zrtpSecretsFile: String { get set }
Return Value
The path to the file storing the zrtp secrets cache.
-
Special function to indicate if the audio session is activated. Must be called when ProviderDelegate of the callkit notifies that the audio session is activated or deactivated.
Declaration
Swift
public func activateAudioSession(actived: Bool)
-
Add all current calls into the conference. If no conference is running a new internal conference context is created and all current calls are added to it.
Warning
This function guarantees that the local endpoint is added to the conference.Declaration
Swift
public func addAllToConference() throws
Return Value
0 if succeeded. Negative number if failed
-
Add support for the specified content type. It is the application responsibility to handle it correctly afterwards.
Declaration
Swift
public func addContentTypeSupport(contentType: String)
Parameters
contentType
The content type to add support for
-
Add a friend list.
Declaration
Swift
public func addFriendList(list: FriendList)
Parameters
list
FriendList
object -
Add or update a LDAP server and save it to the configuration.
Declaration
Swift
public func addLdap(ldap: Ldap)
Parameters
ldap
The LDAP to add/update.
-
Add the given linphone specs to the list of functionalities the linphone client supports.
Declaration
Swift
public func addLinphoneSpec(spec: String)
Parameters
spec
The spec to add
-
Add a proxy configuration. This will start registration on the proxy, if registration is enabled.
Declaration
Swift
public func addProxyConfig(config: ProxyConfig) throws
Parameters
config
the
ProxyConfig
to addReturn Value
0 if successful, -1 otherwise
-
This function controls signaling features supported by the core. They are typically included in a SIP Supported header.
Declaration
Swift
public func addSupportedTag(tag: String)
Parameters
tag
The feature tag name
-
Add a participant to the conference. If no conference is going on a new internal conference context is created and the participant is added to it.
Declaration
Swift
public func addToConference(call: Call) throws
Parameters
call
The current call with the participant to add
Return Value
0 if succeeded. Negative number if failed
-
Special function to indicate if the audio route is changed. Must be called in the callback of AVAudioSessionRouteChangeNotification.
- deprecated: 07/01/2020 now handled in the linphone SDK directly
Declaration
Swift
@available(*, deprecated) public func audioRouteChanged()
-
Gets the default ephemeral message mode @core core the linphone core.
Declaration
Swift
public func chatRoomGetDefaultEphemeralMode() -> ChatRoomEphemeralMode
Return Value
the default ephemeral message mode
ChatRoomEphemeralMode
-
Sets the default ephemeral message mode.
Declaration
Swift
public func chatRoomSetDefaultEphemeralMode(mode: ChatRoomEphemeralMode)
Parameters
mode
default ephemeral message mode
ChatRoomEphemeralMode
-
Checks if a new version of the application is available.
Declaration
Swift
public func checkForUpdate(currentVersion: String)
Parameters
currentVersion
The current version of the application
-
Erase all account from config.
Declaration
Swift
public func clearAccounts()
-
Clear all authentication information.
Declaration
Swift
public func clearAllAuthInfo()
-
Erase the call log.
Declaration
Swift
public func clearCallLogs()
-
Erase all LDAP from the configuration.
Declaration
Swift
public func clearLdaps()
-
Erase all proxies from config.
Declaration
Swift
public func clearProxyConfig()
-
Writes the config file to disk.
Declaration
Swift
public func configSync() throws
Return Value
0 if successful, -1 otherwise
-
Special function to configure audio session with default settings. Must be called in ProviderDelegate’s callbacks when answer an incoming call and start an outgoing call.
Declaration
Swift
public func configureAudioSession()
-
Create an account using given parameters, see createAccountParams().
Declaration
Swift
public func createAccount(params: AccountParams) throws -> Account
Parameters
params
AccountParams
objectReturn Value
Account
with default values set -
Create a
AccountCreator
and set Linphone Request callbacks.Declaration
Swift
public func createAccountCreator(xmlrpcUrl: String?) throws -> AccountCreator
Parameters
xmlrpcUrl
The URL to the XML-RPC server.
Return Value
The new
AccountCreator
object. -
Create an account params using default values from Linphone core.
Declaration
Swift
public func createAccountParams() throws -> AccountParams
Return Value
AccountParams
with default values set -
Creates a fake
CallLog
.Declaration
Parameters
from
Address
of callerto
Address
of calleedir
Call.Dir
of callduration
call length in seconds
startTime
timestamp of call start time
connectedTime
timestamp of call connection
status
Call.Status
of callvideoEnabled
whether video was enabled or not for this call
quality
call quality
Return Value
a
CallLog
object -
Create a
CallParams
suitable for inviteWithParams(), linphone_core_accept_call_with_params, linphone_core_accept_early_media_with_params or linphone_core_accept_call_update. The parameters are initialized according to the currentCore
configuration and the last used localCallParams
, the ones passed through Call.update(), Call.acceptWithParams() or linphone_call_accept_update_with_params().Declaration
Swift
public func createCallParams(call: Call?) throws -> CallParams
Parameters
call
Call
for which the parameters are to be build, or nil in the case where the parameters are to be used for a new outgoing call.Return Value
A new
CallParams
object. -
Create a chat room.
Declaration
Swift
public func createChatRoom(params: ChatRoomParams, localAddr: Address?, participants: [Address]) throws -> ChatRoom
Parameters
params
The chat room creation parameters
ChatRoomParams
localAddr
Address
representing the local proxy configuration to use for the chat room creation or nilparticipants
The initial list of participants of the chat room.
Return Value
The newly created chat room (can be an existing one if backend is Basic) or nil.
-
Create a chat room.
deprecated: 02/07/2020, use createChatRoom() instead
Declaration
Swift
@available(*, deprecated) public func createChatRoom(params: ChatRoomParams, localAddr: Address, subject: String, participants: [Address]) throws -> ChatRoom
Parameters
params
The chat room creation parameters
ChatRoomParams
localAddr
Address
representing the local proxy configuration to use for the chat room creationsubject
The subject of the group chat room
participants
The initial list of participants of the chat room
Return Value
The newly created chat room.
-
Create a chat room.
deprecated: 02/07/2020, use createChatRoom() instead
Declaration
Swift
@available(*, deprecated) public func createChatRoom(params: ChatRoomParams, subject: String, participants: [Address]) throws -> ChatRoom
Parameters
params
The chat room creation parameters
ChatRoomParams
participants
The initial list of participants of the chat room.
Return Value
The newly created chat room.
-
deprecated: 02/07/2020, use createChatRoom() instead
Declaration
Parameters
subject
The subject of the group chat room
participants
The initial list of participants of the chat room.
Return Value
The newly created chat room.
-
- deprecated: 02/07/2020, use createChatRoom() instead
Declaration
Swift
@available(*, deprecated) public func createChatRoom(params: ChatRoomParams, localAddr: Address, participant: Address) throws -> ChatRoom
Parameters
params
The chat room creation parameters
ChatRoomParams
localAddr
Address
representing the local proxy configuration to use for the chat room creationparticipant
Address
representing the initial participant to add to the chat roomReturn Value
The newly created chat room.
-
Create some default conference parameters for instanciating a conference with createConferenceWithParams().
Declaration
Swift
public func createConferenceParams(conference: Conference?) throws -> ConferenceParams
Parameters
conference
Conference
for which the parameters are to be build, or nil in the case where the parameters are to be used for a new conference.Return Value
a
ConferenceParams
object. -
Create a conference scheduler that can be used to create remote conferences for now or later and then send conference info as an ICS through chat.
Declaration
Swift
public func createConferenceScheduler() throws -> ConferenceScheduler
Return Value
A pointer on the freshly created
ConferenceScheduler
. -
Create a conference. Local or remote conference is determinated from the ‘conference_type’ variable in the ‘misc’ section of the configuration, or by the factory address parameter. See ConferenceParams.setConferenceFactoryAddress() for more details.
Declaration
Swift
public func createConferenceWithParams(params: ConferenceParams) throws -> Conference
Parameters
params
Parameters of the conference. See
ConferenceParams
.Return Value
A pointer on the freshly created conference
Conference
. That object will be automatically freed by the core after calling terminateConference(). -
Creates and returns the default chat room parameters.
Declaration
Swift
public func createDefaultChatRoomParams() throws -> ChatRoomParams
Return Value
A
ChatRoomParams
object -
Create a new empty
FriendList
object.Declaration
Swift
public func createFriendList() throws -> FriendList
Return Value
A new
FriendList
object. -
Creates an empty info message.
Declaration
Swift
public func createInfoMessage() throws -> InfoMessage
Return Value
a new LinphoneInfoMessage.
The info message can later be filled with information using InfoMessage.addHeader() or InfoMessage.setContent(), and finally sent with linphone_core_send_info_message(). -
Create a LDAP params using default values from Linphone core. Check #linphone_ldap_params to update values. In order to add a new LDAP configuration to Magic search, these parameters must be passed to linphone_core_create_ldap_with_params. Or, use Ldap.setParams(). The newly created LDAP from createLdap().
Declaration
Swift
public func createLdapParams() throws -> LdapParams
Return Value
LdapParams
with default values set. -
Create a LDAP search using given parameters and store them in the configuration file.
Declaration
Swift
public func createLdapWithParams(params: LdapParams) throws -> Ldap
Parameters
params
LdapParams
objectReturn Value
Ldap
with default values set -
Create an independent media file player. This player support WAVE and MATROSKA formats.
Declaration
Swift
public func createLocalPlayer(soundCardName: String?, videoDisplayName: String?, windowId: UnsafeMutableRawPointer?) throws -> Player
Parameters
soundCardName
Playback sound card. If nil, the ringer sound card set in
Core
will be usedvideoDisplayName
Video display. If nil, the video display set in
Core
will be usedwindowId
Id of the drawing window. Depend of video out
Return Value
A pointer on the new instance. nil if failed.
-
Create a
MagicSearch
object.Declaration
Swift
public func createMagicSearch() throws -> MagicSearch
Return Value
The created
MagicSearch
object -
Create a native window handle for the video preview window. see setNativeVideoWindowId() for details about window_id MSQOgl can be used for the creation. createNativePreviewWindowId() returns a
QQuickFramebufferObject::Renderer. This object must be returned by your
QQuickFramebufferObject::createRenderer() overload for Qt. setNativePreviewWindowId() must be called with this object after the creation. Note : Qt blocks GUI thread when calling createRenderer(), so it is safe to call linphone functions there if needed.
Declaration
Swift
public func createNativePreviewWindowId() throws -> UnsafeMutableRawPointer
Return Value
The native window handle of the video preview window.
-
Create a native window handle for the video window. see setNativeVideoWindowId() for details about window_id MSQOgl can be used for the creation. createNativeVideoWindowId() returns a
QQuickFramebufferObject::Renderer. This object must be returned by your
QQuickFramebufferObject::createRenderer() overload for Qt. setNativeVideoWindowId() must be called with this object after the creation. Note : Qt blocks GUI thread when calling createRenderer(), so it is safe to call linphone functions there if needed.
Declaration
Swift
public func createNativeVideoWindowId() throws -> UnsafeMutableRawPointer
Return Value
The native window handle of the video window.
-
Create an out-of-dialog notification, specifying the destination resource, the event name. The notification can be send with Event.notify().
Parameters
resource
the destination resource
event
the event name
Return Value
a
Event
holding the context of the notification. -
Create a publish context for a one-shot publish. After being created, the publish must be sent using Event.sendPublish(). The
Event
is automatically terminated when the publish transaction is finished, either with success or failure. The application must not call Event.terminate() for such one-shot publish.Declaration
Parameters
resource
the resource uri for the event
event
the event name
Return Value
the
Event
holding the context of the publish. -
Create a
PresenceActivity
with the given type and description.Declaration
Swift
public func createPresenceActivity(acttype: PresenceActivityType, description: String?) throws -> PresenceActivity
Parameters
acttype
The
PresenceActivityType
to set for the activity.description
An additional description of the activity to set for the activity. Can be nil if no additional description is to be added.
Return Value
The created
PresenceActivity
object. -
Create a default LinphonePresenceModel.
Declaration
Swift
public func createPresenceModel() throws -> PresenceModel
Return Value
The created
PresenceModel
object. -
Create a
PresenceModel
with the given activity type and activity description.Declaration
Swift
public func createPresenceModelWithActivity(acttype: PresenceActivityType, description: String?) throws -> PresenceModel
Parameters
acttype
The
PresenceActivityType
to set for the activity of the created model.description
An additional description of the activity to set for the activity. Can be nil if no additional description is to be added.
Return Value
The created
PresenceModel
object. -
Create a
PresenceModel
with the given activity type, activity description, note content and note language.Declaration
Swift
public func createPresenceModelWithActivityAndNote(acttype: PresenceActivityType, description: String?, note: String, lang: String?) throws -> PresenceModel
Parameters
acttype
The
PresenceActivityType
to set for the activity of the created model.description
An additional description of the activity to set for the activity. Can be nil if no additional description is to be added.
note
The content of the note to be added to the created model.
lang
The language of the note to be added to the created model.
Return Value
The created
PresenceModel
object. -
Create a
PresenceNote
with the given content and language.Declaration
Swift
public func createPresenceNote(content: String, lang: String?) throws -> PresenceNote
Parameters
content
The content of the note to be created.
lang
The language of the note to be created.
Return Value
The created
PresenceNote
object. -
Create a
PresencePerson
with the given id.Declaration
Swift
public func createPresencePerson(id: String) throws -> PresencePerson
Parameters
id
The id of the person to be created.
Return Value
The created
PresencePerson
object. -
Create a
PresenceService
with the given id, basic status and contact.Declaration
Swift
public func createPresenceService(id: String, basicStatus: PresenceBasicStatus, contact: String) throws -> PresenceService
Parameters
id
The id of the service to be created.
basicStatus
The basic status of the service to be created.
contact
A string containing a contact information corresponding to the service to be created.
Return Value
The created
PresenceService
object. -
Create a proxy config with default values from Linphone core.
Declaration
Swift
public func createProxyConfig() throws -> ProxyConfig
Return Value
ProxyConfig
with default values set -
Create a publish context for an event state. After being created, the publish must be sent using Event.sendPublish(). After expiry, the publication is refreshed unless it is terminated before.
Declaration
Parameters
resource
the resource uri for the event
event
the event name
expires
the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
Return Value
the
Event
holding the context of the publish. -
Create a media file recorder. This recorder support WAVE and MATROSKA formats.
Declaration
Swift
public func createRecorder(params: RecorderParams) throws -> Recorder
Parameters
params
The
RecorderParams
that will contains all recorder parameters.Return Value
A pointer on the new instance. nil if failed.
-
Create a recorder params that will hold parameters. This recorder support WAVE and MATROSKA formats.
Declaration
Swift
public func createRecorderParams() throws -> RecorderParams
Return Value
A pointer on the newly created instance.
-
Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body. If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before. Unlike subscribe() the subscription isn’t sent immediately. It will be send when calling Event.sendSubscribe().
Declaration
Parameters
resource
the destination resource
event
the event name
expires
the whished duration of the subscription
Return Value
a
Event
holding the context of the created subcription. -
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 subscribe() the subscription isn’t sent immediately. It will be send when calling Event.sendSubscribe().
Declaration
Swift
public func createSubscribe(resource: Address, proxy: ProxyConfig, event: String, expires: Int) throws -> Event
Parameters
resource
the destination resource
proxy
the proxy configuration to use
event
the event name
expires
the whished duration of the subscription
Return Value
a
Event
holding the context of the created subcription. -
Create a
XmlRpcSession
for a given url.Declaration
Swift
public func createXmlRpcSession(url: String) throws -> XmlRpcSession
Parameters
url
The URL to the XML-RPC server. Must be NON nil.
Return Value
The new
XmlRpcSession
object. -
Deletes a conference information from DB.
Declaration
Swift
public func deleteConferenceInformation(conferenceInfo: ConferenceInfo)
Parameters
conferenceInfo
the
ConferenceInfo
to delete. -
Sets device_token when application didRegisterForRemoteNotificationsWithDeviceToken (IOS only).
Declaration
Swift
public func didRegisterForRemotePush(deviceToken: UnsafeMutableRawPointer?)
Parameters
deviceToken
(NSData *).
-
Sets device_token when application didRegisterForRemoteNotificationsWithDeviceToken (IOS only).
Declaration
Swift
public func didRegisterForRemotePushWithStringifiedToken(deviceTokenStr: String?)
Parameters
deviceTokenStr
extracted from the Data objectf received in didRegisterForRemoteNotificationsWithDeviceToken ios function. Append “:remote” after data formating..
-
Inconditionnaly disable incoming chat messages.
Declaration
Swift
public func disableChat(denyReason: Reason)
Parameters
denyReason
the deny reason (
None
has no effect). -
Enable reception of incoming chat messages. By default it is enabled but it can be disabled with disableChat().
Declaration
Swift
public func enableChat()
-
Call this method when you receive a push notification (if you handle push notifications manually). It will ensure the proxy configs are correctly registered to the proxy server, so the call or the message will be correctly delivered.
- deprecated: 09/03/2022 See processPushNotification() instead.
Declaration
Swift
@available(*, deprecated) public func ensureRegistered()
-
This method is called by the application to notify the linphone core library when it enters background mode.
Declaration
Swift
public func enterBackground()
-
Join the local participant to the running conference.
- deprecated: 09/03/2021 Use Conference.enter() instead.
Declaration
Swift
@available(*, deprecated) public func enterConference() throws
Return Value
0 if succeeded. Negative number if failed
-
This method is called by the application to notify the linphone core library when it enters foreground mode.
Declaration
Swift
public func enterForeground()
-
Returns whether a specific file format is supported.
See
See also: linphone_core_get_supported_file_formatsDeclaration
Swift
public func fileFormatSupported(fmt: String) -> Bool
Parameters
fmt
The format extension (wav, mkv).
Return Value
true if the file format is supported, false otherwise
-
Find authentication info matching realm, username, domain criteria. First of all, (realm,username) pair are searched. If multiple results (which should not happen because realm are supposed to be unique), then domain is added to the search.
Declaration
Swift
public func findAuthInfo(realm: String?, username: String, sipDomain: String?) -> AuthInfo?
Parameters
realm
the authentication ‘realm’ (optional)
username
the SIP username to be authenticated (mandatory)
sipDomain
the SIP domain name (optional)
Return Value
a
AuthInfo
if found. -
Search from the list of current calls if a remote address match uri.
- deprecated: 27/10/2020. Use getCallByRemoteAddress2() instead.
Declaration
Swift
@available(*, deprecated) public func findCallFromUri(uri: String) -> Call?
Parameters
uri
which should match call remote uri
Return Value
Call
or nil if no match is found. -
Get the call log matching the call id, or nil if can’t be found.
Declaration
Swift
public func findCallLog(callId: String, limit: Int) -> CallLog?
Parameters
callId
Call id of the call log to find
limit
Search limit of the most recent call logs to find
Return Value
A call log matching the call id if any.
-
Get the call log matching the call id, or nil if can’t be found.
Declaration
Swift
public func findCallLogFromCallId(callId: String) -> CallLog?
Parameters
callId
Call id of the call log to find
Return Value
A call log matching the call id if any.
-
Find a chat room. No reference is transfered to the application. The
Core
keeps a reference on the chat room.- deprecated: 02/07/2020, use searchChatRoom() instead
Declaration
Parameters
peerAddr
a linphone address.
localAddr
a linphone address.
Return Value
ChatRoom
where messaging can take place. -
Retrieve the conference information linked to the provided URI if any.
Declaration
Swift
public func findConferenceInformationFromUri(uri: Address) -> ConferenceInfo?
Parameters
uri
Address
of the uri.Return Value
The
ConferenceInfo
found if any, nil otherwise. -
Find a one to one chat room. No reference is transfered to the application. The
Core
keeps a reference on the chat room.- deprecated: 02/07/2020, use searchChatRoom() instead
Declaration
Parameters
localAddr
a linphone address.
participantAddr
a linphone address.
encrypted
whether to look for an encrypted chat room or not
Return Value
ChatRoom
where messaging can take place. -
Get the call with the remote_address specified.
deprecated: 08/07/2020 use getCallByRemoteAddress2() instead
Declaration
Swift
@available(*, deprecated) public func getCallByRemoteAddress(remoteAddress: String) -> Call?
Parameters
remoteAddress
The remote address of the call that we want to get
Return Value
The call if it has been found, nil otherwise.
-
Get the list of call logs (past calls). At the contrary of linphone_core_get_call_logs, it is your responsibility to unref the logs and free this list once you are done using it. Requires ENABLE_DB_STORAGE to work.
Declaration
Return Value
A list of
CallLog
. -
Get the list of call logs (past calls) that matches the given
Address
. At the contrary of linphone_core_get_call_logs, it is your responsibility to unref the logs and free this list once you are done using it. Requires ENABLE_DB_STORAGE to work.- deprecated: 29/10/2018 Use getCallHistory() instead.
Declaration
Parameters
address
Address
objectReturn Value
A list of
CallLog
. -
Get a chat room whose peer is the supplied address. If it does not exist yet, it will be created as a basic chat room. No reference is transfered to the application. The
Core
keeps a reference on the chat room. - Warning: This method is prone to errors, use searchChatRoom() instead- deprecated: 02/07/2020, use searchChatRoom() instead
Parameters
addr
a linphone address.
Return Value
ChatRoom
where messaging can take place. -
Get a chat room. If it does not exist yet, it will be created as a basic chat room. No reference is transfered to the application. The
Core
keeps a reference on the chat room. - Warning: This method is prone to errors, use searchChatRoom() instead- deprecated: 02/07/2020, use searchChatRoom() instead
Declaration
Parameters
peerAddr
a linphone address.
localAddr
a linphone address.
Return Value
ChatRoom
where messaging can take place. -
Get a chat room for messaging from a sip uri like sip:joe@sip.linphone.org. If it does not exist yet, it will be created as a basic chat room. No reference is transfered to the application. The
Core
keeps a reference on the chat room. - Warning: This method is prone to errors, use searchChatRoom() instead- deprecated: 02/07/2020, use searchChatRoom() instead
Declaration
Swift
@available(*, deprecated) public func getChatRoomFromUri(to: String) -> ChatRoom?
Parameters
to
The destination address for messages.
Return Value
ChatRoom
where messaging can take place. -
Retrieve the list of conference information on DB after a certain time.
Declaration
Swift
public func getConferenceInformationListAfterTime(time: time_t) -> [ConferenceInfo]
Parameters
time
Time to retrieve conference info.
Return Value
The list of conference infos .
-
Retrieves the list of
Friend
from the core that has the given display name.Declaration
Swift
public func getFriendListByName(name: String) -> FriendList?
Parameters
name
the name of the list
Return Value
the first
FriendList
object or nil. -
Get the chat room we have been added into using the chat_room_addr included in the push notification body This will start the core given in parameter, iterate until the new chat room is received and return it. By default, after 25 seconds the function returns because iOS kills the app extension after 30 seconds.
Declaration
Swift
public func getNewChatRoomFromConfAddr(chatRoomAddr: String) -> ChatRoom?
Parameters
chatRoomAddr
The sip address of the chat room
Return Value
The
ChatRoom
object. -
Get the chat message with the call_id included in the push notification body This will start the core given in parameter, iterate until the message is received and return it. By default, after 25 seconds the function returns because iOS kills the app extension after 30 seconds.
Declaration
Swift
public func getNewMessageFromCallid(callId: String) -> PushNotificationMessage?
Parameters
callId
The callId of the Message SIP transaction
Return Value
The
ChatMessage
object. -
Get payload type from mime type and clock rate. This function searches in audio and video codecs for the given payload type name and clockrate.
Warning
The returned payload type is allocated as a floating reference i.e. the reference counter is initialized to 0.Declaration
Swift
public func getPayloadType(type: String, rate: Int, channels: Int) -> PayloadType?
Parameters
type
payload mime type (I.E SPEEX, PCMU, VP8)
rate
can be LINPHONE_FIND_PAYLOAD_IGNORE_RATE
channels
number of channels, can be LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
Return Value
Returns nil if not found. If a
PayloadType
is returned, it must be released with linphone_payload_type_unref after using it. -
Search for a
ProxyConfig
by it’s idkey.Declaration
Swift
public func getProxyConfigByIdkey(idkey: String) -> ProxyConfig?
Parameters
idkey
An arbitrary idkey string associated to a proxy configuration
Return Value
the
ProxyConfig
object for the given idkey value, or nil if none found -
Get the zrtp sas validation status for a peer uri. Once the SAS has been validated or rejected, the status will never return to Unknown (unless you delete your cache)
Declaration
Swift
public func getZrtpStatus(addr: String) -> ZrtpPeerStatus
Parameters
addr
the peer uri
Return Value
- LinphoneZrtpPeerStatusUnknown: this uri is not present in cache OR during calls with the active device, SAS never was validated or rejected
-
Check whether the device has a hardware echo canceller.
Declaration
Swift
public func hasBuiltinEchoCanceller() -> Bool
Return Value
true if it does, false otherwise
-
Check whether the device is flagged has crappy opengl.
Declaration
Swift
public func hasCrappyOpengl() -> Bool
Return Value
true if crappy opengl flag is set, false otherwise
-
Tells whether there is a call running.
Declaration
Swift
public func inCall() -> Bool
Return Value
A boolean value telling whether a call is currently running or not
-
Constructs a
Address
from the given string if possible. In case of just a username, characters will be unescaped. If a phone number is detected, it will be flattened. sip: or sips: prefix will be added if not present. Finally, @domain will be added if not present using default proxy config. - See also: ProxyConfig.normalizeSipUri() for documentation.- deprecated: on 18/07/2022, use interpretUrl() instead.
Declaration
Swift
@available(*, deprecated) public func interpretUrl(url: String) -> Address?
Parameters
url
the url to parse
Return Value
the
Address
matching the url or nil in case of failure. -
Constructs a
Address
from the given string if possible. In case of just a username, characters will be unescaped. If a phone number is detected, it will be flattened. sip: or sips: prefix will be added if not present. Finally, @domain will be added if not present using default proxy config. - See also: ProxyConfig.normalizeSipUri() for documentation.Declaration
Swift
public func interpretUrl(url: String, applyInternationalPrefix: Bool) -> Address?
Parameters
url
the url to parse
applyInternationalPrefix
whether or not to try to format url as phone number using default account prefix if it set (and if url is a number).
Return Value
the
Address
matching the url or nil in case of failure. -
Initiates an outgoing call. The application doesn’t own a reference to the returned LinphoneCall object. Use linphone_call_ref to safely keep the LinphoneCall pointer valid within your application.
Declaration
Swift
public func invite(url: String) -> Call?
Parameters
url
The destination of the call (sip address, or phone number).
Return Value
A
Call
object or nil in case of failure. -
Initiates an outgoing call given a destination
Address
TheAddress
can be constructed directly using Factory.createAddress(), or created by interpretUrl(). The application doesn’t own a reference to the returnedCall
object. Use linphone_call_ref to safely keep theCall
pointer valid within your application.Parameters
addr
The destination of the call (sip address).
Return Value
A
Call
object or nil in case of failure. -
Initiates an outgoing call given a destination
Address
TheAddress
can be constructed directly using Factory.createAddress(), or created by interpretUrl(). The application doesn’t own a reference to the returnedCall
object. Use linphone_call_ref to safely keep theCall
pointer valid within your application. If the proxy is not specified in parameters, the caller proxy will be automatically selected by finding what is the best to reach the destination of the call.Declaration
Swift
public func inviteAddressWithParams(addr: Address, params: CallParams) -> Call?
Parameters
addr
The destination of the call (sip address).
params
Call parameters
Return Value
A
Call
object or nil in case of failure. -
Initiates an outgoing call given a destination
Address
TheAddress
can be constructed directly using Factory.createAddress(), or created by interpretUrl(). The application doesn’t own a reference to the returnedCall
object. Use linphone_call_ref to safely keep theCall
pointer valid within your application. If the proxy is not specified in parameters, the caller proxy will be automatically selected by finding what is the best to reach the destination of the call.Declaration
Swift
public func inviteAddressWithParams(addr: Address, params: CallParams, subject: String?, content: Content?) -> Call?
Parameters
addr
The destination of the call (sip address).
params
Call parameters
subject
Subject of the call
content
Body of the SIP INVITE
Return Value
A
Call
object or nil in case of failure. -
Initiates an outgoing call according to supplied call parameters The application doesn’t own a reference to the returned
Call
object. Use linphone_call_ref to safely keep theCall
pointer valid within your application.Declaration
Swift
public func inviteWithParams(url: String, params: CallParams) -> Call?
Parameters
url
The destination of the call (sip address, or phone number).
params
the
CallParams
call parametersReturn Value
A
Call
object or nil in case of failure. -
Tells whether a content type is supported.
Declaration
Swift
public func isContentTypeSupported(contentType: String) -> Bool
Parameters
contentType
The content type to check
Return Value
A boolean value telling whether the specified content type is supported or not.
-
Check if media encryption is supported.
Declaration
Swift
public func isMediaEncryptionSupported(menc: MediaEncryption) -> Bool
Parameters
menc
The media encryption policy to be used.
Return Value
true if the media encryption is supported, false otherwise
-
Checks if the given media filter is loaded and usable. This is for advanced users of the library, mainly to expose mediastreamer video filter status.
Declaration
Swift
public func isMediaFilterSupported(filtername: String) -> Bool
Parameters
filtername
the filter name
Return Value
true if the filter is loaded and usable, false otherwise
-
Main loop function. It is crucial that your application call it periodically. iterate() performs various backgrounds tasks:
Declaration
Swift
public func iterate()
-
Tells if LDAP is available.
Declaration
Swift
public func ldapAvailable() -> Bool
Return Value
true if LDAP is available, false otherwise
-
Make the local participant leave the running conference.
- deprecated: 09/03/2021 Use Conference.leave() instead.
Declaration
Swift
@available(*, deprecated) public func leaveConference() throws
Return Value
0 if succeeded. Negative number if failed
-
Tells if LIME X3DH is available.
Declaration
Swift
public func limeX3DhAvailable() -> Bool
-
Update current config with the content of a xml config file.
Declaration
Swift
public func loadConfigFromXml(xmlUri: String)
Parameters
xmlUri
the path to the xml file
-
Check if a media encryption type is supported.
Declaration
Swift
public func mediaEncryptionSupported(menc: MediaEncryption) -> Bool
Parameters
menc
Return Value
whether a media encryption scheme is supported by the
Core
engine -
Migrates the call logs from the linphonerc to the database if not done yet.
Declaration
Swift
public func migrateLogsFromRcToDb()
-
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 iterate()
Declaration
Swift
public func migrateToMultiTransport() throws
Return Value
1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error.
-
Notify all friends that have subscribed.
Declaration
Swift
public func notifyAllFriends(presence: PresenceModel)
Parameters
presence
PresenceModel
to notify -
Notifies the upper layer that a presence status has been received by calling the appropriate callback if one has been set. This method is for advanced usage, where customization of the liblinphone’s internal behavior is required.
Declaration
Swift
public func notifyNotifyPresenceReceived(linphoneFriend: Friend)
Parameters
linphoneFriend
the
Friend
whose presence information has been received. -
Notifies the upper layer that a presence model change has been received for the uri or telephone number given as a parameter, by calling the appropriate callback if one has been set. This method is for advanced usage, where customization of the liblinphone’s internal behavior is required.
Declaration
Swift
public func notifyNotifyPresenceReceivedForUriOrTel(linphoneFriend: Friend, uriOrTel: String, presenceModel: PresenceModel)
Parameters
linphoneFriend
the
Friend
whose presence information has been received.uriOrTel
telephone number or sip uri
presenceModel
the
PresenceModel
that has been modified -
Pause all currently running calls.
Declaration
Swift
public func pauseAllCalls() throws
Return Value
0
-
Plays a dtmf sound to the local user.
Declaration
Swift
public func playDtmf(dtmf: CChar, durationMs: Int)
Parameters
dtmf
DTMF to play [‘0’..‘16’] | ‘#’ | ‘#’
durationMs
Duration in ms, -1 means play until next further call to stopDtmf()
-
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.
Declaration
Swift
public func playLocal(audiofile: String) throws
Parameters
audiofile
The path to an audio file in wav PCM 16 bit format
Return Value
0 on success, -1 on error
-
Empties sound resources to allow a new call to be accepted. This function is autyomatically called by the core if the media resource mode is set to unique.
Declaration
Swift
public func preemptSoundResources() -> Int
Return Value
An integer returning the exit value. If it is 0, sound resources have been emptied. Otherwise, sound resources are busy and cannot be freed immediately.
-
Call generic OpenGL render for a given core.
Declaration
Swift
public func previewOglRender()
-
Call this method when you receive a push notification (if you handle push notifications manually). It will ensure the proxy configs are correctly registered to the proxy server, so the call or the message will be correctly delivered.
Declaration
Swift
public func processPushNotification(callId: String?)
Parameters
callId
the Call-ID of the MESSAGE or INVITE for which the push was received and to wait for.
-
Publish an event state. This first create a
Event
with createPublish() and calls Event.sendPublish() to actually send it. After expiry, the publication is refreshed unless it is terminated before.Declaration
Parameters
resource
the resource uri for the event
event
the event name
expires
the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
body
the actual published data
Return Value
the
Event
holding the context of the publish. -
Gets keep alive interval of real time text.
Declaration
Swift
public func realtimeTextGetKeepaliveInterval() -> UInt
Return Value
keep alive interval of real time text.
-
Set keep alive interval for real time text.
Declaration
Swift
public func realtimeTextSetKeepaliveInterval(interval: UInt)
Parameters
interval
The keep alive interval of real time text, 25000 by default.
-
force registration refresh to be initiated upon next iterate
Declaration
Swift
public func refreshRegisters()
-
Reload mediastreamer2 plugins from specified directory.
Declaration
Swift
public func reloadMsPlugins(path: String?)
Parameters
path
the path from where plugins are to be loaded, pass nil to use default (compile-time determined) plugin directory.
-
Update detection of sound devices. Use this function when the application is notified of USB plug events, so that list of available hardwares for sound playback and capture is updated.
Declaration
Swift
public func reloadSoundDevices()
-
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.
Declaration
Swift
public func reloadVideoDevices()
-
Remove support for the specified content type. It is the application responsibility to handle it correctly afterwards.
Declaration
Swift
public func removeContentTypeSupport(contentType: String)
Parameters
contentType
The content type to remove support for
-
Removes a friend list.
Declaration
Swift
public func removeFriendList(list: FriendList)
Parameters
list
FriendList
object -
Remove a call from the conference.
Declaration
Swift
public func removeFromConference(call: Call) throws
Parameters
call
a call that has been previously merged into the conference.
After removing the remote participant belonging to the supplied call, the call becomes a normal call in paused state. If one single remote participant is left alone together with the local user in the conference after the removal, then the conference is automatically transformed into a simple call in StreamsRunning state. The conference’s resources are then automatically destroyed. In other words, unless leaveConference() is explicitly called, the last remote participant of a conference is automatically put in a simple call in running state.Return Value
0 if successful, -1 otherwise.
-
Remove a LDAP from the configuration.
Declaration
Swift
public func removeLdap(ldap: Ldap)
Parameters
ldap
The LDAP to remove.
-
Remove the given linphone specs from the list of functionalities the linphone client supports.
Declaration
Swift
public func removeLinphoneSpec(spec: String)
Parameters
spec
The spec to remove
-
Removes a proxy configuration.
Core
will then automatically unregister and place the proxy configuration on a deleted list. For that reason, a removed proxy does NOT need to be freed.Declaration
Swift
public func removeProxyConfig(config: ProxyConfig)
Parameters
config
the
ProxyConfig
to remove -
Remove a supported tag.
See
See also: addSupportedTag()Declaration
Swift
public func removeSupportedTag(tag: String)
Parameters
tag
The tag to remove
-
Clears all state resulting from a previous echo canceller calibration procedure, which restores default policy and settings for echo cancellation.
See
See also: enableEchoCancellation() and startEchoCancellerCalibration()Declaration
Swift
public func resetEchoCancellationCalibration()
-
Reset the counter of missed calls.
Declaration
Swift
public func resetMissedCallsCount()
-
Find a chat room.
Declaration
Swift
public func searchChatRoom(params: ChatRoomParams?, localAddr: Address?, remoteAddr: Address?, participants: [Address]?) -> ChatRoom?
Parameters
params
The chat room parameters to match
ChatRoomParams
or nillocalAddr
Address
representing the local proxy configuration or nilremoteAddr
Address
to search for or nilparticipants
The participants that must be present in the chat room to find.
Return Value
A matching chat room or nil if none matches.
-
Find a conference.
Declaration
Swift
public func searchConference(params: ConferenceParams?, localAddr: Address?, remoteAddr: Address?, participants: [Address]?) -> Conference?
Parameters
params
The conference parameters to match
ConferenceParams
or nillocalAddr
Address
representing the local proxy configuration or nilremoteAddr
Address
to search for or nilparticipants
The participants that must be present in the chat room to find
Return Value
A pointer on
Conference
satisfying the non-nil function arguments or nil if none matches -
Find a conference.
Declaration
Swift
public func searchConference(conferenceAddr: Address) -> Conference?
Parameters
conferenceAddr
Address
representing the conference addressReturn Value
A pointer on
Conference
whose conference address is the one provided as argument or nil if none matches -
Sets the UDP port range from which to randomly select the port used for audio streaming.
Declaration
Swift
public func setAudioPortRange(minPort: Int, maxPort: Int)
Parameters
minPort
The lower bound of the audio port range to use
maxPort
The upper bound of the audio port range to use
-
Set the rectangle where the decoder will search a QRCode.
Declaration
Swift
public func setQrcodeDecodeRect(x: Int, y: Int, w: Int, h: Int)
Parameters
x
axis
y
axis
w
width
h
height
-
Sets the UDP port range from which to randomly select the port used for text streaming.
Declaration
Swift
public func setTextPortRange(minPort: Int, maxPort: Int)
Parameters
minPort
The lower bound of the text port range to use
maxPort
The upper bound of the text port range to use
-
Assign an audio file to be played as a specific tone id. This function typically allows to customize telephony tones per country.
Declaration
Swift
public func setTone(toneId: ToneID, audiofile: String?)
Parameters
toneId
the #LinphoneToneId
audiofile
a wav file to be played or nil to disable it.
-
Set the user agent string used in SIP messages. Set the user agent string used in SIP messages as “[ua_name]/[version]”. No slash character will be printed if nil is given to “version”. If nil is given to “ua_name” and “version” both, the User-agent header will be empty. This function should be called just after linphone_factory_create_core ideally.
Declaration
Swift
public func setUserAgent(name: String?, version: String?)
Parameters
name
Name of the user agent.
version
Version of the user agent.
-
Sets the UDP port range from which to randomly select the port used for video streaming.
Declaration
Swift
public func setVideoPortRange(minPort: Int, maxPort: Int)
Parameters
minPort
The lower bound of the video port range to use
maxPort
The upper bound of the video port range to use
-
Tells whether a specified sound device can capture sound.
- deprecated: 08/07/2020 use
AudioDevice
API instead()
Declaration
Swift
@available(*, deprecated) public func soundDeviceCanCapture(device: String) -> Bool
Parameters
device
the device name as returned by linphone_core_get_sound_devices
Return Value
A boolean value telling whether the specified sound device can capture sound
- deprecated: 08/07/2020 use
-
Tells whether a specified sound device can play sound.
- deprecated: 08/07/2020 use
AudioDevice
API instead()
Declaration
Swift
@available(*, deprecated) public func soundDeviceCanPlayback(device: String) -> Bool
Parameters
device
the device name as returned by linphone_core_get_sound_devices
Return Value
A boolean value telling whether the specified sound device can play sound
- deprecated: 08/07/2020 use
-
Check if a call will need the sound resources in near future (typically an outgoing call that is awaiting response). In liblinphone, it is not possible to have two independant calls using sound device or camera at the same time. In order to prevent this situation, an application can use soundResourcesLocked() to know whether it is possible at a given time to start a new outgoing call. When the function returns true, an application should not allow the user to start an outgoing call.
Declaration
Swift
public func soundResourcesLocked() -> Bool
Return Value
A boolean value telling whether a call will need the sound resources in near future
-
Start a
Core
object after it has been instantiated and not automatically started. Also re-initialize aCore
object that has been stopped using stop(). Must be called only ifGlobalState
is either Ready of Off. State will changed to Startup, Configuring and then On.Declaration
Swift
public func start() throws
Return Value
0: success, -1: global failure, -2: could not connect database
-
Start recording the running conference.
- deprecated: 14/09/2021 Use Conference.startRecording() instead.
Declaration
Swift
@available(*, deprecated) public func startConferenceRecording(path: String) throws
Parameters
path
Path to the file where the recording will be written
Return Value
0 if succeeded. Negative number if failed
-
Starts an echo calibration of the sound devices, in order to find adequate settings for the echo canceler automatically.
Declaration
Swift
public func startEchoCancellerCalibration() throws
Return Value
LinphoneStatus whether calibration has started or not.
-
Start the simulation of call to test the latency with an external device.
Declaration
Swift
public func startEchoTester(rate: UInt) throws
Parameters
rate
Sound sample rate.
Return Value
-1 in case of failure, 1 otherwise.
-
Stop a
Core
object after it has been instantiated and started. If stopped, it can be started again using start(). Must be called only ifGlobalState
is either On. State will changed to Shutdown and then Off.Declaration
Swift
public func stop()
-
Stop asynchronously a
Core
object after it has been instantiated and started. State changes to Shutdown then iterate() must be called to allow the Core to end asynchronous tasks (terminate call, etc.). When all tasks are finished, State will change to Off. Must be called only ifGlobalState
is On. WhenGlobalState
is OffCore
can be started again using start().Declaration
Swift
public func stopAsync()
-
Stop recording the running conference.
- deprecated: 14/09/2021 Use Conference.stopRecording() instead.
Declaration
Swift
@available(*, deprecated) public func stopConferenceRecording() throws
Return Value
0 if succeeded. Negative number if failed
-
Stops playing a dtmf started by playDtmf().
Declaration
Swift
public func stopDtmf()
-
Stop the simulation of call.
Declaration
Swift
public func stopEchoTester() throws
-
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.
Declaration
Swift
public func stopRinging()
-
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.
Declaration
Parameters
resource
the destination resource
event
the event name
expires
the whished duration of the subscription
body
an optional body, may be nil.
Return Value
a
Event
holding the context of the created subcription. -
Take a photo of currently from capture device and write it into a jpeg file. Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns.
Declaration
Swift
public func takePreviewSnapshot(file: String) throws
Parameters
file
a path where to write the jpeg content.
Return Value
0 if successful, -1 otherwise (typically if jpeg format is not supported).
-
Terminates all the calls.
Declaration
Swift
public func terminateAllCalls() throws
Return Value
0
-
Terminate the running conference. If it is a local conference, all calls inside it will become back separate calls and will be put in #LinphoneCallPaused state. If it is a conference involving a focus server, all calls inside the conference will be terminated.
Declaration
Swift
public func terminateConference() throws
Return Value
0 if succeeded. Negative number if failed
-
Upload the log collection to the configured server url.
Declaration
Swift
public func uploadLogCollection()
-
Tells the core to use a separate window for local camera preview video, instead of inserting local view within the remote video window.
Declaration
Swift
public func usePreviewWindow(yesno: Bool)
Parameters
yesno
true to use a separate window, false to insert the preview in the remote video window.
-
Specify whether the tls server certificate must be verified when connecting to a SIP/TLS server.
Declaration
Swift
public func verifyServerCertificates(yesno: Bool)
Parameters
yesno
A boolean value telling whether the tls server certificate must be verified
-
Specify whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.
Declaration
Swift
public func verifyServerCn(yesno: Bool)
Parameters
yesno
A boolean value telling whether the tls server certificate common name must be verified
-
Test if video is supported.
Declaration
Swift
public func videoSupported() -> Bool
Return Value
true if the library was built with video support, false otherwise