reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
Stack Configuration
Collaboration diagram for Stack Configuration:

Classes

class  resip::SipStack
 This is the primary point of interaction between the app-layer and the stack. More...
 

Functions

void resip::SipStack::addAlias (const Data &domain, int port)
 add an alias for this sip element
 
void resip::SipStack::removeAlias (const Data &domain, int port)
 removes an alias from this sip element
 
void resip::SipStack::setStatisticsInterval (unsigned long seconds)
 Sets the interval that determines the time between Statistics messages.
 
void resip::SipStack::registerMarkListener (MarkListener *listener)
 Register a handler with the DNS Interface for notifications of when a Dns Resource Record has been blacklisted.
 
void resip::SipStack::unregisterMarkListener (MarkListener *listener)
 Removed a registered BlacklistListener handler from the DNS Interface for a particualr Resource Record type and handler pointer.
 
void resip::SipStack::setEnumSuffixes (const std::vector< Data > &suffixes)
 Specify which enum domains will be searched when sending.
 
void resip::SipStack::setEnumDomains (const std::map< Data, Data > &domains)
 Specify which domains in the To: Uri will be subject to ENUM.
 
volatile bool & resip::SipStack::statisticsManagerEnabled ()
 Enable Statistics Manager.
 
bool resip::SipStack::getFixBadDialogIdentifiers () const
 Returns whether the stack is fixing corrupted/changed dialog identifiers (ie, Call-Id and tags) in responses from the wire.
 
void resip::SipStack::setFixBadDialogIdentifiers (bool pFixBadDialogIdentifiers)
 Specify whether the stack should fix corrupted/changed dialog identifiers (ie, Call-Id and tags) in responses from the wire.
 
void resip::SipStack::setContentLengthChecking (bool check)
 Used to enable/disable content-length checking on datagram-based transports.
 
void resip::SipStack::setCongestionManager (CongestionManager *manager)
 Sets the CongestionManager used by the stack.
 
CongestionManager * resip::SipStack::getCongestionManager ()
 Accessor for the CongestionManager object the stack is using.
 
Compression & resip::SipStack::getCompression ()
 Accessor for the Compression object the stack is using.
 
void resip::StatisticsManager::setExternalStatsHandler (ExternalStatsHandler *handler)
 Allows the application to set the ExternalStatsHandler for this StatisticsManager.
 

Detailed Description

Function Documentation

◆ addAlias()

void SipStack::addAlias ( const Data &  domain,
int  port 
)

add an alias for this sip element

Used to add an alias for this sip element. e.g. foobar.com and boo.com are both handled by this stack. Alias is added to internal list of Domains and can be checked with isMyDomain.

Parameters
domainDomain name that this stack is responsible for.
portPort for domain that this stack is responsible for.

Definition at line 722 of file SipStack.cxx.

◆ getCompression()

Compression & resip::SipStack::getCompression ( )
inline

Accessor for the Compression object the stack is using.

Returns
The Compression object being used.
Note
If no Compression object was set on construction, this will be initialized to a null-implementation, so this function will be safe to call.

Definition at line 1159 of file SipStack.hxx.

◆ getCongestionManager()

CongestionManager * resip::SipStack::getCongestionManager ( )
inline

Accessor for the CongestionManager object the stack is using.

Returns
The CongestionManager object being used.
Note
If no Compression object was set on construction, this will return null.

Definition at line 1149 of file SipStack.hxx.

◆ getFixBadDialogIdentifiers()

bool resip::SipStack::getFixBadDialogIdentifiers ( ) const
inline

Returns whether the stack is fixing corrupted/changed dialog identifiers (ie, Call-Id and tags) in responses from the wire.

Returns
Denotes whether the stack is fixing corrupted/changed dialog identifiers.
See also
getFixBadDialogIdentifiers()

Definition at line 1022 of file SipStack.hxx.

◆ registerMarkListener()

void SipStack::registerMarkListener ( MarkListener *  listener)

Register a handler with the DNS Interface for notifications of when a Dns Resource Record has been blacklisted.

Parameters
listenerClass implementing the onMark() callback event sink defined in MarkListener

Definition at line 1237 of file SipStack.cxx.

◆ removeAlias()

void SipStack::removeAlias ( const Data &  domain,
int  port 
)

removes an alias from this sip element

Used to remove an existing alias from this sip element. Only removed if reference count hits 0.

Parameters
domainDomain name that this stack is responsible for.
portPort for domain that this stack is responsible for.

Definition at line 740 of file SipStack.cxx.

◆ setCongestionManager()

void resip::SipStack::setCongestionManager ( CongestionManager *  manager)
inline

Sets the CongestionManager used by the stack.

In order to use a congestion-manager, you will need to create one and pass it to the SipStack, like so:

MyCongestionManager* mCM = new MyCongestionManager;
mStack.setCongestionManager(mCM);

This will cause the SipStack to register all its fifos with the congestion manager, and will also call TransactionUser::setCongestionManager() for every currently registered TransactionUser. This means that, if you are working with such a TransactionUser, you must have registered the TransactionUser with the SipStack before making this call.

If you are using the SipStack directly by implementing your own subclass of TransactionUser, you can override TransactionUser::setCongestionManager() to register additional fifos (the default implementation registers TransactionUser::mFifo), like so

MyTransactionUser::setCongestionManager(CongestionManager* cm)
{
if(mCongestionManager)
{
mCongestionManager->unregisterFifo(&mExtraFifo);
}
mCongestionManager=cm;
if(mCongestionManager)
{
mCongestionManager->registerFifo(&mExtraFifo);
}
}
Abstract base class that provides a basic congestion management interface.
virtual void unregisterFifo(resip::FifoStatsInterface *fifo)=0
Unregisters a fifo with the congestion manager.
virtual void registerFifo(resip::FifoStatsInterface *fifo)=0
Registers a fifo with the congestion manager.
virtual void setCongestionManager(CongestionManager *manager)
Parameters
managerThe CongestionManager to use. Ownership is not taken.

Definition at line 1127 of file SipStack.hxx.

◆ setContentLengthChecking()

void resip::SipStack::setContentLengthChecking ( bool  check)
inline

Used to enable/disable content-length checking on datagram-based transports.

Todo:
should this be fixed to work with other applicable transports? []

Used to enable/disable content-length checking on datagram-based transports. If disabled, the stack will ignore the value of the Content-Length header, and assume that the end of the payload is at the end of the datagram (and not before). If enabled, it will take the Content-Length seriously, log a warning if the Content-Length is too short, and reject the message if the Content-Length is too long.

Parameters
checkDenotes whether we should check Content-Length.
Note
By default, Content-Length checking is enabled.
only works on UDP at this time

Definition at line 1081 of file SipStack.hxx.

◆ setEnumDomains()

void SipStack::setEnumDomains ( const std::map< Data, Data > &  domains)

Specify which domains in the To: Uri will be subject to ENUM.

If the Uri hostname/domain is one of these domains, the user part will be considered for ENUM search

Definition at line 1261 of file SipStack.cxx.

◆ setEnumSuffixes()

void SipStack::setEnumSuffixes ( const std::vector< Data > &  suffixes)

Specify which enum domains will be searched when sending.

Specify which enum domains will be searched when sending to URIs that return true to Uri::isEnumSearchable(). An enum query will be done for each suffix in parallel.

Definition at line 1255 of file SipStack.cxx.

◆ setExternalStatsHandler()

void resip::StatisticsManager::setExternalStatsHandler ( ExternalStatsHandler *  handler)
inline

Allows the application to set the ExternalStatsHandler for this StatisticsManager.

Definition at line 48 of file StatisticsManager.hxx.

◆ setFixBadDialogIdentifiers()

void resip::SipStack::setFixBadDialogIdentifiers ( bool  pFixBadDialogIdentifiers)
inline

Specify whether the stack should fix corrupted/changed dialog identifiers (ie, Call-Id and tags) in responses from the wire.

This is intended to help TransactionUsers that assume responses will come back with the same dialog identifiers that the request had (excepting of course the remote tag for dialog-forming requests).

Parameters
pFixBadDialogIdentifiersDenotes whether the stack should fix corrupted/changed dialog identifiers.
Note
This is enabled by default, and is recommended for dialog-stateful TransactionUsers.

Definition at line 1040 of file SipStack.hxx.

◆ setStatisticsInterval()

void SipStack::setStatisticsInterval ( unsigned long  seconds)

Sets the interval that determines the time between Statistics messages.

Definition at line 1191 of file SipStack.cxx.

◆ statisticsManagerEnabled()

volatile bool & SipStack::statisticsManagerEnabled ( )

Enable Statistics Manager.

Todo:
is this documented correctly? [!]

Enable Statistics Manager. SIP Statistics will be collected and dispatched periodically via a StatisticsMessage.

Note
By default the Statistics Manager is enabled.

Definition at line 1291 of file SipStack.cxx.

◆ unregisterMarkListener()

void SipStack::unregisterMarkListener ( MarkListener *  listener)

Removed a registered BlacklistListener handler from the DNS Interface for a particualr Resource Record type and handler pointer.

Parameters
listenerClass implementing the onMark() callback event sink defined in MarkListener

Definition at line 1243 of file SipStack.cxx.