public interface LinphoneProxyConfig
LinphoneCore.addProxyConfig(LinphoneProxyConfig)
. This will automatically triggers the registration, if enabled.LinphoneCoreFactory.createLinphoneCore(LinphoneCoreListener, String, String, Object, Object)
there might already be a default proxy that can be examined with LinphoneCore.getDefaultProxyConfig()
.Modifier and Type | Method and Description |
---|---|
boolean |
avpfEnabled()
Whether AVPF is used for calls through this proxy.
|
void |
done()
Commits modification made to the proxy configuration.
|
LinphoneProxyConfig |
edit()
Starts editing a proxy configuration.
|
void |
enableAvpf(boolean enable)
Indicates whether AVPF/SAVPF must be used for calls using this proxy config.
|
void |
enablePublish(boolean enable)
Indicates either or not, PUBLISH must be issued for this #LinphoneProxyConfig .
|
void |
enableQualityReporting(boolean enable)
Indicates whether quality reporting must be used for calls using this proxy config.
|
LinphoneProxyConfig |
enableRegister(boolean value)
Enable register for this proxy config.
|
LinphoneAddress |
getAddress()
get linphoneAddress that belongs to this proxy configuration.
|
int |
getAvpfRRInterval()
Get the interval between regular RTCP reports when using AVPF/SAVPF.
|
String |
getContactParameters()
Get the contact's parameters.
|
String |
getContactUriParameters()
Get the contact's URI parameters.
|
String |
getCustomHeader(String name)
Return the value of a header
|
boolean |
getDialEscapePlus()
Whether liblinphone should replace "+" by "00" in dialed numbers (passed to
LinphoneCore.invite(String) ). |
String |
getDialPrefix()
Returns the automatically added international prefix to e164 phone numbers
|
String |
getDomain()
get domain host name or ip
|
Reason |
getError()
Return reason error code.
|
ErrorInfo |
getErrorInfo()
Get full error information about last error occured on the proxy config.
|
int |
getExpires()
Gets the registration expiration time.
|
String |
getIdentity()
get the SIP identity that belongs to this proxy configuration.
|
int |
getPrivacy()
Get the privacy mask requested for this proxy config.
|
String |
getProxy()
get the proxy's SIP address.
|
int |
getPublishExpires() |
String |
getQualityReportingCollector()
Get the collector SIP URI collecting reports when using quality reporting.
|
int |
getQualityReportingInterval()
Get the interval between quality interval reports during a call when using quality reporting.
|
String |
getRealm()
Get the outbound proxy realm.
|
String |
getRoute() |
LinphoneCore.RegistrationState |
getState() |
Object |
getUserData()
Returns user data from a proxy config. return null if any
|
boolean |
isPhoneNumber(String username)
Detect if the given input is a phone number or not.
|
boolean |
isRegistered() |
int |
lookupCCCFromE164(String e164)
Return the international prefix for the given country
|
int |
lookupCCCFromIso(String iso)
Return the international prefix for the given country
|
String |
normalizePhoneNumber(String number)
normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222
|
LinphoneAddress |
normalizeSipUri(String username)
Normalize a human readable sip uri into a fully qualified LinphoneAddress.
|
boolean |
publishEnabled()
returns publish state for this proxy config (see
enablePublish(boolean) ) |
boolean |
qualityReportingEnabled()
Whether quality reporting is used for calls through this proxy.
|
boolean |
registerEnabled() |
void |
setAddress(LinphoneAddress address)
Sets the address of the proxy configuration
|
void |
setAvpfRRInterval(int interval)
Set the interval between regular RTCP reports when using AVPF/SAVPF.
|
void |
setContactParameters(String contact_params)
Set optional contact parameters that will be added to the contact information sent in the registration.
|
void |
setContactUriParameters(String params)
Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI.
|
void |
setCustomHeader(String name,
String value)
Set a custom header
|
void |
setDialEscapePlus(boolean value)
* Sets whether liblinphone should replace "+" by "00" in dialed numbers (passed to
LinphoneCore.invite(String) ). |
void |
setDialPrefix(String prefix)
Useful function to automatically add international prefix to e164 phone numbers
|
void |
setExpires(int delay)
Sets the registration expiration time.
|
void |
setIdentity(String identity)
Sets the user identity as a SIP address.
|
void |
setPrivacy(int privacy_mask)
Set the privacy for all calls or chat sessions using the identity exposed by this LinphoneProxyConfig
|
void |
setProxy(String proxyUri)
Sets the proxy address
Examples of valid sip proxy address are:
IP address: sip:87.98.157.38
IP address with port: sip:87.98.157.38:5062
hostnames : sip:sip.example.net
|
void |
setPublishExpires(int expires)
Set the publish expiration time in second.
|
void |
setQualityReportingCollector(String collector)
Set the collector SIP URI to collect reports when using quality reporting.
|
void |
setQualityReportingInterval(int interval)
Set the interval between quality interval reports during a call when using quality reporting.
|
void |
setRealm(String realm)
Set the outbound proxy realm.
|
void |
setRoute(String routeUri)
Sets a SIP route.
|
void |
setUserData(Object obj)
attached a user data to a proxy config
|
LinphoneProxyConfig 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.void done()
void setIdentity(String identity) throws LinphoneCoreException
identity
- 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.LinphoneCoreException
String getIdentity()
void setAddress(LinphoneAddress address) throws LinphoneCoreException
address
- LinphoneCoreException
LinphoneAddress getAddress()
void setProxy(String proxyUri) throws LinphoneCoreException
proxyUri
- LinphoneCoreException
String getProxy()
LinphoneProxyConfig enableRegister(boolean value)
done()
value
- boolean registerEnabled()
String normalizePhoneNumber(String number)
number
- LinphoneAddress normalizeSipUri(String username)
username
- the string to parsevoid setDialPrefix(String prefix)
prefix
- String getDialPrefix()
void setDialEscapePlus(boolean value)
LinphoneCore.invite(String)
).value
- default value is falseboolean getDialEscapePlus()
LinphoneCore.invite(String)
).String getDomain()
boolean isRegistered()
void setRoute(String routeUri) throws LinphoneCoreException
LinphoneCore.getDefaultProxyConfig()
).routeUri
- ex sip:git.linphone.orgLinphoneCoreException
String getRoute()
void enablePublish(boolean enable)
enable
- if true, publish will be engagedboolean publishEnabled()
enablePublish(boolean)
)LinphoneCore.RegistrationState getState()
void setExpires(int delay)
delay
- expiration time in secondsint getExpires()
void setPrivacy(int privacy_mask)
privacy_mask
- a or'd int of values defined in interface Privacy
int getPrivacy()
Privacy
void enableAvpf(boolean enable)
enable
- True to enable AVPF/SAVF, false to disable it.boolean avpfEnabled()
void setAvpfRRInterval(int interval)
interval
- The interval in seconds (between 0 and 5 seconds).int getAvpfRRInterval()
void enableQualityReporting(boolean enable)
enable
- True to enable quality reporting, false to disable it.boolean qualityReportingEnabled()
void setQualityReportingInterval(int interval)
interval
- The interval in seconds (should be greater than 120 seconds to avoid too much).int getQualityReportingInterval()
void setQualityReportingCollector(String collector)
collector
- The collector SIP URI which should be configured server side too.String getQualityReportingCollector()
void setRealm(String realm)
realm
- The new outbound proxy realm.String getRealm()
void setContactParameters(String contact_params)
contact_params
- 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 android push id.
As an example, the contact address in the SIP register sent will look like <sip:joe@15.128.128.93:50421>;android-push-id=43143-DFE23F-2323-FA2232.String getContactParameters()
void setContactUriParameters(String params)
params
- 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>.String getContactUriParameters()
int lookupCCCFromIso(String iso)
iso
- codeint lookupCCCFromE164(String e164)
e164
- phone numberReason getError()
ErrorInfo getErrorInfo()
void setPublishExpires(int expires)
expires
- in secondint getPublishExpires()
void setUserData(Object obj)
boolean isPhoneNumber(String username)
username
- string to parse.Object getUserData()
void setCustomHeader(String name, String value)
name
- a string containing the name of the headervalue
- a string containing the value of the header