ProxyConfig
public class ProxyConfig : LinphoneObject
Represents an account configuration to be used by Core
.
In addition to the AuthInfo
that stores the credentials, you need to
configure a ProxyConfig
as well to be able to connect to a proxy server.
A minimal proxy config consists of an identity address
(sip:username@domain.tld) and the proxy server address, - See also:
setServerAddr().
If any, it will be stored inside the default configuration file, so it will
survive the destruction of the Core
and be available at the next start.
The account set with Core.setDefaultProxyConfig() will be used as default for
outgoing calls & chat messages unless specified otherwise.
- deprecated: 06/04/2020 Use
Account
object instead
-
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> ProxyConfig
-
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Indicates whether AVPF/SAVPF is being used for calls using this proxy config.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var avpfEnabled: Bool { get }
Return Value
True if AVPF/SAVPF is enabled, false otherwise.
- deprecated: 06/04/2020 Use
-
Enable the use of RTCP feedback (also known as AVPF profile).
Declaration
Swift
public var avpfMode: AVPFMode { get set }
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 }
Return Value
The interval in seconds.
-
Set optional contact parameters that will be added to the contact information sent in the registration.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var contactParameters: String { get set }
Return Value
previously set contact parameters.
- deprecated: 06/04/2020 Use
-
Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var contactUriParameters: String { get set }
Return Value
previously set contact URI parameters.
- deprecated: 06/04/2020 Use
-
Mark this proxy configuration as being dependent on the given one. The dependency must refer to a proxy config previously added to the core and which idkey property is defined.
See
See also: setIdkey() The proxy configuration marked as dependent will wait for successful registration on its dependency before triggering its own. Once registered, both proxy configurations will share the same contact address (the ‘dependency’ one). This mecanism must be enabled before the proxy configuration is added to the coreDeclaration
Swift
public var dependency: ProxyConfig? { get set }
Return Value
The proxy config this one is dependent upon, or nil if not marked dependent.
-
Sets whether liblinphone should replace “+” by international calling prefix in dialed numbers (passed to Core.invite() ).
Declaration
Swift
public var dialEscapePlus: Bool { get set }
Return Value
whether liblinphone should replace “+” by “00” in dialed numbers (passed to Core.invite()).
-
Sets a dialing prefix to be automatically prepended when inviting a number with Core.invite(); This dialing prefix shall usually be the country code of the country where the user is living, without “+”.
Declaration
Swift
public var dialPrefix: String { get set }
Return Value
dialing prefix.
-
Get the domain name of the given proxy config.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var domain: String { get }
Return Value
The domain name of the proxy config.
- deprecated: 06/04/2020 Use
-
Get detailed information why registration failed when the proxy config state is LinphoneRegistrationFailed.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var errorInfo: ErrorInfo? { get }
Return Value
The
ErrorInfo
explaining why registration failed for this proxy config. - deprecated: 06/04/2020 Use
-
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
@available(*, deprecated) public var identityAddress: Address? { get }
Return Value
the SIP identity that belongs to this proxy configuration.
-
Declaration
Swift
public func setIdentityaddress(newValue: Address) throws
-
Set the idkey property on the given proxy configuration. This property can the be referenced by another proxy config ‘depends_on’ to create a dependency relation between them. - See also: linphone_proxy_config_set_depends_on()
Declaration
Swift
public var idkey: String { get set }
Return Value
The idkey string, or nil.
-
Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates to VOIP push notification.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var isPushNotificationAllowed: Bool { get }
Return Value
true if push notification informations should be added, false otherwise.
- deprecated: 06/04/2020 Use
-
Gets whether push notifications are available or not (Android & iOS only).
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var isPushNotificationAvailable: Bool { get }
Return Value
true if push notifications are available, false otherwise
- deprecated: 06/04/2020 Use
-
Indicates whether to add to the contact parameters the remote push notification information (IOS only). Default value is false.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var isRemotePushNotificationAllowed: Bool { get }
Return Value
true if remote push notification informations should be added, false otherwise.
- deprecated: 06/04/2020 Use
-
Set the policy to use to pass through NATs/firewalls when using this proxy config. If it is set to nil, the default NAT policy from the core will be used instead.
See
See also: Core.setNatPolicy()- deprecated: 06/04/2020 Use
Account
object instead Get The policy that is used to pass through NATs/firewalls when using this proxy config. If it is set to nil, the default NAT policy from the core will be used instead.
See
See also: Core.getNatPolicy()- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var natPolicy: NatPolicy? { get set }
Return Value
NatPolicy
object in use. - deprecated: 06/04/2020 Use
-
Set default privacy policy for all calls routed through this proxy.
Declaration
Swift
public var privacy: UInt { get set }
Return Value
Privacy mode as LinphonePrivacyMask
-
Indicates either or not, PUBLISH must be issued for this
ProxyConfig
. In case thisProxyConfig
has been added toCore
, follows the edit() rule.Declaration
Swift
public var publishEnabled: Bool { get set }
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 }
Return Value
expires in second
-
Indicates whether to add to the contact parameters the push notification information. For IOS, it indicates to VOIP push notification.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var pushNotificationAllowed: Bool? { get set }
Parameters
allow
true to allow push notification information, false otherwise.
- deprecated: 06/04/2020 Use
-
Sets the push notification configuration.
Declaration
Swift
public var pushNotificationConfig: PushNotificationConfig? { get set }
Return Value
-
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.
- deprecated: 06/04/2020 Use
Account
object instead Get the route of the collector end-point when using quality reporting. This SIP address should be used on server-side to process packets directly before discarding packets. Collector address should be a non existing account and will not receive any messages. If nil, reports will be send to the proxy domain. - deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var qualityReportingCollector: String { get set }
Return Value
The SIP address of the collector end-point.
- deprecated: 06/04/2020 Use
-
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 }
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 }
Return Value
The interval in seconds, 0 means interval reports are disabled.
-
Associate a persistent reference key to the proxy config. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.
deprecated: 06/04/2020 Use
Account
object instead Get the persistent reference key associated to the proxy config. The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var refKey: String { get set }
Return Value
The reference key string that has been associated to the proxy config, or nil if none has been associated.
-
Indicates either or not, REGISTRATION must be issued for this
ProxyConfig
. In case thisProxyConfig
has been added toCore
, follows the edit() rule.Declaration
Swift
public var registerEnabled: Bool { get set }
Return Value
true if registration to the proxy is enabled.
-
Indicates whether to add to the contact parameters the remote push notification information (IOS only).
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
public var remotePushNotificationAllowed: Bool? { get set }
Parameters
allow
true to allow remote push notification information, false otherwise.
- deprecated: 06/04/2020 Use
-
Sets a SIP route. When a route is set, all outgoing calls will go to the route’s destination if this proxy is the default one (see Core.setDefaultProxyConfig() ).
- deprecated: 08/07/2020 use setRoutes() instead
Declaration
Swift
@available(*, deprecated) public func setRoute(newValue: String) throws
Parameters
route
the SIP route to set
Return Value
-1 if route is invalid, 0 otherwise.
-
Sets a list of SIP route. When a route is set, all outgoing calls will go to the route’s destination if this proxy is the default one (see Core.setDefaultProxyConfig() ).
Declaration
Swift
@available(*, deprecated) public var routes: [String] { get }
Return Value
The list of routes as string.
-
Declaration
Swift
public func setRoutes(newValue: [String]) throws
-
Sets the proxy address. Examples of valid sip proxy address are:
Declaration
Swift
@available(*, deprecated) public var serverAddr: String { get }
Return Value
the proxy’s SIP address.
-
Declaration
Swift
public func setServeraddr(newValue: String) throws
-
Get the registration state of the given proxy config.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var state: RegistrationState { get }
Return Value
The
RegistrationState
of the proxy config. - deprecated: 06/04/2020 Use
-
Get the transport from either service route, route or addr.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var transport: String { get }
Return Value
The transport as a string (I.E udp, tcp, tls, dtls)
- deprecated: 06/04/2020 Use
-
Return the unread chat message count for a given proxy config.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public var unreadChatMessageCount: Int { get }
Return Value
The unread chat message count.
- deprecated: 06/04/2020 Use
-
Assign a user pointer to the proxy config.
Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }
Return Value
The user pointer associated with the proxy config.
-
Commits modification made to the proxy configuration.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func done() throws
Return Value
0 if successful, -1 otherwise
- deprecated: 06/04/2020 Use
-
Starts editing a proxy configuration. Because proxy configuration must be consistent, applications MUST call edit() before doing any attempts to modify proxy configuration (such as identity, proxy address and so on). Once the modifications are done, then the application must call done() to commit the changes.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func edit()
- deprecated: 06/04/2020 Use
-
Find authentication info matching proxy config, if any, similarly to linphone_core_find_auth_info.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func findAuthInfo() -> AuthInfo?
Return Value
a
AuthInfo
matching proxy config criteria if possible, nil if nothing can be found. - deprecated: 06/04/2020 Use
-
Obtain the value of a header sent by the server in last answer to REGISTER.
deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func getCustomHeader(headerName: String) -> String
Parameters
headerName
the header name for which to fetch corresponding value
Return Value
the value of the queried header.
-
Normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 or +33888444222 depending on the
ProxyConfig
object. This function will always generate a normalized username if input is a phone number.- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func normalizePhoneNumber(username: String) -> String
Parameters
username
the string to parse
Return Value
nil if input is an invalid phone number, normalized phone number from username input otherwise.
- deprecated: 06/04/2020 Use
-
Normalize a human readable sip uri into a fully qualified LinphoneAddress. A sip address should look like DisplayName sip:username@domain:port . Basically this function performs the following tasks The result is a syntactically correct SIP address.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func normalizeSipUri(username: String) -> Address?
Parameters
username
the string to parse
Return Value
nil if invalid input, normalized sip address otherwise.
- deprecated: 06/04/2020 Use
-
Prevent a proxy config from refreshing its registration. This is useful to let registrations to expire naturally (or) when the application wants to keep control on when refreshes are sent. However, linphone_core_set_network_reachable(lc,true) will always request the proxy configs to refresh their registrations. The refreshing operations can be resumed with refreshRegister().
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func pauseRegister()
- deprecated: 06/04/2020 Use
-
Refresh a proxy registration. This is useful if for example you resuming from suspend, thus IP address may have changed.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func refreshRegister()
- deprecated: 06/04/2020 Use
-
Set the value of a custom header sent to the server in REGISTERs request.
- deprecated: 06/04/2020 Use
Account
object instead
Declaration
Swift
@available(*, deprecated) public func setCustomHeader(headerName: String, headerValue: String?)
Parameters
headerName
the header name
headerValue
the header’s value
- deprecated: 06/04/2020 Use