|
Ring Daemon
|
#include <sipaccount.h>


Public Member Functions | |
| std::unique_ptr< AccountConfig > | buildConfig () const override |
| bool | checkNATAddress (pjsip_regc_cbparam *param, pj_pool_t *pool) |
| Update NAT address, Via and Contact header from the REGISTER response. | |
| const SipAccountConfig & | config () const |
| void | connectivityChanged () override |
| Inform the account that the network status has changed. | |
| dhtnet::IpAddr | createBindingAddress () |
| Create the Ip address that the transport uses. | |
| void | destroyRegistrationInfo () |
| void | doRegister () override |
| Initialize the SIP voip link with the account parameters and send registration. | |
| void | doUnregister (bool forceShutdownConnections=false) override |
| Send unregistration. | |
| void | editConfig (std::function< void(SipAccountConfig &conf)> &&edit) |
| void | enablePresence (const bool &enable) |
| Activate the module. | |
| std::string_view | getAccountType () const override |
| dhtnet::IpAddr | getContactAddress () const |
| Get the contact address. | |
| std::string | getContactHeader () const |
| Get the contact header. | |
| unsigned | getCredentialCount () const |
| Get the number of credentials defined for this account. | |
| std::vector< std::map< std::string, std::string > > | getCredentials () const |
| const pjsip_cred_info * | getCredInfo () const |
| std::string | getFromUri () const override |
| pjsip_host_port | getHostPortFromSTUN (pj_pool_t *pool) |
| uint16_t | getLocalPort () const |
| Get the port on which the transport/listener should use, or is actually using. | |
| SIPPresence * | getPresence () const |
| Presence management. | |
| const std::string & | getReceivedParameter () const |
| unsigned | getRegistrationExpire () const |
| A client sendings a REGISTER request MAY suggest an expiration interval that indicates how long the client would like the registration to be valid. | |
| pjsip_regc * | getRegistrationInfo () |
| Get the registration structure that is used for PJSIP in the registration process. | |
| int | getRPort () const |
| std::string | getServerUri () const |
| In the current version, "srv" uri is obtained in the preformatted way: hostname:port. | |
| std::string | getServiceRoute () const |
| pj_uint16_t | getStunPort () const override |
| std::string | getStunServer () const |
| pj_str_t | getStunServerName () const |
| pj_uint16_t | getTlsListenerPort () const |
| Get the local port for TLS listener. | |
| pjsip_tls_setting * | getTlsSetting () |
| std::map< std::string, std::string > | getTlsSettings () const |
| Return the TLS settings, mainly used to return security information to a client application. | |
| std::string | getToUri (const std::string &username) const override |
| This method adds the correct scheme, hostname and append the ;transport= parameter at the end of the uri, in accordance with RFC3261. | |
| virtual std::shared_ptr< SipTransport > | getTransport () |
| pjsip_tpselector | getTransportSelector () |
| Shortcut for SipTransport::getTransportSelector(account.getTransport()). | |
| pjsip_transport_type_e | getTransportType () const |
| std::string | getUserUri () const override |
| pjsip_host_port * | getViaAddr () |
| virtual std::map< std::string, std::string > | getVolatileAccountDetails () const override |
| Retrieve volatile details such as recent registration errors. | |
| bool | hasCredentials () const |
| bool | hasServiceRoute () const |
| bool | isIP2IP () const override |
| Returns true if this is the IP2IP account. | |
| bool | isRegistered () const |
| Registration flag. | |
| bool | isRegistrationRefreshEnabled () const |
| bool | isSrtpEnabled () const override |
| bool | isStunEnabled () const override |
| virtual bool | isTlsEnabled () const override |
| Determine if TLS is enabled for this account. | |
| void | loadConfig () override |
| Actually useless, since config loading is done in init() | |
| MatchRank | matches (std::string_view username, std::string_view hostname) const override |
| std::shared_ptr< SIPCall > | newIncomingCall (const std::string &from, const std::vector< libjami::MediaMap > &mediaList, const std::shared_ptr< SipTransport > &sipTr={}) override |
| Create incoming SIPCall. | |
| std::shared_ptr< Call > | newOutgoingCall (std::string_view toUrl, const std::vector< libjami::MediaMap > &mediaList) override |
| Create outgoing SIPCall. | |
| void | onRegister (pjsip_regc_cbparam *param) |
| void | pushNotificationReceived (const std::string &from, const std::map< std::string, std::string > &data) |
| To be called by clients with relevant data when a push notification is received. | |
| void | resetAutoRegistration () |
| virtual void | sendMessage (const std::string &to, const std::string &deviceId, const std::map< std::string, std::string > &payloads, uint64_t id, bool retryOnTimeout=true, bool onlyConnected=false) override |
| void | sendRegister () |
| Build and send SIP registration request. | |
| void | sendUnregister () |
| Build and send SIP unregistration request. | |
| void | setActiveCodecs (const std::vector< unsigned > &list) override |
| Update both the codec order structure and the codec string used for SDP offer and configuration respectively. | |
| void | setLocalPort (uint16_t port) |
| bool | setPushNotificationConfig (const std::map< std::string, std::string > &data) override |
| bool | setPushNotificationToken (const std::string &pushDeviceToken="") override |
| void | setReceivedParameter (const std::string &received) |
| void | setRegistrationInfo (pjsip_regc *regc) |
| Set the registration structure that is used for PJSIP in the registration process; @pram A pointer to the new registration structure. | |
| virtual void | setRegistrationState (RegistrationState state, int code=0, const std::string &detail_str={}) override |
| Set the registration state of the specified link. | |
| void | setRPort (int rPort) |
| void | setTransport (const std::shared_ptr< SipTransport > &=nullptr) |
| std::shared_ptr< SIPAccount > | shared () |
| std::shared_ptr< SIPAccount const > | shared () const |
| SIPAccount (const std::string &accountID, bool presenceEnabled) | |
| Constructor. | |
| void | supportPresence (int function, bool enable) |
| Activate the publish/subscribe. | |
| void | updateDialogViaSentBy (pjsip_dialog *dlg) |
| void | updateProfile (const std::string &displayName, const std::string &avatar, const std::string &fileType, int32_t flag) override |
| updates SIP account profile | |
| std::weak_ptr< SIPAccount > | weak () |
| std::weak_ptr< SIPAccount const > | weak () const |
| ~SIPAccount () noexcept | |
Public Member Functions inherited from jami::SIPAccountBase | |
| const SipAccountBaseConfig & | config () const |
| void | connectivityChanged () override |
| Inform the account that the network status has changed. | |
| bool | CreateClientDialogAndInvite (const pj_str_t *from, const pj_str_t *contact, const pj_str_t *to, const pj_str_t *target, const pjmedia_sdp_session *local_sdp, pjsip_dialog **dlg, pjsip_inv_session **inv) |
| Create UAC attached dialog and invite session. | |
| std::vector< MediaAttribute > | createDefaultMediaList (bool addVideo, bool hold=false) |
| virtual void | flush () override |
| This method is called to request removal of possible account traces on the system, like internal account setup files. | |
| uint16_t | generateAudioPort () const |
| Socket port generators for media Note: given ports are application wide, a port is unable to be given again by any account instances until it's released by the static method releasePort(). | |
| virtual std::string | getDtmfType () const |
| virtual dhtnet::IceTransportOptions | getIceOptions () const |
| std::vector< libjami::Message > | getLastMessages (const uint64_t &base_timestamp) override |
| const std::string & | getLocalInterface () const |
| Get the local interface name on which this account is bound. | |
| im::MessageStatus | getMessageStatus (uint64_t id) const override |
| Return the status corresponding to the token. | |
| std::string | getPublishedAddress () const |
| Get the public IP address set by the user for this account. | |
| virtual dhtnet::IpAddr | getPublishedIpAddress (uint16_t family=PF_UNSPEC) const |
| bool | getPublishedSameasLocal () const |
| Get a flag which determine the usage in sip headers of either the local IP address and port (localAddress and localPort) or to an address set manually (publishedAddress and publishedPort). | |
| void | loadConfig () override |
| Load the settings in this account. | |
| virtual void | onTextMessage (const std::string &id, const std::string &from, const std::shared_ptr< dht::crypto::Certificate > &peerCert, const std::map< std::string, std::string > &payloads) |
| virtual uint64_t | sendTextMessage (const std::string &to, const std::string &deviceId, const std::map< std::string, std::string > &payloads, uint64_t refreshToken=0, bool onlyConnected=false) override |
| If supported, send a text message from this account. | |
| void | setPublishedAddress (const dhtnet::IpAddr &ip_addr) |
| SIPAccountBase (const std::string &accountID) | |
| Constructor. | |
| virtual | ~SIPAccountBase () noexcept |
Public Member Functions inherited from jami::Account | |
| Account (const std::string &accountID) | |
| void | addDefaultModerator (const std::string &peerURI) |
| void | attach (const std::shared_ptr< Call > &call) |
| void | attach (const std::shared_ptr< Conference > &conf) |
| const AccountConfig & | config () const |
| bool | detach (const std::shared_ptr< Call > &call) |
| void | editConfig (std::function< void(AccountConfig &config)> &&edit) |
| void | enableAutoLoadConversations (bool enable) |
| void | enableIceCompIdRfc5245Compliance (bool enable) |
| void | enableIceForMedia (bool enable) |
| void | enableVideo (bool enable) |
| std::map< std::string, std::string > | getAccountDetails () const |
| const std::string & | getAccountID () const |
| Get the account ID. | |
| std::vector< std::shared_ptr< SystemCodecInfo > > | getActiveAccountCodecInfoList (MediaType mediaType) const |
| std::vector< unsigned > | getActiveCodecs (MediaType mediaType=MEDIA_ALL) const |
| const std::string & | getAlias () const |
| std::shared_ptr< Call > | getCall (const std::string &callId) const |
| std::vector< std::string > | getCallList () const |
| std::shared_ptr< Conference > | getConference (const std::string &confId) const |
| std::vector< std::string > | getConferenceList () const |
| std::set< std::string > | getDefaultModerators () const |
| std::string | getDisplayName () const |
| const std::string & | getHostname () const |
| std::string | getMailBox () const |
| virtual std::map< std::string, std::string > | getNearbyPeers () const |
| const std::filesystem::path & | getPath () const |
| vCard::utils::VCardData | getProfileVcard () const |
| RegistrationState | getRegistrationState () const |
| bool | getRingtoneEnabled () const |
| std::filesystem::path | getRingtonePath () const |
| bool | getUPnPActive () const |
| returns whether or not UPnP is enabled and active ie: if it is able to make port mappings | |
| dhtnet::IpAddr | getUPnPIpAddress () const |
| Get the UPnP IP (external router) address. | |
| const std::string & | getUserAgentName () |
| Get the user-agent. | |
| const std::string & | getUsername () const |
| virtual bool | handleMessage (const std::shared_ptr< dht::crypto::Certificate > &, const std::string &, const std::pair< std::string, std::string > &) |
| void | hangupCalls () |
| Free all ressources related to this account. | |
| bool | hasActiveCodec (MediaType mediaType) const |
| bool | isActive () const noexcept |
| Tell if the account is activated (can currently be used). | |
| bool | isAllModerators () const |
| bool | isAutoAnswerEnabled () const |
| bool | isComposingEnabled () const |
| bool | isDenySecondCallEnabled () const |
| bool | isEmptyOffersEnabled () const |
| bool | isEnabled () const |
| Tell if the account is enable or not. | |
| bool | isIceCompIdRfc5245Compliant () const |
| bool | isIceForMediaEnabled () const |
| bool | isLocalModeratorsEnabled () const |
| bool | isReadReceiptEnabled () const |
| bool | isRendezVous () const |
| bool | isUsable () const |
| bool | isVideoEnabled () const |
| void | loadDefaultCodecs () |
| Helper function used to load the default codec order from the codec factory. | |
| bool | removeConference (const std::string &confId) |
| void | removeDefaultModerator (const std::string &peerURI) |
| virtual void | saveConfig () const |
| std::shared_ptr< SystemCodecInfo > | searchCodecById (unsigned codecId, MediaType mediaType) |
| std::shared_ptr< SystemCodecInfo > | searchCodecByPayload (unsigned payload, MediaType mediaType) |
| void | setAccountDetails (const std::map< std::string, std::string > &details) |
| void | setActive (bool active) noexcept |
| void | setCodecActive (unsigned codecId) |
| void | setCodecInactive (unsigned codecId) |
| void | setConfig (std::unique_ptr< AccountConfig > &&config) |
| void | setEnabled (bool enable) |
| virtual void | setIsComposing (const std::string &, bool) |
| virtual bool | setMessageDisplayed (const std::string &, const std::string &, int) |
| virtual bool | setPushNotificationTopic (const std::string &topic="") |
| virtual | ~Account () |
| Virtual destructor. | |
Static Public Member Functions | |
| static const std::vector< std::string > & | getSupportedTlsCiphers () |
| static const std::vector< std::string > & | getSupportedTlsProtocols () |
Static Public Member Functions inherited from jami::SIPAccountBase | |
| static void | releasePort (uint16_t port) noexcept |
Static Public Member Functions inherited from jami::Account | |
| static std::map< std::string, std::string > | getDefaultCodecDetails (const unsigned &codecId) |
| static std::vector< unsigned > | getDefaultCodecsId () |
| static bool | meetMinimumRequiredVersion (const std::vector< unsigned > &jamiVersion, const std::vector< unsigned > &minRequiredVersion) |
Static Public Attributes | |
| static constexpr auto | ACCOUNT_TYPE = ACCOUNT_TYPE_SIP |
Static Public Attributes inherited from jami::SIPAccountBase | |
| static constexpr unsigned | HALF_MAX_PORT {MAX_PORT / 2} |
| static constexpr unsigned | MAX_PORT {65536} |
Additional Inherited Members | |
Public Attributes inherited from jami::Account | |
| std::mt19937_64 | rand |
| Random generator engine Logical account state shall never rely on the state of the random generator. | |
Protected Member Functions inherited from jami::SIPAccountBase | |
| uint16_t | acquireRandomEvenPort (const std::pair< uint16_t, uint16_t > &range) const |
| uint16_t | getRandomEvenPort (const std::pair< uint16_t, uint16_t > &range) const |
Protected Member Functions inherited from jami::Account | |
| std::vector< unsigned > | getAccountCodecInfoIdList (MediaType mediaType) const |
| std::shared_ptr< SystemCodecInfo > | searchCodecByName (const std::string &name, MediaType mediaType) |
| private account codec searching functions | |
| void | setAllCodecsActive (MediaType mediaType, bool active) |
| void | sortCodec () |
| virtual void | updateUpnpController () |
Static Protected Member Functions inherited from jami::SIPAccountBase | |
| static uint16_t | acquirePort (uint16_t port) |
| static std::array< bool, HALF_MAX_PORT > & | getPortsReservation () noexcept |
Static Protected Member Functions inherited from jami::Account | |
| static std::string | getDefaultUserAgent () |
| Build the user-agent string. | |
| static std::string | mapStateNumberToString (RegistrationState state) |
Protected Attributes inherited from jami::SIPAccountBase | |
| std::deque< libjami::Message > | lastMessages_ |
| SIPVoIPLink & | link_ |
| Voice over IP Link contains a listener thread and calls. | |
| im::MessageEngine | messageEngine_ |
| std::mutex | mutexLastMessages_ |
| The deamon can be launched without any client (or with a non ready client) Like call and file transfer, a client should be able to retrieve current messages. | |
| dhtnet::IpAddr | publishedIp_ [2] {} |
| Published IPv4/IPv6 addresses, used only if defined by the user in account configuration. | |
| std::string | transportError_ {} |
| pj_status_t | transportStatus_ {PJSIP_SC_TRYING} |
| std::shared_ptr< dhtnet::TurnCache > | turnCache_ |
Protected Attributes inherited from jami::Account | |
| std::vector< std::shared_ptr< SystemCodecInfo > > | accountCodecInfoList_ |
| Vector containing all account codecs (set of system codecs with custom parameters) | |
| const std::string | accountID_ |
| Account ID are assign in constructor and shall not changed. | |
| bool | active_ {true} |
| Tells if the account is active now. | |
| bool | autoLoadConversations_ {true} |
| Auto load conversations when creatinf convModule() | |
| std::unique_ptr< AccountConfig > | config_ {} |
| std::recursive_mutex | configurationMutex_ {} |
| bool | iceCompIdRfc5245Compliant_ {false} |
| bool | iceForMediaEnabled_ {true} |
| std::filesystem::path | idPath_ {} |
| path to account | |
| RegistrationState | registrationState_ {RegistrationState::UNLOADED} |
| std::filesystem::path | ringtonePath_ |
| Ringtone .au file used for this account. | |
| std::shared_ptr< SystemCodecContainer > | systemCodecContainer_ |
| Vector containing all system codecs (with default parameters) | |
| std::mutex | upnp_mtx {} |
| UPnP IGD controller and the mutex to access it. | |
| std::shared_ptr< dhtnet::upnp::Controller > | upnpCtrl_ |
Static Protected Attributes inherited from jami::SIPAccountBase | |
| static constexpr size_t | MAX_WAITING_MESSAGES_SIZE = 1000 |
Static Protected Attributes inherited from jami::Account | |
| static const std::string | DEFAULT_USER_AGENT = Account::getDefaultUserAgent() |
Definition at line 46 of file sipaccount.h.
Constructor.
| accountID | The account identifier |
Definition at line 115 of file sipaccount.cpp.
|
noexcept |
Definition at line 125 of file sipaccount.cpp.
References destroyRegistrationInfo(), JAMI_ERR, and setTransport().

|
inlineoverridevirtual |
Implements jami::Account.
Definition at line 72 of file sipaccount.h.
References jami::Account::getAccountID().

| bool jami::SIPAccount::checkNATAddress | ( | pjsip_regc_cbparam * | param, |
| pj_pool_t * | pool | ||
| ) |
|
inline |
Definition at line 70 of file sipaccount.h.
References jami::Account::config().
Referenced by getCredentialCount(), getCredentials(), getLocalPort(), getRegistrationExpire(), getRPort(), getServiceRoute(), getStunServer(), getTlsListenerPort(), hasCredentials(), hasServiceRoute(), isRegistrationRefreshEnabled(), isSrtpEnabled(), isStunEnabled(), isTlsEnabled(), and setLocalPort().

|
overridevirtual |
Inform the account that the network status has changed.
Reimplemented from jami::Account.
Definition at line 739 of file sipaccount.cpp.
| dhtnet::IpAddr jami::SIPAccount::createBindingAddress | ( | ) |
Create the Ip address that the transport uses.
Definition at line 1934 of file sipaccount.cpp.
| void jami::SIPAccount::destroyRegistrationInfo | ( | ) |
Definition at line 1523 of file sipaccount.cpp.
Referenced by setRegistrationInfo(), and ~SIPAccount().
|
overridevirtual |
Initialize the SIP voip link with the account parameters and send registration.
Implements jami::Account.
Definition at line 589 of file sipaccount.cpp.
References JAMI_DBG, JAMI_DEBUG, and JAMI_WARN.
Send unregistration.
Implements jami::Account.
Definition at line 719 of file sipaccount.cpp.
References JAMI_ERR.
|
inline |
Definition at line 76 of file sipaccount.h.
References jami::Account::editConfig(), and jami::emitSignal().
Referenced by setLocalPort().

Activate the module.
Enable the presence module.
| function | Publish or subscribe to enable |
| enable | Flag |
Definition at line 1459 of file sipaccount.cpp.
|
inlineoverridevirtual |
| dhtnet::IpAddr jami::SIPAccount::getContactAddress | ( | ) | const |
Get the contact address.
Definition at line 1226 of file sipaccount.cpp.
| std::string jami::SIPAccount::getContactHeader | ( | ) | const |
Get the contact header.
Definition at line 1233 of file sipaccount.cpp.
Referenced by newIncomingCall(), and newOutgoingCall().
|
inline |
Get the number of credentials defined for this account.
| none |
Definition at line 156 of file sipaccount.h.
References config(), and jami::SipAccountConfig::credentials.
Referenced by jami::PresSubClient::subscribe().

|
inline |
Definition at line 160 of file sipaccount.h.
References config(), and jami::SipAccountConfig::getCredentials().

|
inline |
Definition at line 148 of file sipaccount.h.
Referenced by jami::PresSubClient::subscribe().
|
overridevirtual |
Implements jami::Account.
Definition at line 1140 of file sipaccount.cpp.
Referenced by jami::PresSubClient::PresSubClient(), jami::SIPPresence::reportPresSubClientNotification(), and jami::PresSubClient::subscribe().
| pjsip_host_port jami::SIPAccount::getHostPortFromSTUN | ( | pj_pool_t * | pool | ) |
Definition at line 1364 of file sipaccount.cpp.
|
inline |
Get the port on which the transport/listener should use, or is actually using.
Definition at line 212 of file sipaccount.h.
References config(), and jami::SipAccountConfig::localPort.

| SIPPresence * jami::SIPAccount::getPresence | ( | ) | const |
Presence management.
Definition at line 1450 of file sipaccount.cpp.
|
inline |
Definition at line 311 of file sipaccount.h.
|
inline |
A client sendings a REGISTER request MAY suggest an expiration interval that indicates how long the client would like the registration to be valid.
Definition at line 173 of file sipaccount.h.
References config(), jami::emitSignal(), and jami::SipAccountConfig::registrationExpire.

|
inline |
Get the registration structure that is used for PJSIP in the registration process.
Settings are loaded from configuration file.
Definition at line 190 of file sipaccount.h.
Referenced by jami::PresSubClient::subscribe().
|
inline |
Definition at line 315 of file sipaccount.h.
References config(), and jami::SipAccountConfig::localPort.

| std::string jami::SIPAccount::getServerUri | ( | ) | const |
In the current version, "srv" uri is obtained in the preformatted way: hostname:port.
This method adds the correct scheme and append the ;transport= parameter at the end of the uri, in accordance with RFC3261.
| hostPort | |
| hostPort | A string formatted as : "hostname:port" |
Definition at line 1203 of file sipaccount.cpp.
|
inline |
Definition at line 299 of file sipaccount.h.
References config(), and jami::SipAccountConfig::serviceRoute.
Referenced by jami::PresSubClient::subscribe().

|
inlineoverridevirtual |
Reimplemented from jami::SIPAccountBase.
Definition at line 242 of file sipaccount.h.
|
inline |
Definition at line 255 of file sipaccount.h.
References config(), and jami::SipAccountConfig::stunServer.

|
inline |
Definition at line 232 of file sipaccount.h.
|
static |
Definition at line 1382 of file sipaccount.cpp.
References JAMI_ERR.
Referenced by libjami::getSupportedCiphers().
|
static |
Definition at line 1406 of file sipaccount.cpp.
References jami::VALID_TLS_PROTOS.
Referenced by libjami::getSupportedTlsMethod().
|
inline |
Get the local port for TLS listener.
Definition at line 230 of file sipaccount.h.
References config(), and jami::SipAccountConfig::tlsListenerPort.

|
inline |
Definition at line 224 of file sipaccount.h.
| std::map< std::string, std::string > jami::SIPAccount::getTlsSettings | ( | ) | const |
Return the TLS settings, mainly used to return security information to a client application.
|
overridevirtual |
This method adds the correct scheme, hostname and append the ;transport= parameter at the end of the uri, in accordance with RFC3261.
It is expected that "port" is present in the internal hostname_.
| username | |
| username | A string formatted as : "username" |
Implements jami::SIPAccountBase.
Definition at line 1172 of file sipaccount.cpp.
Referenced by newOutgoingCall().
|
inlinevirtual |
Definition at line 333 of file sipaccount.h.
| pjsip_tpselector jami::SIPAccount::getTransportSelector | ( | ) |
Shortcut for SipTransport::getTransportSelector(account.getTransport()).
Definition at line 365 of file sipaccount.cpp.
|
inline |
Definition at line 335 of file sipaccount.h.
Referenced by newOutgoingCall().
|
overridevirtual |
Implements jami::SIPAccountBase.
Definition at line 1928 of file sipaccount.cpp.
|
inline |
Definition at line 313 of file sipaccount.h.
|
overridevirtual |
Retrieve volatile details such as recent registration errors.
Reimplemented from jami::SIPAccountBase.
Definition at line 474 of file sipaccount.cpp.
References JAMI_WARN, libjami::Account::VolatileProperties::InstantMessaging::OFF_CALL, libjami::TlsTransport::TLS_CIPHER, libjami::TlsTransport::TLS_PEER_CA_, libjami::TlsTransport::TLS_PEER_CA_NUM, and libjami::TlsTransport::TLS_PEER_CERT.
|
inline |
Definition at line 158 of file sipaccount.h.
References config(), jami::SipAccountConfig::credentials, and jami::emitSignal().
Referenced by jami::PresSubClient::subscribe().

|
inline |
Definition at line 301 of file sipaccount.h.
References config(), jami::emitSignal(), and jami::SipAccountConfig::serviceRoute.
Referenced by jami::PresSubClient::subscribe().

|
overridevirtual |
Returns true if this is the IP2IP account.
Reimplemented from jami::Account.
Definition at line 1444 of file sipaccount.cpp.
Referenced by newOutgoingCall(), and jami::SIPPresence::sendPresence().
|
inline |
Registration flag.
Definition at line 182 of file sipaccount.h.
|
inline |
Definition at line 329 of file sipaccount.h.
References config(), and jami::SipAccountConfig::registrationRefreshEnabled.

|
inlineoverridevirtual |
Implements jami::SIPAccountBase.
Definition at line 402 of file sipaccount.h.
References config(), jami::NONE, and jami::SipAccountConfig::srtpKeyExchange.
Referenced by newOutgoingCall().

|
inlineoverridevirtual |
Reimplemented from jami::SIPAccountBase.
Definition at line 248 of file sipaccount.h.
References config(), and jami::SipAccountConfig::stunEnabled.
Referenced by newOutgoingCall().

Determine if TLS is enabled for this account.
TLS provides a secured channel for SIP signalization. It is independent of the media encryption (as provided by SRTP).
Reimplemented from jami::SIPAccountBase.
Definition at line 303 of file sipaccount.h.
References config(), and jami::SipAccountConfig::tlsEnable.
Referenced by newOutgoingCall().

|
overridevirtual |
Actually useless, since config loading is done in init()
Reimplemented from jami::Account.
Definition at line 1075 of file sipaccount.cpp.
|
overridevirtual |
Implements jami::SIPAccountBase.
Definition at line 1503 of file sipaccount.cpp.
References JAMI_LOG.
|
overridevirtual |
Create incoming SIPCall.
| [in] | from | The origin of the call |
| mediaList | A list of media | |
| sipTr | SIP Transport |
Implements jami::SIPAccountBase.
Definition at line 192 of file sipaccount.cpp.
References jami::Manager::callFactory, jami::emitSignal(), getContactHeader(), jami::Call::INCOMING, jami::Manager::instance(), jami::CallFactory::newSipCall(), and shared().

|
overridevirtual |
Create outgoing SIPCall.
| [in] | toUrl | the address to call |
| [in] | mediaList | list of medias |
Implements jami::Account.
Definition at line 202 of file sipaccount.cpp.
References jami::MediaAttribute::buildMediaAttributesList(), jami::SIPAccountBase::createDefaultMediaList(), jami::emitSignal(), getContactHeader(), jami::sip_utils::getHostFromUri(), jami::SIPAccountBase::getLocalInterface(), jami::SIPAccountBase::getPublishedAddress(), jami::SIPAccountBase::getPublishedIpAddress(), jami::SIPAccountBase::getPublishedSameasLocal(), getToUri(), getTransportType(), jami::Account::getUPnPActive(), jami::Account::getUPnPIpAddress(), jami::Manager::instance(), jami::Account::isEmptyOffersEnabled(), isIP2IP(), isSrtpEnabled(), isStunEnabled(), isTlsEnabled(), jami::Account::isVideoEnabled(), JAMI_DBG, JAMI_LOG, JAMI_WARN, jami::SIPAccountBase::link_, jami::MediaAttribute::mediaAttributesToMediaMaps(), jami::Call::OUTGOING, jami::runOnMainThread(), setTransport(), shared(), and jami::SIPVoIPLink::sipTransportBroker.

| void jami::SIPAccount::onRegister | ( | pjsip_regc_cbparam * | param | ) |
Definition at line 853 of file sipaccount.cpp.
References JAMI_DBG, JAMI_ERROR, and JAMI_WARN.
| void jami::SIPAccount::pushNotificationReceived | ( | const std::string & | from, |
| const std::map< std::string, std::string > & | data | ||
| ) |
To be called by clients with relevant data when a push notification is received.
Definition at line 578 of file sipaccount.cpp.
References JAMI_WARNING.
| void jami::SIPAccount::resetAutoRegistration | ( | ) |
Definition at line 1532 of file sipaccount.cpp.
|
overridevirtual |
Implements jami::SIPAccountBase.
Definition at line 1784 of file sipaccount.cpp.
References jami::ctx::acc, JAMI_ERROR, and JAMI_WARN.
| void jami::SIPAccount::sendRegister | ( | ) |
Build and send SIP registration request.
Definition at line 752 of file sipaccount.cpp.
References JAMI_ERR, JAMI_ERROR, JAMI_LOG, JAMI_WARNING, and jami::registration_cb().

| void jami::SIPAccount::sendUnregister | ( | ) |
Build and send SIP unregistration request.
| destroy_transport | If true, attempt to destroy the transport. |
Definition at line 939 of file sipaccount.cpp.
References JAMI_ERR.
Update both the codec order structure and the codec string used for SDP offer and configuration respectively.
Reimplemented from jami::Account.
Definition at line 1953 of file sipaccount.cpp.
References JAMI_WARNING, jami::MEDIA_ALL, jami::MEDIA_AUDIO, and jami::MEDIA_VIDEO.
Definition at line 214 of file sipaccount.h.
References config(), editConfig(), jami::emitSignal(), and jami::SipAccountConfig::localPort.

|
overridevirtual |
Reimplemented from jami::Account.
Definition at line 565 of file sipaccount.cpp.
|
overridevirtual |
Reimplemented from jami::Account.
Definition at line 551 of file sipaccount.cpp.
References JAMI_WARNING.
Definition at line 305 of file sipaccount.h.
References jami::sip_utils::CONST_PJ_STR().

|
inline |
Set the registration structure that is used for PJSIP in the registration process; @pram A pointer to the new registration structure.
Definition at line 198 of file sipaccount.h.
References destroyRegistrationInfo(), and jami::emitSignal().

|
overridevirtual |
Set the registration state of the specified link.
| state | The registration state of underlying VoIPLink |
Reimplemented from jami::SIPAccountBase.
Definition at line 1433 of file sipaccount.cpp.
Definition at line 323 of file sipaccount.h.
References jami::emitSignal().

| void jami::SIPAccount::setTransport | ( | const std::shared_ptr< SipTransport > & | t = nullptr | ) |
Definition at line 333 of file sipaccount.cpp.
References JAMI_DEBUG.
Referenced by newOutgoingCall(), and ~SIPAccount().
|
inline |
Definition at line 51 of file sipaccount.h.
References jami::emitSignal().
Referenced by newIncomingCall(), and newOutgoingCall().

|
inline |
Definition at line 52 of file sipaccount.h.
References jami::emitSignal().

Activate the publish/subscribe.
Set the presence (PUBLISH/SUBSCRIBE) support flags and process the change.
| enable | Flag |
Definition at line 1476 of file sipaccount.cpp.
References JAMI_ERR, JAMI_LOG, PRESENCE_FUNCTION_PUBLISH, and PRESENCE_FUNCTION_SUBSCRIBE.
| void jami::SIPAccount::updateDialogViaSentBy | ( | pjsip_dialog * | dlg | ) |
Definition at line 1759 of file sipaccount.cpp.
|
overridevirtual |
updates SIP account profile
Implements jami::Account.
Definition at line 139 of file sipaccount.cpp.
References jami::emitSignal(), jami::base64::encode(), jami::Account::getAccountID(), jami::Account::getProfileVcard(), jami::Account::idPath_, jami::vCard::utils::initVcard(), JAMI_ERROR, jami::fileutils::loadFile(), jami::vCard::utils::removeByKey(), and jami::vCard::utils::toString().

|
inline |
Definition at line 56 of file sipaccount.h.
References jami::emitSignal().

|
inline |
Definition at line 57 of file sipaccount.h.
References jami::emitSignal().

|
staticconstexpr |
Definition at line 49 of file sipaccount.h.
Referenced by jami::AccountFactory::AccountFactory(), getAccountType(), and jami::transaction_request_cb().
Flag of reregister status.
Definition at line 451 of file sipaccount.h.
| unsigned jami::SIPAccount::attempt_cnt {0} |
| pj_timer_entry jami::SIPAccount::timer {} |