当前位置: 首页>>代码示例>>C++>>正文


C++ DialogTracker::setTransactionDirectionality方法代码示例

本文整理汇总了C++中DialogTracker::setTransactionDirectionality方法的典型用法代码示例。如果您正苦于以下问题:C++ DialogTracker::setTransactionDirectionality方法的具体用法?C++ DialogTracker::setTransactionDirectionality怎么用?C++ DialogTracker::setTransactionDirectionality使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DialogTracker的用法示例。


在下文中一共展示了DialogTracker::setTransactionDirectionality方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: InviteRequest

bool WaitingForInvite::InviteRequest( DialogTracker& impl, SipMessage& request, TransactionDirectionality direction, const char* address, int port ) const
{
   bool bTrackRequestResponse = false;
   impl.setTransactionDirectionality( direction );

   // check is another sipX is already taking care of NAT traversing this session. 
   if( !impl.isRequestAlreadyHandledByOther( request ) )
   {
      bTrackRequestResponse = true;
      impl.markRequestAsHandledByUs( request );
      // check if the INVITE contains an SDP offer
      if( request.hasSdpBody() )
      {
         // request contains an SDP offer.  Check if the SDP or the or the actual
         // location of the two endpoints impose the use of a media relay. 
         if( impl.doesEndpointsLocationImposeMediaRelay() )
         {
            OsSysLog::add(FAC_NAT,PRI_DEBUG,"'%s:%s' - Media relay required",
                  impl.name(), impl.GetCurrentState()->name() );   
            impl.setMediaRelayRequiredFlag();
         }
         else
         {
            OsSysLog::add(FAC_NAT,PRI_DEBUG,"'%s:%s' - Media relay not required",
                  impl.name(), impl.GetCurrentState()->name() );    
            impl.clearMediaRelayRequiredFlag();
         }
         impl.ProcessMediaOffer( request, INITIAL_OFFER_ANSWER );         
         ChangeState( impl, impl.pWaitingForMediaAnswer );
      }
      else
      {
         // request does contains an SDP offer.  This INVITE may be used to set up a 3PCC
         // call.  Play it safe and impose the use of a media relay to guarantee speechpath
         impl.setMediaRelayRequiredFlag();
         ChangeState( impl, impl.pWaitingForMediaOffer );
      }
   }
   else
   {
      // this particular session is already being handled by another sipX i nthe network.
      // That sipX is taking care of overcoming the NATs that separate the endpoints involved
      // in that session.  There isn't much value we can add here so just bail on tracking that
      // session.
      ChangeState( impl, impl.pMoribund );
   }
   return bTrackRequestResponse;
}
开发者ID:mranga,项目名称:sipxecs,代码行数:48,代码来源:DialogTrackerStates.cpp


注:本文中的DialogTracker::setTransactionDirectionality方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。