Package org.linphone.core
Interface ProxyConfig
public interface ProxyConfig
Deprecated.
Represents an account configuration to be used by
In addition to the
configure a
A minimal proxy config consists of an identity address
(sip:username@domain.tld) and the proxy server address, see:
.
If any, it will be stored inside the default configuration file, so it will
survive the destruction of the
The account set with
for outgoing calls & chat messages unless specified otherwise.
Core. In addition to the
AuthInfo that stores the credentials, you need toconfigure 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:
setServerAddr(java.lang.String).
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(org.linphone.core.ProxyConfig) will be used as defaultfor outgoing calls & chat messages unless specified otherwise.
-
Method Summary
Modifier and TypeMethodDescriptionintdone()Deprecated.06/04/2020 UseAccountobject insteadvoidedit()Deprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadintDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadgetCore()Deprecated.06/04/2020 UseAccountobject insteadgetCustomHeader(String headerName) Deprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadgetError()Deprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadintDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadgetIdkey()Deprecated.06/04/2020 UseAccountobject insteadlongDeprecated.Gets the native pointer used by this class to make native method calls.Deprecated.06/04/2020 UseAccountobject insteadintDeprecated.06/04/2020 UseAccountobject insteadintDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadintDeprecated.06/04/2020 UseAccountobject insteadgetRealm()Deprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadString[]Deprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadgetState()Deprecated.06/04/2020 UseAccountobject insteadDeprecated.06/04/2020 UseAccountobject insteadintDeprecated.06/04/2020 UseAccountobject insteadDeprecated.Gets the object stored in this object user's databooleanDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadbooleanDeprecated.06/04/2020 UseAccountobject insteadnormalizePhoneNumber(String username) Deprecated.06/04/2020 UseAccountobject insteadnormalizeSipUri(String username) Deprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidsetAvpfMode(AVPFMode mode) Deprecated.06/04/2020 UseAccountobject insteadvoidsetAvpfRrInterval(int interval) Deprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidsetContactParameters(String contactParams) Deprecated.06/04/2020 UseAccountobject insteadvoidsetContactUriParameters(String contactUriParams) Deprecated.06/04/2020 UseAccountobject insteadvoidsetCustomHeader(String headerName, String headerValue) Deprecated.06/04/2020 UseAccountobject insteadvoidsetDependency(ProxyConfig dependsOn) Deprecated.06/04/2020 UseAccountobject insteadvoidsetDialEscapePlus(boolean enable) Deprecated.06/04/2020 UseAccountobject insteadvoidsetDialPrefix(String prefix) Deprecated.06/04/2020 UseAccountobject insteadvoidsetExpires(int expires) Deprecated.06/04/2020 UseAccountobject insteadintsetIdentityAddress(Address identity) Deprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidsetNatPolicy(NatPolicy policy) Deprecated.06/04/2020 UseAccountobject insteadvoidsetPrivacy(int privacy) Deprecated.06/04/2020 UseAccountobject insteadvoidsetPublishEnabled(boolean enable) Deprecated.06/04/2020 UseAccountobject insteadvoidsetPublishExpires(int expires) Deprecated.06/04/2020 UseAccountobject insteadvoidsetPushNotificationAllowed(boolean allow) Deprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidsetQualityReportingCollector(String collector) Deprecated.06/04/2020 UseAccountobject insteadvoidsetQualityReportingEnabled(boolean enable) Deprecated.06/04/2020 UseAccountobject insteadvoidsetQualityReportingInterval(int interval) Deprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidDeprecated.06/04/2020 UseAccountobject insteadvoidsetRegisterEnabled(boolean enable) Deprecated.06/04/2020 UseAccountobject insteadvoidsetRemotePushNotificationAllowed(boolean allow) Deprecated.06/04/2020 UseAccountobject insteadintDeprecated.08/07/2020 usesetRoutes(java.lang.String[])insteadintDeprecated.06/04/2020 UseAccountobject insteadintsetServerAddr(String serverAddress) Deprecated.06/04/2020 UseAccountobject insteadvoidsetUserData(Object data) Deprecated.Sets the object to store in this object user's datatoString()Deprecated.
-
Method Details
-
isAvpfEnabled
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether AVPF/SAVPF is being used for calls using this proxy config.
- Returns:
- True if AVPF/SAVPF is enabled, false otherwise.
-
getAvpfMode
Deprecated.06/04/2020 UseAccountobject insteadGet enablement status of RTCP feedback (also known as AVPF profile).
- Returns:
- the enablement mode, which can be
AVPFMode.Default(use
LinphoneCore's mode),AVPFMode.Enabled(avpf is enabled), orAVPFMode.Disabled
(disabled).
-
setAvpfMode
Deprecated.06/04/2020 UseAccountobject insteadEnable the use of RTCP feedback (also known as AVPF profile).
- Parameters:
mode- the enablement mode, which can beAVPFMode.Default(use
LinphoneCore's mode),AVPFMode.Enabled(avpf is enabled), orAVPFMode.Disabled
(disabled).
-
getAvpfRrInterval
Deprecated.06/04/2020 UseAccountobject insteadGet the interval between regular RTCP reports when using AVPF/SAVPF.
- Returns:
- The interval in seconds.
-
setAvpfRrInterval
Deprecated.06/04/2020 UseAccountobject insteadSet the interval between regular RTCP reports when using AVPF/SAVPF.
- Parameters:
interval- The interval in seconds (between 0 and 5 seconds).
-
getConferenceFactoryUri
Deprecated.06/04/2020 UseAccountobject insteadGet the conference factory uri.
- Returns:
- The uri of the conference factory.
-
setConferenceFactoryUri
Deprecated.06/04/2020 UseAccountobject insteadSet the conference factory uri.
- Parameters:
uri- The uri of the conference factory.
-
getContact
Deprecated.06/04/2020 UseAccountobject insteadReturn the contact address of the proxy config.
- Returns:
- a
Addresscorrespong to the contact address of the proxy
config.
-
getContactParameters
Deprecated.06/04/2020 UseAccountobject insteadReturns the contact parameters.
- Returns:
- previously set contact parameters.
-
setContactParameters
Deprecated.06/04/2020 UseAccountobject insteadSet optional contact parameters that will be added to the contact information
sent in the registration.
- 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.
-
getContactUriParameters
Deprecated.06/04/2020 UseAccountobject insteadReturns the contact URI parameters.
- Returns:
- previously set contact URI parameters.
-
setContactUriParameters
Deprecated.06/04/2020 UseAccountobject insteadSet optional contact parameters that will be added to the contact information
sent in the registration, inside the URI.
- 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>.
-
getCore
Deprecated.06/04/2020 UseAccountobject instead- Returns:
- The
Coreobject to which is associated theProxyConfig.
-
getDependency
Deprecated.06/04/2020 UseAccountobject instead- Returns:
- The proxy config this one is dependent upon, or null if not marked
dependent.
-
setDependency
Deprecated.06/04/2020 UseAccountobject insteadMark 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:setIdkey(java.lang.String)
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
core- Parameters:
dependsOn- TheProxyConfigthis one shall be depend on.
-
getDialEscapePlus
Deprecated.06/04/2020 UseAccountobject insteadReturns whether or not the + should be replaced by 00.
- Returns:
- whether liblinphone should replace "+" by "00" in dialed numbers
(passed toCore.invite(java.lang.String)).
-
setDialEscapePlus
Deprecated.06/04/2020 UseAccountobject insteadSets whether liblinphone should replace "+" by international calling prefix in
dialed numbers (passed toCore.invite(java.lang.String)).
- Parameters:
enable- true to replace + by the international prefix, false otherwise.
-
getDialPrefix
Deprecated.06/04/2020 UseAccountobject insteadGets the prefix set for this proxy config.
- Returns:
- dialing prefix.
-
setDialPrefix
Deprecated.06/04/2020 UseAccountobject insteadSets a dialing prefix to be automatically prepended when inviting a number with
Core.invite(java.lang.String); This dialing prefix shall usually be the country code of
the country where the user is living, without "+".
- Parameters:
prefix- the prefix to set (withouth the +)
-
getDomain
Deprecated.06/04/2020 UseAccountobject insteadGet the domain name of the given proxy config.
- Returns:
- The domain name of the proxy config.
-
getError
Deprecated.06/04/2020 UseAccountobject insteadGet the reason why registration failed when the proxy config state is
LinphoneRegistrationFailed.
- Returns:
- The
Reasonwhy registration failed for this proxy config.
-
getErrorInfo
Deprecated.06/04/2020 UseAccountobject insteadGet detailed information why registration failed when the proxy config state is
LinphoneRegistrationFailed.
- Returns:
- The
ErrorInfoexplaining why registration failed for this proxy
config.
-
getExpires
Deprecated.06/04/2020 UseAccountobject insteadGets the proxy config expires.
- Returns:
- the duration of registration.
-
setExpires
Deprecated.06/04/2020 UseAccountobject insteadSets the registration expiration time in seconds.
- Parameters:
expires- the expiration time to set
-
getIdentityAddress
Deprecated.06/04/2020 UseAccountobject insteadGets the identity addres of the proxy config.
- Returns:
- the SIP identity that belongs to this proxy configuration.
-
setIdentityAddress
Deprecated.06/04/2020 UseAccountobject insteadSets 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.- Parameters:
identity- theAddressof the identity to set
-
getIdkey
Deprecated.06/04/2020 UseAccountobject instead- Returns:
- The idkey string, or null.
-
setIdkey
Deprecated.06/04/2020 UseAccountobject insteadSet 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:
linphone_proxy_config_set_depends_on()- Parameters:
idkey- The idkey string to associate to the givenProxyConfig.
-
isPushNotificationAllowed
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether to add to the contact parameters the push notification
information.
For IOS, it indicates to VOIP push notification.- Returns:
- true if push notification informations should be added, false
otherwise.
-
isPushNotificationAvailable
Deprecated.06/04/2020 UseAccountobject insteadGets whether push notifications are available or not (Android & iOS only).
- Returns:
- true if push notifications are available, false otherwise
-
isRemotePushNotificationAllowed
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether to add to the contact parameters the remote push notification
information (IOS only).
Default value is false.- Returns:
- true if remote push notification informations should be added, false
otherwise.
-
getNatPolicy
Deprecated.06/04/2020 UseAccountobject insteadGet The policy that is used to pass through NATs/firewalls when using this
proxy config.
If it is set to null, the default NAT policy from the core will be used
instead.- Returns:
NatPolicyobject in use.
see:Core.getNatPolicy()
-
setNatPolicy
Deprecated.06/04/2020 UseAccountobject insteadSet the policy to use to pass through NATs/firewalls when using this proxy
config.
If it is set to null, the default NAT policy from the core will be used
instead.- Parameters:
policy-NatPolicyobject.
see:Core.setNatPolicy(org.linphone.core.NatPolicy)
-
getPrivacy
Deprecated.06/04/2020 UseAccountobject insteadGet default privacy policy for all calls routed through this proxy.
- Returns:
- Privacy mode as LinphonePrivacyMask
-
setPrivacy
Deprecated.06/04/2020 UseAccountobject insteadSet default privacy policy for all calls routed through this proxy.
- Parameters:
privacy-Privacyto configure privacy
-
isPublishEnabled
Deprecated.06/04/2020 UseAccountobject insteadGets if the PUBLISH is enabled.
- Returns:
- true if PUBLISH request is enabled for this proxy.
-
setPublishEnabled
Deprecated.06/04/2020 UseAccountobject insteadIndicates either or not, PUBLISH must be issued for thisProxyConfig.
In case thisProxyConfighas been added toCore, follows the
edit()rule.- Parameters:
enable- if true, publish will be engaged
-
getPublishExpires
Deprecated.06/04/2020 UseAccountobject insteadget the publish expiration time in second.
Default value is the registration expiration value.- Returns:
- expires in second
-
setPublishExpires
Deprecated.06/04/2020 UseAccountobject insteadSet the publish expiration time in second.
- Parameters:
expires- in second
-
setPushNotificationAllowed
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether to add to the contact parameters the push notification
information.
For IOS, it indicates to VOIP push notification.- Parameters:
allow- true to allow push notification information, false otherwise.
-
getPushNotificationConfig
Deprecated.06/04/2020 UseAccountobject insteadRetrieves the push notification configuration.
- Returns:
- The
PushNotificationConfig.
-
setPushNotificationConfig
Deprecated.06/04/2020 UseAccountobject insteadSets the push notification configuration.
- Parameters:
pushCfg-PushNotificationConfigto set.
-
getQualityReportingCollector
Deprecated.06/04/2020 UseAccountobject insteadGet 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 null, reports will be send to the proxy
domain.- Returns:
- The SIP address of the collector end-point.
-
setQualityReportingCollector
Deprecated.06/04/2020 UseAccountobject insteadSet 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 null, reports will be send to the proxy
domain.- Parameters:
collector- route of the collector end-point, if null PUBLISH will be sent
to the proxy domain.
-
isQualityReportingEnabled
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether quality statistics during call should be stored and sent to a
collector according to RFC 6035.
- Returns:
- True if quality repotring is enabled, false otherwise.
-
setQualityReportingEnabled
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether quality statistics during call should be stored and sent to a
collector according to RFC 6035.
- Parameters:
enable- True to store quality statistics and send them to the collector,
false to disable it.
-
getQualityReportingInterval
Deprecated.06/04/2020 UseAccountobject insteadGet the interval between interval reports when using quality reporting.
- Returns:
- The interval in seconds, 0 means interval reports are disabled.
-
setQualityReportingInterval
Deprecated.06/04/2020 UseAccountobject insteadSet 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.- Parameters:
interval- The interval in seconds, 0 means interval reports are disabled.
-
getRealm
Deprecated.06/04/2020 UseAccountobject insteadGet the realm of the given proxy config.
- Returns:
- The realm of the proxy config.
-
setRealm
Deprecated.06/04/2020 UseAccountobject insteadSet the realm of the given proxy config.
- Parameters:
realm- New realm value.
-
getRefKey
Deprecated.06/04/2020 UseAccountobject insteadGet the persistent reference key associated to the proxy config.
The reference key can be for example an id to an external database. It is
stored in the config file, thus can survive to process exits/restarts.- Returns:
- The reference key string that has been associated to the proxy config,
or null if none has been associated.
-
setRefKey
Deprecated.06/04/2020 UseAccountobject insteadAssociate 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.- Parameters:
refkey- The reference key string to associate to the proxy config.
-
isRegisterEnabled
Deprecated.06/04/2020 UseAccountobject insteadReturns whether the proxy config is enabled or not.
- Returns:
- true if registration to the proxy is enabled.
-
setRegisterEnabled
Deprecated.06/04/2020 UseAccountobject insteadIndicates either or not, REGISTRATION must be issued for thisProxyConfig
.
In case thisProxyConfighas been added toCore, follows the
edit()rule.- Parameters:
enable- if true, registration will be engaged
-
setRemotePushNotificationAllowed
Deprecated.06/04/2020 UseAccountobject insteadIndicates whether to add to the contact parameters the remote push notification
information (IOS only).
- Parameters:
allow- true to allow remote push notification information, false
otherwise.
-
setRoute
Deprecated.08/07/2020 usesetRoutes(java.lang.String[])insteadSets 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 (seeCore.setDefaultProxyConfig(org.linphone.core.ProxyConfig)).- Parameters:
route- the SIP route to set- Returns:
- -1 if route is invalid, 0 otherwise.
-
getRoutes
Deprecated.06/04/2020 UseAccountobject insteadGets the list of the routes set for this proxy config.
- Returns:
- The list of routes as string.
-
setRoutes
Deprecated.06/04/2020 UseAccountobject insteadSets 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 (seeCore.setDefaultProxyConfig(org.linphone.core.ProxyConfig)).- Parameters:
routes- A of routes- Returns:
- -1 if routes are invalid, 0 otherwise.
-
getServerAddr
Deprecated.06/04/2020 UseAccountobject insteadGets the proxy config proxy address.
- Returns:
- the proxy's SIP address.
-
setServerAddr
Deprecated.06/04/2020 UseAccountobject insteadSets the proxy address.
Examples of valid sip proxy address are:- Parameters:
serverAddress- the proxy address to set.
-
getState
Deprecated.06/04/2020 UseAccountobject insteadGet the registration state of the given proxy config.
- Returns:
- The
RegistrationStateof the proxy config.
-
getTransport
Deprecated.06/04/2020 UseAccountobject insteadGet the transport from either service route, route or addr.
- Returns:
- The transport as a string (I.E udp, tcp, tls, dtls)
-
getUnreadChatMessageCount
Deprecated.06/04/2020 UseAccountobject insteadReturn the unread chat message count for a given proxy config.
- Returns:
- The unread chat message count.
-
done
Deprecated.06/04/2020 UseAccountobject insteadCommits modification made to the proxy configuration.
- Returns:
- 0 if successful, -1 otherwise
-
edit
Deprecated.06/04/2020 UseAccountobject insteadStarts editing a proxy configuration.
Because proxy configuration must be consistent, applications MUST calledit()
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 calldone()to commit the changes. -
findAuthInfo
Deprecated.06/04/2020 UseAccountobject insteadFind authentication info matching proxy config, if any, similarly to
linphone_core_find_auth_info.
- Returns:
- a
AuthInfomatching proxy config criteria if possible, null if
nothing can be found.
-
getCustomHeader
Deprecated.06/04/2020 UseAccountobject insteadObtain the value of a header sent by the server in last answer to REGISTER.
- Parameters:
headerName- the header name for which to fetch corresponding value- Returns:
- the value of the queried header.
-
normalizePhoneNumber
Deprecated.06/04/2020 UseAccountobject insteadNormalize a human readable phone number into a basic string.
888-444-222 becomes 888444222 or +33888444222 depending on theProxyConfig
object. This function will always generate a normalized username if input is a
phone number.- Parameters:
username- the string to parse- Returns:
- null if input is an invalid phone number, normalized phone number from
username input otherwise.
-
normalizeSipUri
Deprecated.06/04/2020 UseAccountobject insteadNormalize a human readable sip uri into a fully qualified LinphoneAddress.
A sip address should look like DisplayName <sip:username@domain:port> .
Basically this function performs the following tasks
The result is a syntactically correct SIP address.- Parameters:
username- the string to parse- Returns:
- null if invalid input, normalized sip address otherwise.
-
pauseRegister
Deprecated.06/04/2020 UseAccountobject insteadPrevent 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 withrefreshRegister(). -
refreshRegister
Deprecated.06/04/2020 UseAccountobject insteadRefresh a proxy registration.
This is useful if for example you resuming from suspend, thus IP address may
have changed. -
setCustomHeader
Deprecated.06/04/2020 UseAccountobject insteadSet the value of a custom header sent to the server in REGISTERs request.
- Parameters:
headerName- the header nameheaderValue- the header's value
-
setUserData
Deprecated.Sets the object to store in this object user's data- Parameters:
data- the object to store
-
getUserData
Object getUserData()Deprecated.Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Deprecated.Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()Deprecated.
-
Accountobject instead