reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::UserProfile Class Reference

#include <UserProfile.hxx>

Inheritance diagram for resip::UserProfile:
[legend]

Classes

struct  DigestCredential
 

Public Member Functions

 UserProfile ()
 
 UserProfile (std::shared_ptr< Profile > baseProfile)
 
virtual ~UserProfile ()
 
virtual void setDefaultFrom (const NameAddr &from)
 
virtual NameAddr & getDefaultFrom () noexcept
 
virtual void setServiceRoute (const NameAddrs &sRoute)
 
virtual NameAddrs & getServiceRoute () noexcept
 
virtual void setImsAuthUser (const Data &userName, const Data &host)
 
virtual Data & getImsAuthUserName () noexcept
 
virtual Data & getImsAuthHost () noexcept
 
virtual std::shared_ptr< UserProfile > getAnonymousUserProfile () const
 
bool isAnonymous () const
 
virtual void addGruu (const Data &aor, const NameAddr &contact)
 
virtual bool hasGruu (const Data &aor) const
 
virtual bool hasGruu (const Data &aor, const Data &instance) const
 
virtual NameAddr & getGruu (const Data &aor)
 
virtual NameAddr & getGruu (const Data &aor, const NameAddr &contact)
 
virtual bool & gruuEnabled () noexcept
 
virtual bool gruuEnabled () const noexcept
 
virtual bool hasPublicGruu () const
 
virtual const Uri & getPublicGruu () const noexcept
 
virtual void setPublicGruu (const Uri &gruu)
 
virtual bool hasTempGruu () const
 
virtual const Uri & getTempGruu () const noexcept
 
virtual void setTempGruu (const Uri &gruu)
 
virtual void clearDigestCredentials () noexcept
 The following functions deal with clearing, setting and getting of digest credentals.
 
virtual void setDigestCredential (const Data &realm, const Data &user, const Data &password, bool isPasswordA1Hash=false)
 For the password you may either provide the plain text password (isPasswordA1Hash = false) or the Digest A1 MD5 Hash (isPasswordA1Hash = true).
 
virtual const DigestCredential & getDigestCredential (const Data &realm)
 
virtual void setDigestCacheUseLimit (unsigned long digestCacheUseLimit) noexcept
 
virtual unsigned long getDigestCacheUseLimit () const noexcept
 
virtual bool & clientOutboundEnabled () noexcept
 
virtual bool clientOutboundEnabled () const noexcept
 
virtual bool hasInstanceId ()
 
virtual void setInstanceId (const Data &id)
 
virtual const Data & getInstanceId () const noexcept
 
virtual void setRegId (int regId) noexcept
 
virtual int getRegId () noexcept
 
const Tuple & getClientOutboundFlowTuple () const noexcept
 
void clearClientOutboundFlowTuple ()
 
void setClientOutboundFlowTuple (const Tuple &outboundFlowTuple)
 
- Public Member Functions inherited from resip::Profile
 Profile ()
 
 Profile (std::shared_ptr< Profile > baseProfile)
 
 Profile (const Profile &)=default
 
 Profile (Profile &&)=default
 
virtual ~Profile ()=default
 
Profile & operator= (const Profile &)=default
 
Profile & operator= (Profile &&)=default
 
virtual void reset ()
 Reset this profile to it's initial state - (same as calling unsetXXX for each setting) If no fall through (base) profile was provided as creation time.
 
virtual void setDefaultRegistrationTime (uint32_t secs) noexcept
 Note: setXXXX methods will set this setting internally in this object.
 
virtual uint32_t getDefaultRegistrationTime () const noexcept
 
virtual void unsetDefaultRegistrationTime () noexcept
 
virtual void setDefaultMaxRegistrationTime (uint32_t secs) noexcept
 If a registration gets rejected with a 423, then we ensure the MinExpires value is less than this before re-registering Set to 0 to disable this check and accept any time suggested by the server.
 
virtual uint32_t getDefaultMaxRegistrationTime () const noexcept
 
virtual void unsetDefaultMaxRegistrationTime () noexcept
 
virtual void setDefaultRegistrationRetryTime (int secs) noexcept
 The time to retry registrations on error responses (if Retry-After header is not present in error) Set to 0 to never retry on errors.
 
virtual int getDefaultRegistrationRetryTime () const noexcept
 
virtual void unsetDefaultRegistrationRetryTime () noexcept
 
virtual void setDefaultSubscriptionTime (uint32_t secs) noexcept
 This default is used if no value is passed in when creating a subscription.
 
virtual uint32_t getDefaultSubscriptionTime () const noexcept
 
virtual void unsetDefaultSubscriptionTime () noexcept
 
virtual void setDefaultPublicationTime (uint32_t secs) noexcept
 This default is used if no value is passed in when creating a publication.
 
virtual uint32_t getDefaultPublicationTime () const noexcept
 
virtual void unsetDefaultPublicationTime () noexcept
 
virtual void setDefaultStaleCallTime (int secs) noexcept
 Call is stale if UAC gets no final response within the stale call timeout (default 3 minutes)
 
virtual int getDefaultStaleCallTime () const noexcept
 
virtual void unsetDefaultStaleCallTime () noexcept
 
virtual void setDefaultStaleReInviteTime (int secs) noexcept
 ReInvite is stale if UAC gets no final response within the stale reinvite timeout (default 40 seconds)
 
virtual int getDefaultStaleReInviteTime () const noexcept
 
virtual void unsetDefaultStaleReInviteTime () noexcept
 
virtual void setDefaultSessionTime (uint32_t secs) noexcept
 Only used if timer option tag is set in MasterProfile.
 
virtual uint32_t getDefaultSessionTime () const noexcept
 
virtual void unsetDefaultSessionTime () noexcept
 
virtual void setDefaultSessionTimerMode (Profile::SessionTimerMode mode) noexcept
 
virtual Profile::SessionTimerMode getDefaultSessionTimerMode () const noexcept
 
virtual void unsetDefaultSessionTimerMode () noexcept
 
virtual void set1xxRetransmissionTime (int secs) noexcept
 The amount of time that can pass before dum will resubmit an unreliable provisional response.
 
virtual int get1xxRetransmissionTime () const noexcept
 
virtual void unset1xxRetransmissionTime () noexcept
 
virtual void set1xxRelResubmitTime (int secs) noexcept
 The amount of time that can pass before dum will resubmit a reliable provisional response.
 
virtual int get1xxRelResubmitTime () const noexcept
 
virtual void unset1xxRelResubmitTime () noexcept
 
virtual void setOverrideHostAndPort (const Uri &hostPort)
 overrides the value used to populate the contact ?dcm? – also change via entries? Also, dum currently uses(as a uas) the request uri of the dialog constructing request for the local contact within that dialog.
 
virtual bool hasOverrideHostAndPort () const noexcept
 
virtual const Uri & getOverrideHostAndPort () const
 
virtual void unsetOverrideHostAndPort () noexcept
 
virtual void addAdvertisedCapability (Headers::Type header)
 enable/disable sending of Allow/Supported/Accept-Language/Accept-Encoding headers on initial outbound requests (ie.
 
virtual bool isAdvertisedCapability (Headers::Type header) const
 
virtual void clearAdvertisedCapabilities () noexcept
 
virtual void unsetAdvertisedCapabilities ()
 
virtual void setOutboundProxy (const Uri &uri)
 Use to route all outbound requests through a particular proxy.
 
virtual const NameAddr & getOutboundProxy () const
 
virtual bool hasOutboundProxy () const noexcept
 
virtual void unsetOutboundProxy () noexcept
 
virtual void setForceOutboundProxyOnAllRequestsEnabled (bool enabled) noexcept
 If enabled, forces use of outbound proxy on all requests, including mid-dialog requests.
 
virtual bool getForceOutboundProxyOnAllRequestsEnabled () const noexcept
 
virtual void unsetForceOutboundProxyOnAllRequestsEnabled () noexcept
 
virtual void setExpressOutboundAsRouteSetEnabled (bool enabled) noexcept
 If enabled, add a route header for the outbound proxy.
 
virtual bool getExpressOutboundAsRouteSetEnabled () const noexcept
 
virtual void unsetExpressOutboundAsRouteSetEnabled () noexcept
 
virtual void setRportEnabled (bool enabled) noexcept
 enable/disable rport for requests. rport is enabled by default
 
virtual bool getRportEnabled () const noexcept
 
virtual void unsetRportEnabled () noexcept
 
virtual void setUserAgent (const Data &userAgent)
 if set then UserAgent header is added to outbound messages
 
virtual const Data & getUserAgent () const
 
virtual bool hasUserAgent () const noexcept
 
virtual void unsetUserAgent () noexcept
 
virtual void setProxyRequires (const Tokens &proxyRequires)
 if set then ProxyRequires header is added to outbound messages
 
virtual const Tokens & getProxyRequires () const
 
virtual bool hasProxyRequires () const noexcept
 
virtual void unsetProxyRequires () noexcept
 
virtual void setKeepAliveTimeForDatagram (int keepAliveTime) noexcept
 time between CR/LF keepalive messages in seconds.
 
virtual int getKeepAliveTimeForDatagram () const noexcept
 
virtual void unsetKeepAliveTimeForDatagram () noexcept
 
virtual void setKeepAliveTimeForStream (int keepAliveTime) noexcept
 
virtual int getKeepAliveTimeForStream () const noexcept
 
virtual void unsetKeepAliveTimeForStream () noexcept
 
virtual void setFixedTransportPort (int fixedTransportPort) noexcept
 If set dum will provide a port in the via for requests sent down to the stack.
 
virtual int getFixedTransportPort () const noexcept
 
virtual void unsetFixedTransportPort () noexcept
 
virtual void setFixedTransportInterface (const Data &fixedTransportInterface)
 If set dum will provide a interface in the via for requests sent down to the stack.
 
virtual const Data & getFixedTransportInterface () const
 
virtual void unsetFixedTransportInterface ()
 
virtual void setRinstanceEnabled (bool enabled) noexcept
 If enabled then rinstance parameter is added to contacts.
 
virtual bool getRinstanceEnabled () const noexcept
 
virtual void unsetRinstanceEnabled () noexcept
 
virtual void setOutboundDecorator (std::shared_ptr< MessageDecorator > outboundDecorator) noexcept
 
virtual std::shared_ptr< MessageDecorator > getOutboundDecorator () noexcept
 
virtual void unsetOutboundDecorator () noexcept
 
virtual void setMethodsParamEnabled (bool enabled) noexcept
 If enabled then methods parameter is added to contacts.
 
virtual bool getMethodsParamEnabled () const noexcept
 
virtual void unsetMethodsParamEnabled () noexcept
 
virtual void setUserAgentCapabilities (const NameAddr &capabilities)
 If set, the parameters on the provided NameAddr are used in the contact header Example: include <resip/stack/ExtensionParameter.hxx> static const resip::ExtensionParameter p_automaton("automaton"); static const resip::ExtensionParameter p_byeless("+sip.byeless"); static const resip::ExtensionParameter p_rendering("+sip.rendering"); ... NameAddr capabilities; capabilities.param(p_automaton); capabilities.param(p_byeless); capabilities.param(p_rendering) = "\"no\""; profile->setUserAgentCapabilities(capabilities);.
 
virtual bool hasUserAgentCapabilities () const noexcept
 
virtual const NameAddr & getUserAgentCapabilities () const
 
virtual void unsetUserAgentCapabilities () noexcept
 
virtual void setExtraHeadersInReferNotifySipFragEnabled (bool enabled) noexcept
 If enabled then dialog identifying headers are added to SipFrag bodies that are generated in an InviteSession.
 
virtual bool getExtraHeadersInReferNotifySipFragEnabled () const noexcept
 
virtual void unsetExtraHeadersInReferNotifySipFragEnabled () noexcept
 
virtual void setHandleInviteSession491AsGeneralFailureEnabled (bool enabled)
 
virtual bool getHandleInviteSession491AsGeneralFailureEnabled () const
 
virtual void unsetHandleInviteSession491AsGeneralFailureEnabled ()
 

Protected Member Functions

virtual UserProfile * clone () const
 

Friends

class DialogUsageManager
 
class ClientRegistration
 
class Dialog
 
EncodeStream & operator<< (EncodeStream &, const UserProfile &profile)
 

Additional Inherited Members

- Public Types inherited from resip::Profile
enum  SessionTimerMode { PreferLocalRefreshes , PreferRemoteRefreshes , PreferCallerRefreshes , PreferCalleeRefreshes }
 Only used if timer option tag is set in MasterProfile. More...
 

Detailed Description

Definition at line 17 of file UserProfile.hxx.

Constructor & Destructor Documentation

◆ UserProfile() [1/2]

UserProfile::UserProfile ( )

Definition at line 15 of file UserProfile.cxx.

◆ UserProfile() [2/2]

UserProfile::UserProfile ( std::shared_ptr< Profile >  baseProfile)
explicit

Definition at line 24 of file UserProfile.cxx.

◆ ~UserProfile()

UserProfile::~UserProfile ( )
virtual

Definition at line 33 of file UserProfile.cxx.

Member Function Documentation

◆ addGruu()

void UserProfile::addGruu ( const Data &  aor,
const NameAddr &  contact 
)
virtual

Definition at line 101 of file UserProfile.cxx.

◆ clearClientOutboundFlowTuple()

void resip::UserProfile::clearClientOutboundFlowTuple ( )
inline

Definition at line 132 of file UserProfile.hxx.

◆ clearDigestCredentials()

void UserProfile::clearDigestCredentials ( )
virtualnoexcept

The following functions deal with clearing, setting and getting of digest credentals.

Definition at line 134 of file UserProfile.cxx.

◆ clientOutboundEnabled() [1/2]

virtual bool resip::UserProfile::clientOutboundEnabled ( ) const
inlinevirtualnoexcept

Definition at line 118 of file UserProfile.hxx.

◆ clientOutboundEnabled() [2/2]

virtual bool & resip::UserProfile::clientOutboundEnabled ( )
inlinevirtualnoexcept

Definition at line 117 of file UserProfile.hxx.

◆ clone()

UserProfile * UserProfile::clone ( ) const
protectedvirtual

Definition at line 47 of file UserProfile.cxx.

◆ getAnonymousUserProfile()

std::shared_ptr< UserProfile > UserProfile::getAnonymousUserProfile ( ) const
virtual

Definition at line 39 of file UserProfile.cxx.

◆ getClientOutboundFlowTuple()

const Tuple & resip::UserProfile::getClientOutboundFlowTuple ( ) const
inlinenoexcept

Definition at line 131 of file UserProfile.hxx.

◆ getDefaultFrom()

NameAddr & UserProfile::getDefaultFrom ( )
virtualnoexcept

Definition at line 65 of file UserProfile.cxx.

◆ getDigestCacheUseLimit()

virtual unsigned long resip::UserProfile::getDigestCacheUseLimit ( ) const
inlinevirtualnoexcept

Definition at line 108 of file UserProfile.hxx.

◆ getDigestCredential()

const UserProfile::DigestCredential & UserProfile::getDigestCredential ( const Data &  realm)
virtual

Definition at line 151 of file UserProfile.cxx.

◆ getGruu() [1/2]

NameAddr & UserProfile::getGruu ( const Data &  aor)
virtual

Definition at line 118 of file UserProfile.cxx.

◆ getGruu() [2/2]

NameAddr & UserProfile::getGruu ( const Data &  aor,
const NameAddr &  contact 
)
virtual

Definition at line 126 of file UserProfile.cxx.

◆ getImsAuthHost()

virtual Data & resip::UserProfile::getImsAuthHost ( )
inlinevirtualnoexcept

Definition at line 32 of file UserProfile.hxx.

◆ getImsAuthUserName()

virtual Data & resip::UserProfile::getImsAuthUserName ( )
inlinevirtualnoexcept

Definition at line 31 of file UserProfile.hxx.

◆ getInstanceId()

const Data & UserProfile::getInstanceId ( ) const
virtualnoexcept

Definition at line 95 of file UserProfile.cxx.

◆ getPublicGruu()

virtual const Uri & resip::UserProfile::getPublicGruu ( ) const
inlinevirtualnoexcept

Definition at line 56 of file UserProfile.hxx.

◆ getRegId()

virtual int resip::UserProfile::getRegId ( )
inlinevirtualnoexcept

Definition at line 127 of file UserProfile.hxx.

◆ getServiceRoute()

NameAddrs & UserProfile::getServiceRoute ( )
virtualnoexcept

Definition at line 77 of file UserProfile.cxx.

◆ getTempGruu()

virtual const Uri & resip::UserProfile::getTempGruu ( ) const
inlinevirtualnoexcept

Definition at line 60 of file UserProfile.hxx.

◆ gruuEnabled() [1/2]

virtual bool resip::UserProfile::gruuEnabled ( ) const
inlinevirtualnoexcept

Definition at line 53 of file UserProfile.hxx.

◆ gruuEnabled() [2/2]

virtual bool & resip::UserProfile::gruuEnabled ( )
inlinevirtualnoexcept

Definition at line 52 of file UserProfile.hxx.

◆ hasGruu() [1/2]

bool UserProfile::hasGruu ( const Data &  aor) const
virtual

Definition at line 106 of file UserProfile.cxx.

◆ hasGruu() [2/2]

bool UserProfile::hasGruu ( const Data &  aor,
const Data &  instance 
) const
virtual

Definition at line 112 of file UserProfile.cxx.

◆ hasInstanceId()

bool UserProfile::hasInstanceId ( )
virtual

Definition at line 83 of file UserProfile.cxx.

◆ hasPublicGruu()

virtual bool resip::UserProfile::hasPublicGruu ( ) const
inlinevirtual

Definition at line 55 of file UserProfile.hxx.

◆ hasTempGruu()

virtual bool resip::UserProfile::hasTempGruu ( ) const
inlinevirtual

Definition at line 59 of file UserProfile.hxx.

◆ isAnonymous()

bool UserProfile::isAnonymous ( ) const

Definition at line 53 of file UserProfile.cxx.

◆ setClientOutboundFlowTuple()

void resip::UserProfile::setClientOutboundFlowTuple ( const Tuple &  outboundFlowTuple)
inline

Definition at line 133 of file UserProfile.hxx.

◆ setDefaultFrom()

void UserProfile::setDefaultFrom ( const NameAddr &  from)
virtual

Definition at line 59 of file UserProfile.cxx.

◆ setDigestCacheUseLimit()

virtual void resip::UserProfile::setDigestCacheUseLimit ( unsigned long  digestCacheUseLimit)
inlinevirtualnoexcept

Definition at line 107 of file UserProfile.hxx.

◆ setDigestCredential()

void UserProfile::setDigestCredential ( const Data &  realm,
const Data &  user,
const Data &  password,
bool  isPasswordA1Hash = false 
)
virtual

For the password you may either provide the plain text password (isPasswordA1Hash = false) or the Digest A1 MD5 Hash (isPasswordA1Hash = true).


For isPasswordA1Hash=true and non-MD5 support you should supply the A1 hash in the resip custom format that accepts hashes for different digest algorithm types. Format: [<algorithm_name>]<hex_encoded_A1_hash>[<algorithm2_name>]<hex_encoded_A1_hash2>.... Example: [MD5]5f4dcc3b5aa765d61d8327deb882cf99[SHA-256]6bb4837eb74329105ee4568dda7dc67ed2ca2ad9e59fcbfbcde5e7f8c1b6d9d1 You can use Helper::createResipA1HashString to help you create this format.

Note: If the A1 hash is provided then the realm MUST match the realm in the challenge or authentication will fail. If the plain text password is provided, then we will form the A1 hash using the realm from the challenge.

Definition at line 140 of file UserProfile.cxx.

◆ setImsAuthUser()

virtual void resip::UserProfile::setImsAuthUser ( const Data &  userName,
const Data &  host 
)
inlinevirtual

Definition at line 30 of file UserProfile.hxx.

◆ setInstanceId()

void UserProfile::setInstanceId ( const Data &  id)
virtual

Definition at line 89 of file UserProfile.cxx.

◆ setPublicGruu()

virtual void resip::UserProfile::setPublicGruu ( const Uri &  gruu)
inlinevirtual

Definition at line 57 of file UserProfile.hxx.

◆ setRegId()

virtual void resip::UserProfile::setRegId ( int  regId)
inlinevirtualnoexcept

Definition at line 126 of file UserProfile.hxx.

◆ setServiceRoute()

void UserProfile::setServiceRoute ( const NameAddrs &  sRoute)
virtual

Definition at line 71 of file UserProfile.cxx.

◆ setTempGruu()

virtual void resip::UserProfile::setTempGruu ( const Uri &  gruu)
inlinevirtual

Definition at line 61 of file UserProfile.hxx.

Friends And Related Symbol Documentation

◆ ClientRegistration

friend class ClientRegistration
friend

Definition at line 152 of file UserProfile.hxx.

◆ Dialog

friend class Dialog
friend

Definition at line 153 of file UserProfile.hxx.

◆ DialogUsageManager

friend class DialogUsageManager
friend

Definition at line 151 of file UserProfile.hxx.

◆ operator<<

EncodeStream & operator<< ( EncodeStream &  ,
const UserProfile &  profile 
)
friend

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