Liblinphone  4.5.0
Public Member Functions | List of all members
linphone::ProxyConfig Class Reference

Represents an account configuration to be used by Core. More...

#include <proxy_config.hh>

Inheritance diagram for linphone::ProxyConfig:

Public Member Functions

 ProxyConfig (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneProxyConfig * cPtr ()
 
LINPHONECXX_PUBLIC bool avpfEnabled ()
 Indicates whether AVPF/SAVPF is being used for calls using this proxy config. More...
 
LINPHONECXX_PUBLIC linphone::AVPFMode getAvpfMode () const
 Get enablement status of RTCP feedback (also known as AVPF profile). More...
 
LINPHONECXX_PUBLIC void setAvpfMode (linphone::AVPFMode mode)
 Enable the use of RTCP feedback (also known as AVPF profile). More...
 
LINPHONECXX_PUBLIC uint8_t getAvpfRrInterval () const
 Get the interval between regular RTCP reports when using AVPF/SAVPF. More...
 
LINPHONECXX_PUBLIC void setAvpfRrInterval (uint8_t interval)
 Set the interval between regular RTCP reports when using AVPF/SAVPF. More...
 
LINPHONECXX_PUBLIC std::string getConferenceFactoryUri () const
 Get the conference factory uri. More...
 
LINPHONECXX_PUBLIC void setConferenceFactoryUri (const std::string &uri)
 Set the conference factory uri. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetContact () const
 Return the contact address of the proxy config. More...
 
LINPHONECXX_PUBLIC std::string getContactParameters () const
 Returns the contact parameters. More...
 
LINPHONECXX_PUBLIC void setContactParameters (const std::string &contactParams)
 Set optional contact parameters that will be added to the contact information sent in the registration. More...
 
LINPHONECXX_PUBLIC std::string getContactUriParameters () const
 Returns the contact URI parameters. More...
 
LINPHONECXX_PUBLIC void setContactUriParameters (const std::string &contactUriParams)
 Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CoregetCore () const
 Get the Core object to which is associated the ProxyConfig. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ProxyConfiggetDependency ()
 Get the dependency of a ProxyConfig. More...
 
LINPHONECXX_PUBLIC void setDependency (const std::shared_ptr< linphone::ProxyConfig > &dependsOn)
 Mark this proxy configuration as being dependent on the given one. More...
 
LINPHONECXX_PUBLIC bool getDialEscapePlus () const
 Returns whether or not the + should be replaced by 00. More...
 
LINPHONECXX_PUBLIC void setDialEscapePlus (bool enable)
 Sets whether liblinphone should replace "+" by international calling prefix in dialed numbers (passed to Core::invite() ). More...
 
LINPHONECXX_PUBLIC std::string getDialPrefix () const
 Gets the prefix set for this proxy config. More...
 
LINPHONECXX_PUBLIC void setDialPrefix (const std::string &prefix)
 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 "+". More...
 
LINPHONECXX_PUBLIC std::string getDomain () const
 Get the domain name of the given proxy config. More...
 
LINPHONECXX_PUBLIC linphone::Reason getError () const
 Get the reason why registration failed when the proxy config state is LinphoneRegistrationFailed. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ErrorInfogetErrorInfo () const
 Get detailed information why registration failed when the proxy config state is LinphoneRegistrationFailed. More...
 
LINPHONECXX_PUBLIC int getExpires () const
 Gets the proxy config expires. More...
 
LINPHONECXX_PUBLIC void setExpires (int expires)
 Sets the registration expiration time in seconds. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetIdentityAddress () const
 Gets the identity addres of the proxy config. More...
 
LINPHONECXX_PUBLIC linphone::Status setIdentityAddress (const std::shared_ptr< const linphone::Address > &identity)
 Sets the user identity as a SIP address. More...
 
LINPHONECXX_PUBLIC std::string getIdkey ()
 Get the idkey property of a ProxyConfig. More...
 
LINPHONECXX_PUBLIC void setIdkey (const std::string &idkey)
 Set the idkey property on the given proxy configuration. More...
 
LINPHONECXX_PUBLIC bool isPushNotificationAllowed () const
 Indicates whether to add to the contact parameters the push notification information. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::NatPolicygetNatPolicy () const
 Get The policy that is used to pass through NATs/firewalls when using this proxy config. More...
 
LINPHONECXX_PUBLIC void setNatPolicy (const std::shared_ptr< linphone::NatPolicy > &policy)
 Set the policy to use to pass through NATs/firewalls when using this proxy config. More...
 
LINPHONECXX_PUBLIC unsigned int getPrivacy () const
 Get default privacy policy for all calls routed through this proxy. More...
 
LINPHONECXX_PUBLIC void setPrivacy (unsigned int privacy)
 Set default privacy policy for all calls routed through this proxy. More...
 
LINPHONECXX_PUBLIC bool publishEnabled () const
 Gets if the PUBLISH is enabled. More...
 
LINPHONECXX_PUBLIC void enablePublish (bool enable)
 Indicates either or not, PUBLISH must be issued for this ProxyConfig. More...
 
LINPHONECXX_PUBLIC int getPublishExpires () const
 get the publish expiration time in second. More...
 
LINPHONECXX_PUBLIC void setPublishExpires (int expires)
 Set the publish expiration time in second. More...
 
LINPHONECXX_PUBLIC void setPushNotificationAllowed (bool allow)
 Indicates whether to add to the contact parameters the push notification information. More...
 
LINPHONECXX_PUBLIC std::string getQualityReportingCollector () const
 Get the route of the collector end-point when using quality reporting. More...
 
LINPHONECXX_PUBLIC void setQualityReportingCollector (const std::string &collector)
 Set the route of the collector end-point when using quality reporting. More...
 
LINPHONECXX_PUBLIC bool qualityReportingEnabled ()
 Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035. More...
 
LINPHONECXX_PUBLIC void enableQualityReporting (bool enable)
 Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035. More...
 
LINPHONECXX_PUBLIC int getQualityReportingInterval ()
 Get the interval between interval reports when using quality reporting. More...
 
LINPHONECXX_PUBLIC void setQualityReportingInterval (int interval)
 Set the interval between 2 interval reports sending when using quality reporting. More...
 
LINPHONECXX_PUBLIC std::string getRealm () const
 Get the realm of the given proxy config. More...
 
LINPHONECXX_PUBLIC void setRealm (const std::string &realm)
 Set the realm of the given proxy config. More...
 
LINPHONECXX_PUBLIC std::string getRefKey () const
 Get the persistent reference key associated to the proxy config. More...
 
LINPHONECXX_PUBLIC void setRefKey (const std::string &refkey)
 Associate a persistent reference key to the proxy config. More...
 
LINPHONECXX_PUBLIC bool registerEnabled () const
 Returns whether the proxy config is enabled or not. More...
 
LINPHONECXX_PUBLIC void enableRegister (bool enable)
 Indicates either or not, REGISTRATION must be issued for this ProxyConfig. More...
 
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status setRoute (const std::string &route)
 Sets a SIP route. More...
 
LINPHONECXX_PUBLIC std::list< std::string > getRoutes () const
 Gets the list of the routes set for this proxy config. More...
 
LINPHONECXX_PUBLIC linphone::Status setRoutes (const std::list< std::string > &routes)
 Sets a list of SIP route. More...
 
LINPHONECXX_PUBLIC std::string getServerAddr () const
 Gets the proxy config proxy address. More...
 
LINPHONECXX_PUBLIC linphone::Status setServerAddr (const std::string &serverAddress)
 Sets the proxy address. More...
 
LINPHONECXX_PUBLIC linphone::RegistrationState getState () const
 Get the registration state of the given proxy config. More...
 
LINPHONECXX_PUBLIC std::string getTransport () const
 Get the transport from either service route, route or addr. More...
 
LINPHONECXX_PUBLIC int getUnreadChatMessageCount () const
 Return the unread chat message count for a given proxy config. More...
 
LINPHONECXX_PUBLIC linphone::Status done ()
 Commits modification made to the proxy configuration. More...
 
LINPHONECXX_PUBLIC void edit ()
 Starts editing a proxy configuration. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AuthInfofindAuthInfo () const
 Find authentication info matching proxy config, if any, similarly to linphone_core_find_auth_info. More...
 
LINPHONECXX_PUBLIC std::string getCustomHeader (const std::string &headerName)
 Obtain the value of a header sent by the server in last answer to REGISTER. More...
 
LINPHONECXX_PUBLIC bool isPhoneNumber (const std::string &username)
 Detect if the given input is a phone number or not. More...
 
LINPHONECXX_PUBLIC std::string normalizePhoneNumber (const std::string &username)
 Normalize a human readable phone number into a basic string. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AddressnormalizeSipUri (const std::string &username)
 Normalize a human readable sip uri into a fully qualified LinphoneAddress. More...
 
LINPHONECXX_PUBLIC void pauseRegister ()
 Prevent a proxy config from refreshing its registration. More...
 
LINPHONECXX_PUBLIC void refreshRegister ()
 Refresh a proxy registration. More...
 
LINPHONECXX_PUBLIC void setCustomHeader (const std::string &headerName, const std::string &headerValue)
 Set the value of a custom header sent to the server in REGISTERs request. More...
 

Detailed Description

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:usern.nosp@m.ame@.nosp@m.domai.nosp@m.n.tl.nosp@m.d) 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.

Member Function Documentation

◆ avpfEnabled()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::avpfEnabled ( )

Indicates whether AVPF/SAVPF is being used for calls using this proxy config.

Returns
True if AVPF/SAVPF is enabled, false otherwise.

◆ done()

LINPHONECXX_PUBLIC linphone::Status linphone::ProxyConfig::done ( )

Commits modification made to the proxy configuration.

Returns
0 if successful, -1 otherwise

◆ edit()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::edit ( )

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.

◆ enablePublish()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::enablePublish ( bool  enable)

Indicates either or not, PUBLISH must be issued for this ProxyConfig.

In case this ProxyConfig has been added to Core, follows the edit() rule.

Parameters
enableif true, publish will be engaged

◆ enableQualityReporting()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::enableQualityReporting ( bool  enable)

Indicates whether quality statistics during call should be stored and sent to a collector according to RFC 6035.

Parameters
enableTrue to store quality statistics and send them to the collector, false to disable it.

◆ enableRegister()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::enableRegister ( bool  enable)

Indicates either or not, REGISTRATION must be issued for this ProxyConfig.

In case this ProxyConfig has been added to Core, follows the edit() rule.

Parameters
enableif true, registration will be engaged

◆ findAuthInfo()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::AuthInfo> linphone::ProxyConfig::findAuthInfo ( ) const

Find authentication info matching proxy config, if any, similarly to linphone_core_find_auth_info.

Returns
a AuthInfo matching proxy config criteria if possible, nullptr if nothing can be found.

◆ getAvpfMode()

LINPHONECXX_PUBLIC linphone::AVPFMode linphone::ProxyConfig::getAvpfMode ( ) const

Get 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), or AVPFMode::Disabled (disabled).

◆ getAvpfRrInterval()

LINPHONECXX_PUBLIC uint8_t linphone::ProxyConfig::getAvpfRrInterval ( ) const

Get the interval between regular RTCP reports when using AVPF/SAVPF.

Returns
The interval in seconds.

◆ getConferenceFactoryUri()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getConferenceFactoryUri ( ) const

Get the conference factory uri.

Returns
The uri of the conference factory.

◆ getContact()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::ProxyConfig::getContact ( ) const

Return the contact address of the proxy config.

Returns
a Address correspong to the contact address of the proxy config.

◆ getContactParameters()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getContactParameters ( ) const

Returns the contact parameters.

Returns
previously set contact parameters.

◆ getContactUriParameters()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getContactUriParameters ( ) const

Returns the contact URI parameters.

Returns
previously set contact URI parameters.

◆ getCore()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Core> linphone::ProxyConfig::getCore ( ) const

Get the Core object to which is associated the ProxyConfig.

Returns
The Core object to which is associated the ProxyConfig.

◆ getCustomHeader()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getCustomHeader ( const std::string &  headerName)

Obtain the value of a header sent by the server in last answer to REGISTER.

Parameters
headerNamethe header name for which to fetch corresponding value
Returns
the value of the queried header.

◆ getDependency()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::ProxyConfig> linphone::ProxyConfig::getDependency ( )

Get the dependency of a ProxyConfig.

Returns
The proxy config this one is dependent upon, or nullptr if not marked dependent.

◆ getDialEscapePlus()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::getDialEscapePlus ( ) const

Returns whether or not the + should be replaced by 00.

Returns
whether liblinphone should replace "+" by "00" in dialed numbers (passed to Core::invite()).

◆ getDialPrefix()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getDialPrefix ( ) const

Gets the prefix set for this proxy config.

Returns
dialing prefix.

◆ getDomain()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getDomain ( ) const

Get the domain name of the given proxy config.

Returns
The domain name of the proxy config.

◆ getError()

LINPHONECXX_PUBLIC linphone::Reason linphone::ProxyConfig::getError ( ) const

Get the reason why registration failed when the proxy config state is LinphoneRegistrationFailed.

Returns
The Reason why registration failed for this proxy config.

◆ getErrorInfo()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ErrorInfo> linphone::ProxyConfig::getErrorInfo ( ) const

Get detailed information why registration failed when the proxy config state is LinphoneRegistrationFailed.

Returns
The ErrorInfo explaining why registration failed for this proxy config.

◆ getExpires()

LINPHONECXX_PUBLIC int linphone::ProxyConfig::getExpires ( ) const

Gets the proxy config expires.

Returns
the duration of registration.

◆ getIdentityAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::ProxyConfig::getIdentityAddress ( ) const

Gets the identity addres of the proxy config.

Returns
the SIP identity that belongs to this proxy configuration.

◆ getIdkey()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getIdkey ( )

Get the idkey property of a ProxyConfig.

Returns
The idkey string, or nullptr.

◆ getNatPolicy()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::NatPolicy> linphone::ProxyConfig::getNatPolicy ( ) const

Get The policy that is used to pass through NATs/firewalls when using this proxy config.

If it is set to nullptr, the default NAT policy from the core will be used instead.

Returns
NatPolicy object in use.
See also
Core::getNatPolicy()

◆ getPrivacy()

LINPHONECXX_PUBLIC unsigned int linphone::ProxyConfig::getPrivacy ( ) const

Get default privacy policy for all calls routed through this proxy.

Returns
Privacy mode as LinphonePrivacyMask

◆ getPublishExpires()

LINPHONECXX_PUBLIC int linphone::ProxyConfig::getPublishExpires ( ) const

get the publish expiration time in second.

Default value is the registration expiration value.

Returns
expires in second

◆ getQualityReportingCollector()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getQualityReportingCollector ( ) const

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 nullptr, reports will be send to the proxy domain.

Returns
The SIP address of the collector end-point.

◆ getQualityReportingInterval()

LINPHONECXX_PUBLIC int linphone::ProxyConfig::getQualityReportingInterval ( )

Get the interval between interval reports when using quality reporting.

Returns
The interval in seconds, 0 means interval reports are disabled.

◆ getRealm()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getRealm ( ) const

Get the realm of the given proxy config.

Returns
The realm of the proxy config.

◆ getRefKey()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getRefKey ( ) const

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.

Returns
The reference key string that has been associated to the proxy config, or nullptr if none has been associated.

◆ getRoutes()

LINPHONECXX_PUBLIC std::list<std::string> linphone::ProxyConfig::getRoutes ( ) const

Gets the list of the routes set for this proxy config.

Returns
The list of routes as string.

◆ getServerAddr()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getServerAddr ( ) const

Gets the proxy config proxy address.

Returns
the proxy's SIP address.

◆ getState()

LINPHONECXX_PUBLIC linphone::RegistrationState linphone::ProxyConfig::getState ( ) const

Get the registration state of the given proxy config.

Returns
The RegistrationState of the proxy config.

◆ getTransport()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::getTransport ( ) const

Get the transport from either service route, route or addr.

Returns
The transport as a string (I.E udp, tcp, tls, dtls)

◆ getUnreadChatMessageCount()

LINPHONECXX_PUBLIC int linphone::ProxyConfig::getUnreadChatMessageCount ( ) const

Return the unread chat message count for a given proxy config.

Returns
The unread chat message count.

◆ isPhoneNumber()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::isPhoneNumber ( const std::string &  username)

Detect if the given input is a phone number or not.

Parameters
usernamestring to parse.
Returns
true if input is a phone number, false otherwise.

◆ isPushNotificationAllowed()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::isPushNotificationAllowed ( ) const

Indicates whether to add to the contact parameters the push notification information.

Returns
true if push notification informations should be added, false otherwise.

◆ normalizePhoneNumber()

LINPHONECXX_PUBLIC std::string linphone::ProxyConfig::normalizePhoneNumber ( const std::string &  username)

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.

Parameters
usernamethe string to parse
Returns
nullptr if input is an invalid phone number, normalized phone number from username input otherwise.

◆ normalizeSipUri()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Address> linphone::ProxyConfig::normalizeSipUri ( const std::string &  username)

Normalize a human readable sip uri into a fully qualified LinphoneAddress.

A sip address should look like DisplayName <sip:username:port> . Basically this function performs the following tasks The result is a syntactically correct SIP address.

Parameters
usernamethe string to parse
Returns
nullptr if invalid input, normalized sip address otherwise.

◆ pauseRegister()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::pauseRegister ( )

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().

◆ publishEnabled()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::publishEnabled ( ) const

Gets if the PUBLISH is enabled.

Returns
true if PUBLISH request is enabled for this proxy.

◆ qualityReportingEnabled()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::qualityReportingEnabled ( )

Indicates 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.

◆ refreshRegister()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::refreshRegister ( )

Refresh a proxy registration.

This is useful if for example you resuming from suspend, thus IP address may have changed.

◆ registerEnabled()

LINPHONECXX_PUBLIC bool linphone::ProxyConfig::registerEnabled ( ) const

Returns whether the proxy config is enabled or not.

Returns
true if registration to the proxy is enabled.

◆ setAvpfMode()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setAvpfMode ( linphone::AVPFMode  mode)

Enable the use of RTCP feedback (also known as AVPF profile).

Parameters
modethe enablement mode, which can be AVPFMode::Default (use LinphoneCore's mode), AVPFMode::Enabled (avpf is enabled), or AVPFMode::Disabled (disabled).

◆ setAvpfRrInterval()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setAvpfRrInterval ( uint8_t  interval)

Set the interval between regular RTCP reports when using AVPF/SAVPF.

Parameters
intervalThe interval in seconds (between 0 and 5 seconds).

◆ setConferenceFactoryUri()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setConferenceFactoryUri ( const std::string &  uri)

Set the conference factory uri.

Parameters
uriThe uri of the conference factory.

◆ setContactParameters()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setContactParameters ( const std::string &  contactParams)

Set optional contact parameters that will be added to the contact information sent in the registration.

Parameters
contactParamsa 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@1.nosp@m.5.12.nosp@m.8.128.nosp@m..93:50421>;apple-push-id=43143-DFE23F-2323-FA2232.

◆ setContactUriParameters()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setContactUriParameters ( const std::string &  contactUriParams)

Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI.

Parameters
contactUriParamsa 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@1.nosp@m.5.12.nosp@m.8.128.nosp@m..93:50421;apple-push-id=43143-DFE23F-2323-FA2232>.

◆ setCustomHeader()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setCustomHeader ( const std::string &  headerName,
const std::string &  headerValue 
)

Set the value of a custom header sent to the server in REGISTERs request.

Parameters
headerValuethe header's value

◆ setDependency()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setDependency ( const std::shared_ptr< linphone::ProxyConfig > &  dependsOn)

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 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 core
Parameters
dependsOnThe ProxyConfig this one shall be depend on.

◆ setDialEscapePlus()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setDialEscapePlus ( bool  enable)

Sets whether liblinphone should replace "+" by international calling prefix in dialed numbers (passed to Core::invite() ).

Parameters
enabletrue to replace + by the international prefix, false otherwise.

◆ setDialPrefix()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setDialPrefix ( const std::string &  prefix)

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 "+".

Parameters
prefixthe prefix to set (withouth the +)

◆ setExpires()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setExpires ( int  expires)

Sets the registration expiration time in seconds.

Parameters
expiresthe expiration time to set

◆ setIdentityAddress()

LINPHONECXX_PUBLIC linphone::Status linphone::ProxyConfig::setIdentityAddress ( const std::shared_ptr< const linphone::Address > &  identity)

Sets the user identity as a SIP address.

This identity is normally formed with display name, username and domain, such as: Alice <sip:alice.nosp@m.@exa.nosp@m.mple..nosp@m.net> The REGISTER messages will have from and to set to this identity.

Parameters
identitythe Address of the identity to set

◆ setIdkey()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setIdkey ( const std::string &  idkey)

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()
Parameters
idkeyThe idkey string to associate to the given ProxyConfig.

◆ setNatPolicy()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setNatPolicy ( const std::shared_ptr< linphone::NatPolicy > &  policy)

Set the policy to use to pass through NATs/firewalls when using this proxy config.

If it is set to nullptr, the default NAT policy from the core will be used instead.

Parameters
policyNatPolicy object.
See also
Core::setNatPolicy()

◆ setPrivacy()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setPrivacy ( unsigned int  privacy)

Set default privacy policy for all calls routed through this proxy.

Parameters
privacyPrivacy to configure privacy

◆ setPublishExpires()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setPublishExpires ( int  expires)

Set the publish expiration time in second.

Parameters
expiresin second

◆ setPushNotificationAllowed()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setPushNotificationAllowed ( bool  allow)

Indicates whether to add to the contact parameters the push notification information.

Parameters
allowtrue to allow push notification information, false otherwise.

◆ setQualityReportingCollector()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setQualityReportingCollector ( const std::string &  collector)

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 nullptr, reports will be send to the proxy domain.

Parameters
collectorroute of the collector end-point, if nullptr PUBLISH will be sent to the proxy domain.

◆ setQualityReportingInterval()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setQualityReportingInterval ( int  interval)

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.

Parameters
intervalThe interval in seconds, 0 means interval reports are disabled.

◆ setRealm()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setRealm ( const std::string &  realm)

Set the realm of the given proxy config.

Parameters
realmNew realm value.

◆ setRefKey()

LINPHONECXX_PUBLIC void linphone::ProxyConfig::setRefKey ( const std::string &  refkey)

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.

Parameters
refkeyThe reference key string to associate to the proxy config.

◆ setRoute()

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status linphone::ProxyConfig::setRoute ( const std::string &  route)

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() ).

Parameters
routethe SIP route to set
Returns
-1 if route is invalid, 0 otherwise.
Deprecated:
08/07/2020 use setRoutes() instead

◆ setRoutes()

LINPHONECXX_PUBLIC linphone::Status linphone::ProxyConfig::setRoutes ( const std::list< std::string > &  routes)

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() ).

Parameters
routesA of routes
Returns
-1 if routes are invalid, 0 otherwise.

◆ setServerAddr()

LINPHONECXX_PUBLIC linphone::Status linphone::ProxyConfig::setServerAddr ( const std::string &  serverAddress)

Sets the proxy address.

Examples of valid sip proxy address are:

Parameters
serverAddressthe proxy address to set.

The documentation for this class was generated from the following file: