< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] why not mCurrentRemoteSdp


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@xxxxxxx
          2005-11-14