本文整理汇总了C++中DialogTracker::handleResponse方法的典型用法代码示例。如果您正苦于以下问题:C++ DialogTracker::handleResponse方法的具体用法?C++ DialogTracker::handleResponse怎么用?C++ DialogTracker::handleResponse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DialogTracker
的用法示例。
在下文中一共展示了DialogTracker::handleResponse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleResponse
void SessionContext::handleResponse( SipMessage& message, const char* address, int port )
{
ssize_t numberOfDialogTrackersEnteringRoutine = getNumberOfTrackedDialogs();
UtlString discriminatingTag = getDiscriminatingTagValue( message );
// Retrieve DialogTracker object that handles this dialog.
DialogTracker* pDialogTracker = 0;
if( !discriminatingTag.isNull() &&
( pDialogTracker = getDialogTrackerForTag( discriminatingTag ) ) != 0 )
{
// present the response to the DialogTracker
pDialogTracker->handleResponse( message, address, port );
}
else
{
if( message.getResponseStatusCode() < SIP_3XX_CLASS_CODE )
{
// we do not have a DialogTracker for this response. If this is as
// 1xx or 2xx response to the dialog-forming INVITE, this response is creating a
// new dialog. Create a new DialogTracker based on the reference DialogTracker
if( !discriminatingTag.isNull() && mDialogFormingInviteCseq == CseqData( message ) )
{
DialogTracker* pNewDialogTracker;
if( (pNewDialogTracker = allocateNewDialogTrackerBasedOnReference( discriminatingTag ) ) )
{
pNewDialogTracker->handleResponse( message, address, port );
}
}
}
else if( message.getResponseStatusCode() >= SIP_4XX_CLASS_CODE )
{
// This session context has received a final failure response. The
// INVITE has been rejected. Present that response to all the
// DialogTrackers so that they can terminate.
UtlHashMapIterator dialogTrackerIterator( mDialogTrackersMap );
while( dialogTrackerIterator() )
{
DialogTracker *pDialogTracker;
pDialogTracker = dynamic_cast<DialogTracker*>( dialogTrackerIterator.value() );
pDialogTracker->handleResponse( message, address, port );
}
}
}
// Check if the processing of the request caused the last DialogTracker to be deleted.
// If so, the SessionContext is not required anymore therefore tell the CallTracker that
// we are ready for deletion
if( numberOfDialogTrackersEnteringRoutine &&
deleteDialogTrackersReadyForDeletion() == numberOfDialogTrackersEnteringRoutine )
{
mpOwningCallTracker->reportSessionContextReadyForDeletion( mHandle );
}
}