[reSIProcate] why not mCurrentRemoteSdp

maodonghu hhmmdd at tom.com
Mon Nov 14 00:12:01 CST 2005


this is my code to send 200 ok:

	call->is->provideAnswer( call->is->getRemoteSdp() );
	((ServerInviteSession*)call->is)->accept();

when I track call->is->getRemoteSdp() , I found mCurrentRemoteSdp.get() is NULL, and I have look at ServerInviteSession.cxx(584): it save mProposedRemoteSdp but not mCurrentRemoteSdp, why?


void
ServerInviteSession::dispatchStart(const SipMessage& msg)
{
   assert(msg.isRequest());
   assert(msg.header(h_CSeq).method() == INVITE);

   InviteSessionHandler* handler = mDum.mInviteSessionHandler;
   std::auto_ptr<SdpContents> sdp = InviteSession::getSdp(msg);
   storePeerCapabilities(msg);

   switch (toEvent(msg, sdp.get()))
   {
      case OnInviteOffer:
         mLastSessionModification = msg;
         transition(UAS_Offer);
         mProposedRemoteSdp = InviteSession::makeSdp(*sdp);
         mCurrentEncryptionLevel = getEncryptionLevel(msg);
         handler->onNewSession(getHandle(), Offer, msg);
         if(!isTerminated())  
         {
            handler->onOffer(getSessionHandle(), msg, *sdp);
         }
         break;
 				

        maodonghu
        hhmmdd at tom.com
          2005-11-14


More information about the resiprocate-devel mailing list