AccountParams
public class AccountParams : LinphoneObject
Object that is used to set the different parameters of a Account
.
Note that authenticated accounts should have a corresponding AuthInfo
added
to the Core
to register properly.
-
Undocumented
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> AccountParams
-
Undocumented
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Enable the use of RTCP feedback (also known as AVPF profile).
Declaration
Swift
public var avpfMode: AVPFMode { get set }
Parameters
mode
the enablement mode, which can be
Default
(use LinphoneCore’s mode),Enabled
(avpf is enabled), orDisabled
(disabled). Get enablement status of RTCP feedback (also known as AVPF profile).Return Value
the enablement mode, which can be
Default
(use LinphoneCore’s mode),Enabled
(avpf is enabled), orDisabled
(disabled). -
Set the interval between regular RTCP reports when using AVPF/SAVPF.
Declaration
Swift
public var avpfRrInterval: UInt8 { get set }
Parameters
interval
The interval in seconds (between 0 and 5 seconds). Get the interval between regular RTCP reports when using AVPF/SAVPF.
Return Value
The interval in seconds.
-
Set the conference factory uri.
Declaration
Swift
public var conferenceFactoryUri: String { get set }
Parameters
uri
The uri of the conference factory.
Get the conference factory uri.Return Value
The uri of the conference factory.
-
Set optional contact parameters that will be added to the contact information sent in the registration.
Declaration
Swift
public var contactParameters: String { get set }
Parameters
contactParams
A string contaning the additional parameters in text form, like “myparam=something;myparam2=something_else”
The main use case for this function is provide the proxy additional information regarding the user agent, like for example unique identifier or apple push id. As an example, the contact address in the SIP register sent will look like sip:joe@15.128.128.93:50421;apple-push-id=43143-DFE23F-2323-FA2232. Returns the contact parameters.Return Value
The previously set contact parameters.
-
Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI.
Declaration
Swift
public var contactUriParameters: String { get set }
Parameters
contactUriParams
A string containing the additional parameters in text form, like “myparam=something;myparam2=something_else”
The main use case for this function is provide the proxy additional information regarding the user agent, like for example unique identifier or apple push id. As an example, the contact address in the SIP register sent will look like sip:joe@15.128.128.93:50421;apple-push-id=43143-DFE23F-2323-FA2232. Return the contact URI parameters.Return Value
The previously set contact URI parameters.
-
Indicates whether chat messages sent by this account in a
Basic
chat room will be using CPIM format or not.Declaration
Swift
public var cpimInBasicChatRoomEnabled: Bool { get set }
Parameters
enable
true to send messages in CPIM format, false to keep using the SIP SIMPLE format. Indicates whether chat messages sent by this account in a
Basic
chat room will be using CPIM format or not. By default SIP SIMPLE format is used for “basic” chat rooms, CPIM is only used forFlexisipChat
chat rooms. - See also: https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Instant%20Messaging/Reply%20to%20a%20specific%20message/Return Value
true if chat messages will be sent out in CPIM format, false if chat messages will be sent out as SIP SIMPLE.
-
Set a an optional custom contact address to be used when registering to the SIP server. This is typically used to supply an alternative SIP address to call in case the main one is not reachable.
Declaration
Swift
public var customContact: Address? { get set }
Parameters
contact
a
Address
the optional alternative contact address.
Get the custom contact address previously used when registering to the SIP server.Return Value
a
Address
-
Set whether liblinphone should replace “+” by international calling prefix in dialed numbers (passed to linphone_core_invite).
Declaration
Swift
public var dialEscapePlusEnabled: Bool { get set }
Parameters
enable
true to replace + by the international prefix, false otherwise. Return whether or not the + should be replaced by 00.
Return Value
Whether liblinphone should replace “+” by “00” in dialed numbers (passed to Core.invite()).
-
Get the domain name of the given account params.
Declaration
Swift
public var domain: String { get }
Return Value
The domain name of the account params.
-
Sets the registration expiration time in seconds.
Declaration
Swift
public var expires: Int { get set }
Parameters
expires
The expiration time to set. Get the account params expires.
Return Value
The duration of registration.
-
Get the identity of the account params.
- deprecated: 01/03/2021 Use getIdentityAddress() instead.
Declaration
Swift
@available(*, deprecated) public var identity: String { get }
Return Value
The SIP identity that belongs to this account params.
-
Sets the user identity as a SIP address. This identity is normally formed with display name, username and domain, such as: Alice sip:alice@example.net The REGISTER messages will have from and to set to this identity.
Declaration
Swift
public var identityAddress: Address? { get }
Parameters
identity
The
Address
of the identity to set.Return Value
The SIP identity that belongs to this account params.
-
Undocumented
Declaration
Swift
public func setIdentityaddress(newValue: Address) throws
-
Set the idkey property on the given account params. This property can the be referenced by another account params ‘depends_on’ to create a dependency relation between them.
Get the idkey property of a
AccountParams
.Declaration
Swift
public var idkey: String { get set }
Parameters
idkey
The idkey string to associate to the given
AccountParams
.Return Value
The idkey string, or nil.
-
Set an international prefix to be automatically prepended when inviting a number with Core.invite(); This international prefix shall usually be the country code of the country where the user is living, without “+”.
Declaration
Swift
public var internationalPrefix: String { get set }
Parameters
prefix
The prefix to set (withouth the +).
Get the prefix set for this account params.Return Value
The international prefix.
-
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
-
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.
Declaration
Swift
public var limeServerUrl: String { get set }
Parameters
url
The x3dh server url.
Get the x3dh server url.Return Value
The x3dh server url.
-
Set the policy to use to pass through NATs/firewalls when using this account params. If it is set to nil, the default NAT policy from the core will be used instead.
See
See also: Core.setNatPolicy() Get The policy that is used to pass through NATs/firewalls when using this account params. If it is set to nil, the default NAT policy from the core will be used instead.See
See also: Core.getNatPolicy()Declaration
Swift
public var natPolicy: NatPolicy? { get set }
Parameters
policy
The
NatPolicy
object.Return Value
The
NatPolicy
object in use. -
If enabled, the proxy will be used as the only route.
Declaration
Swift
public var outboundProxyEnabled: Bool { get set }
Parameters
enable
true to enable, false otherwise. Tell if the proxy is used as the only route.
Return Value
enable true if enabled, false otherwise.
-
Set default privacy policy for all calls routed through this proxy.
Declaration
Swift
public var privacy: UInt { get set }
Parameters
privacy
Privacy
to configure privacy Get default privacy policy for all calls routed through this proxy.Return Value
Privacy mode as LinphonePrivacyMask
-
Indicates either or not, PUBLISH must be issued for this
AccountParams
.Declaration
Swift
public var publishEnabled: Bool { get set }
Parameters
enable
If true, publish will be engaged. Tell if the PUBLISH is enabled.
Return Value
true if PUBLISH request is enabled for this proxy.
-
Set the publish expiration time in second.
Declaration
Swift
public var publishExpires: Int { get set }
Parameters
expires
The expire time in seconds. Get the publish expiration time in second. Default value is the registration expiration value.
Return Value
The expire time in seconds.
-
Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates for VOIP push notification.
Declaration
Swift
public var pushNotificationAllowed: Bool { get set }
Parameters
allow
true to allow push notification information, false otherwise. Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates for VOIP push notification.
Return Value
true if push notification informations should be added, false otherwise.
-
Sets the push notification configuration.
Declaration
Swift
public var pushNotificationConfig: PushNotificationConfig? { get set }
Parameters
config
The
PushNotificationConfig
object.
Returns the push notification configuration.Return Value
The
PushNotificationConfig
object. -
Set the route of the collector end-point when using quality reporting. This SIP address should be used on server-side to process packets directly before discarding packets. Collector address should be a non existing account and will not receive any messages. If nil, reports will be send to the proxy domain.
Declaration
Swift
public var qualityReportingCollector: String { get set }
Parameters
collector
route of the collector end-point, if nil PUBLISH will be sent to the proxy domain.
Get the route of the collector end-point when using quality reporting. This SIP address should be used on server-side to process packets directly before discarding packets. Collector address should be a non existing account and will not receive any messages. If nil, reports will be send to the proxy domain.Return Value
The SIP address of the collector end-point.
-
Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035.
Declaration
Swift
public var qualityReportingEnabled: Bool { get set }
Parameters
enable
true to store quality statistics and send them to the collector, false to disable it. Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035.
Return Value
true if quality repotring is enabled, false otherwise.
-
Set the interval between 2 interval reports sending when using quality reporting. If call exceed interval size, an interval report will be sent to the collector. On call termination, a session report will be sent for the remaining period. Value must be 0 (disabled) or positive.
Declaration
Swift
public var qualityReportingInterval: Int { get set }
Parameters
interval
The interval in seconds, 0 means interval reports are disabled. Get the interval between interval reports when using quality reporting.
Return Value
The interval in seconds, 0 means interval reports are disabled.
-
Set the realm of the given account params.
Declaration
Swift
public var realm: String { get set }
Parameters
realm
New realm value.
Get the realm of the given account params.Return Value
The realm of the account params.
-
Associate a persistent reference key to the account params. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.
Declaration
Swift
public var refKey: String { get set }
Parameters
refkey
The reference key string to associate to the account params.
Get the persistent reference key associated to the account params. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.Return Value
The reference key string that has been associated to the account params, or nil if none has been associated.
-
Indicates either or not, REGISTRATION must be issued for this
AccountParams
.Declaration
Swift
public var registerEnabled: Bool { get set }
Parameters
enable
If true, registration will be engaged. Returns whether the account params is enabled or not.
Return Value
true if registration to the proxy is enabled.
-
Indicates whether to add to the contact parameters the push notification information.
Declaration
Swift
public var remotePushNotificationAllowed: Bool { get set }
Parameters
allow
true to allow remote push notification information, false otherwise. Indicates whether to add to the contact parameters the push notification information.
Return Value
true if remote push notification informations should be added, false otherwise.
-
Sets a list of SIP route. When a route is set, all outgoing calls will go to the route’s destination if this account is the default one (see Core.setDefaultAccount()).
Warning
This function cannot be used if linphone_account_params_is_outbound_proxy_enabled is true.Warning
If linphone_account_params_is_outbound_proxy_enabled is true then it will only return the proxy address.Declaration
Swift
public var routesAddresses: [Address] { get }
Parameters
routes
A list of routes.
Return Value
The list of routes.
-
Undocumented
Declaration
Swift
public func setRoutesaddresses(newValue: [Address]) throws
-
Indicates whether support of rtp bundle is assumed. See enableRtpBundle() for background information about rtp bundle. Assumption that RTP bundling support allows interesting optimizations, such as not gathering RTCP candidates, and not gathering candidates for video stream when making an outgoing call. This setting is meaningful only if rtp bundle is enabled. See https://datatracker.ietf.org/doc/html/rfc8843 for more information about the feature.
Declaration
Swift
public var rtpBundleAssumptionEnabled: Bool { get set }
Parameters
value
a boolean to indicate whether RTP bundle support can be assumed. Returns whether RTP bundle mode is assumed. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.
Return Value
a boolean indicating when rtp bundle support is assumed.
-
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.
Declaration
Swift
public var rtpBundleEnabled: Bool { get set }
Parameters
value
a boolean to indicate whether the feature is to be enabled. Returns whether RTP bundle mode (also known as Media Multiplexing) is enabled. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.
Return Value
a boolean indicating the enablement of rtp bundle mode.
-
Sets the proxy address. Examples of valid sip proxy address are:
- deprecated: 01/03/2021 Use setServerAddress() instead. Get the account params proxy address.
- deprecated: 01/03/2021 Use getServerAddress() instead.
Declaration
Swift
@available(*, deprecated) public var serverAddr: String { get }
Parameters
serverAddress
The proxy address to set.
Return Value
The proxy’s SIP address.
-
Undocumented
Declaration
Swift
public func setServeraddr(newValue: String) throws
-
Undocumented
Declaration
Swift
public func setServeraddress(newValue: Address) throws
-
Sets the transport type of the server address.
Declaration
Swift
public var transport: TransportType { get set }
Parameters
transport
The
TransportType
to set. Returns the transport type of the server address.Return Value
The
TransportType
of the server address. -
If enabled, the international prefix will automaticaly be used for calls and chats.
Declaration
Swift
public var useInternationalPrefixForCallsAndChats: Bool { get set }
Parameters
enable
true to use the international prefix for calls, false otherwise. Return whether or not the international prefix will automaticaly be used for calls and chats.
Return Value
Whether we should use international prefix automatically for calls.
-
Assign a user pointer to the account params.
Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }
Parameters
userData
The user data.
Retrieve the user pointer associated with the account params.Return Value
The user data.
-
Set one custom parameter to this
AccountParams
.Declaration
Swift
public func addCustomParam(key: String, value: String)
Parameters
key
key of the searched parameter.
value
value of the searched parameter.
-
Instantiate a new account params with values from source.
Declaration
Swift
public func clone() -> AccountParams?
Return Value
The newly created
AccountParams
object. -
Get the custom parameter with key to this
AccountParams
.Declaration
Swift
public func getCustomParam(key: String) -> String
Parameters
key
key of the searched parameter.
Return Value
The value of the parameter with key if found or an empty string otherwise.