public interface ProxyConfig
ProxyConfig
object represents a proxy configuration to be used by
the Core
object.
Its fields must not be used directly in favour of the accessors methods. Once
created and filled properly the ProxyConfig
can be given to Core
with Core.addProxyConfig(org.linphone.core.ProxyConfig)
. This will automatically triggers the
registration, if enabled.
The proxy configuration are persistent to restarts because they are saved in
the configuration file. As a consequence, after linphone_core_new there might
already be a list of configured proxy that can be examined with Core.getProxyConfigList()
.
The default proxy (see linphone_core_set_default_proxy ) is the one of the list
that is used by default for calls.Modifier and Type | Method and Description |
---|---|
boolean |
avpfEnabled()
Indicates whether AVPF/SAVPF is being used for calls using this proxy config.
|
int |
done()
Commits modification made to the proxy configuration.
|
void |
edit()
Starts editing a proxy configuration.
|
void |
enablePublish(boolean val)
Indicates either or not, PUBLISH must be issued for this
ProxyConfig . |
void |
enableQualityReporting(boolean enable)
Indicates whether quality statistics during call should be stored and sent to a
collector according to RFC 6035.
|
void |
enableRegister(boolean val)
Indicates either or not, REGISTRATION must be issued for this
ProxyConfig . |
AuthInfo |
findAuthInfo()
Find authentication info matching proxy config, if any, similarly to
linphone_core_find_auth_info.
|
AVPFMode |
getAvpfMode()
Get enablement status of RTCP feedback (also known as AVPF profile).
|
int |
getAvpfRrInterval()
Get the interval between regular RTCP reports when using AVPF/SAVPF.
|
java.lang.String |
getConferenceFactoryUri()
Get the conference factory uri.
|
Address |
getContact()
Return the contact address of the proxy config.
|
java.lang.String |
getContactParameters() |
java.lang.String |
getContactUriParameters() |
Core |
getCore()
Get the
Core object to which is associated the ProxyConfig . |
java.lang.String |
getCustomHeader(java.lang.String headerName)
Obtain the value of a header sent by the server in last answer to REGISTER.
|
ProxyConfig |
getDependency()
Get the dependency of a
ProxyConfig . |
boolean |
getDialEscapePlus() |
java.lang.String |
getDialPrefix() |
java.lang.String |
getDomain()
Get the domain name of the given proxy config.
|
Reason |
getError()
Get the reason why registration failed when the proxy config state is
LinphoneRegistrationFailed.
|
ErrorInfo |
getErrorInfo()
Get detailed information why registration failed when the proxy config state is
LinphoneRegistrationFailed.
|
int |
getExpires() |
Address |
getIdentityAddress() |
java.lang.String |
getIdkey()
Get the idkey property of a
ProxyConfig . |
NatPolicy |
getNatPolicy()
Get The policy that is used to pass through NATs/firewalls when using this
proxy config.
|
int |
getPrivacy()
Get default privacy policy for all calls routed through this proxy.
|
int |
getPublishExpires()
get the publish expiration time in second.
|
java.lang.String |
getQualityReportingCollector()
Get the route of the collector end-point when using quality reporting.
|
int |
getQualityReportingInterval()
Get the interval between interval reports when using quality reporting.
|
java.lang.String |
getRealm()
Get the realm of the given proxy config.
|
java.lang.String |
getRefKey()
Get the persistent reference key associated to the proxy config.
|
java.lang.String |
getRoute()
Deprecated.
Use
getRoutes() instead. |
java.lang.String[] |
getRoutes()
Gets the list of the routes set for this proxy config.
|
java.lang.String |
getServerAddr() |
RegistrationState |
getState()
Get the registration state of the given proxy config.
|
java.lang.String |
getTransport()
Get the transport from either service route, route or addr.
|
int |
getUnreadChatMessageCount()
Return the unread chat message count for a given proxy config.
|
java.lang.Object |
getUserData()
Gets the object stored in this object user's data
|
boolean |
isPhoneNumber(java.lang.String username)
Detect if the given input is a phone number or not.
|
boolean |
isPushNotificationAllowed()
Indicates whether to add to the contact parameters the push notification
information.
|
java.lang.String |
normalizePhoneNumber(java.lang.String username)
Normalize a human readable phone number into a basic string.
|
Address |
normalizeSipUri(java.lang.String username)
Normalize a human readable sip uri into a fully qualified LinphoneAddress.
|
void |
pauseRegister()
Prevent a proxy config from refreshing its registration.
|
boolean |
publishEnabled() |
boolean |
qualityReportingEnabled()
Indicates whether quality statistics during call should be stored and sent to a
collector according to RFC 6035.
|
void |
refreshRegister()
Refresh a proxy registration.
|
boolean |
registerEnabled() |
void |
setAvpfMode(AVPFMode mode)
Enable the use of RTCP feedback (also known as AVPF profile).
|
void |
setAvpfRrInterval(int interval)
Set the interval between regular RTCP reports when using AVPF/SAVPF.
|
void |
setConferenceFactoryUri(java.lang.String uri)
Set the conference factory uri.
|
void |
setContactParameters(java.lang.String contactParams)
Set optional contact parameters that will be added to the contact information
sent in the registration.
|
void |
setContactUriParameters(java.lang.String contactUriParams)
Set optional contact parameters that will be added to the contact information
sent in the registration, inside the URI.
|
void |
setCustomHeader(java.lang.String headerName,
java.lang.String headerValue)
Set the value of a custom header sent to the server in REGISTERs request.
|
void |
setDependency(ProxyConfig dependency)
Mark this proxy configuration as being dependent on the given one.
|
void |
setDialEscapePlus(boolean val)
Sets whether liblinphone should replace "+" by international calling prefix in
dialed numbers (passed to linphone_core_invite ).
|
void |
setDialPrefix(java.lang.String prefix)
Sets 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 "+". |
void |
setExpires(int expires)
Sets the registration expiration time in seconds.
|
int |
setIdentityAddress(Address identity)
Sets the user identity as a SIP address.
|
void |
setIdkey(java.lang.String idkey)
Set the idkey property on the given proxy configuration.
|
void |
setNatPolicy(NatPolicy policy)
Set the policy to use to pass through NATs/firewalls when using this proxy
config.
|
void |
setPrivacy(int privacy)
Set default privacy policy for all calls routed through this proxy.
|
void |
setPublishExpires(int expires)
Set the publish expiration time in second.
|
void |
setPushNotificationAllowed(boolean allow)
Indicates whether to add to the contact parameters the push notification
information.
|
void |
setQualityReportingCollector(java.lang.String collector)
Set the route of the collector end-point when using quality reporting.
|
void |
setQualityReportingInterval(int interval)
Set the interval between 2 interval reports sending when using quality
reporting.
|
void |
setRealm(java.lang.String realm)
Set the realm of the given proxy config.
|
void |
setRefKey(java.lang.String refkey)
Associate a persistent reference key to the proxy config.
|
int |
setRoute(java.lang.String route)
Sets a SIP route.
|
int |
setRoutes(java.lang.String[] routes)
Sets a list of SIP route.
|
int |
setServerAddr(java.lang.String serverAddr)
Sets the proxy address.
|
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
boolean avpfEnabled()
AVPFMode getAvpfMode()
void setAvpfMode(AVPFMode mode)
mode
- the enablement mode, which can be LinphoneAVPFDefault (use
LinphoneCore's mode), LinphoneAVPFEnabled (avpf is enabled), or
LinphoneAVPFDisabled (disabled).int getAvpfRrInterval()
void setAvpfRrInterval(int interval)
interval
- The interval in seconds (between 0 and 5 seconds).java.lang.String getConferenceFactoryUri()
void setConferenceFactoryUri(java.lang.String uri)
uri
- The uri of the conference factoryAddress getContact()
Address
correspong to the contact address of the proxy
config.java.lang.String getContactParameters()
void setContactParameters(java.lang.String contactParams)
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
java.lang.String getContactUriParameters()
void setContactUriParameters(java.lang.String contactUriParams)
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
Core getCore()
Core
object to which is associated the ProxyConfig
.Core
object to which is associated the ProxyConfig
.ProxyConfig getDependency()
ProxyConfig
.void setDependency(ProxyConfig dependency)
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
coreboolean getDialEscapePlus()
void setDialEscapePlus(boolean val)
java.lang.String getDialPrefix()
void setDialPrefix(java.lang.String prefix)
Core.invite(java.lang.String)
; This dialing prefix shall usually be the country code of
the country where the user is living, without "+".java.lang.String getDomain()
Reason getError()
ErrorInfo getErrorInfo()
int getExpires()
void setExpires(int expires)
Address getIdentityAddress()
int setIdentityAddress(Address identity)
java.lang.String getIdkey()
ProxyConfig
.void setIdkey(java.lang.String idkey)
idkey
- The idkey string to associate to the given ProxyConfig
boolean isPushNotificationAllowed()
NatPolicy getNatPolicy()
NatPolicy
object in use.
See also: Core.getNatPolicy()
void setNatPolicy(NatPolicy policy)
policy
- NatPolicy
object
See also: Core.setNatPolicy(org.linphone.core.NatPolicy)
int getPrivacy()
void setPrivacy(int privacy)
privacy
- LinphonePrivacy to configure privacyboolean publishEnabled()
void enablePublish(boolean val)
ProxyConfig
.
In case this ProxyConfig
has been added to Core
, follows the
edit()
rule.val
- if true, publish will be engagedint getPublishExpires()
void setPublishExpires(int expires)
expires
- in secondvoid setPushNotificationAllowed(boolean allow)
allow
- True to allow push notification information, false otherwise.java.lang.String getQualityReportingCollector()
void setQualityReportingCollector(java.lang.String collector)
collector
- route of the collector end-point, if null PUBLISH will be sent
to the proxy domain.boolean qualityReportingEnabled()
void enableQualityReporting(boolean enable)
enable
- True to store quality statistics and send them to the collector,
false to disable it.int getQualityReportingInterval()
void setQualityReportingInterval(int interval)
interval
- The interval in seconds, 0 means interval reports are disabled.java.lang.String getRealm()
void setRealm(java.lang.String realm)
realm
- New realm value.java.lang.String getRefKey()
void setRefKey(java.lang.String refkey)
refkey
- The reference key string to associate to the proxy config.boolean registerEnabled()
void enableRegister(boolean val)
ProxyConfig
.
In case this ProxyConfig
has been added to Core
, follows the
edit()
rule.val
- if true, registration will be engaged@Deprecated java.lang.String getRoute()
getRoutes()
instead.int setRoute(java.lang.String route)
java.lang.String[] getRoutes()
int setRoutes(java.lang.String[] routes)
routes
- A A list of const char * objects. const char * of routesjava.lang.String getServerAddr()
int setServerAddr(java.lang.String serverAddr)
RegistrationState getState()
java.lang.String getTransport()
int getUnreadChatMessageCount()
int done()
void edit()
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.AuthInfo findAuthInfo()
AuthInfo
matching proxy config criteria if possible, null if
nothing can be found.java.lang.String getCustomHeader(java.lang.String headerName)
headerName
- the header name for which to fetch corresponding valueboolean isPhoneNumber(java.lang.String username)
username
- string to parse.java.lang.String normalizePhoneNumber(java.lang.String username)
ProxyConfig
object. This function will always generate a normalized username
if input is a phone number.username
- the string to parseAddress normalizeSipUri(java.lang.String username)
username
- the string to parsevoid pauseRegister()
refreshRegister()
.void refreshRegister()
void setCustomHeader(java.lang.String headerName, java.lang.String headerValue)
headerValue
- the header's valuevoid setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()