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

[reSIProcate] generate a 183 with SDP on the server side


How can I generate a 183 message with SDP on the server side, the
senario is as following:


Client                           Server
    F1:INVITE(offer)
|--------------------------------->|
|   F2:100 TRYING             |
|<---------------------------------|
|   F3:183 (answer)            |
|<---------------------------------|
|.............
|.............
|

I use the following code(come from the basiccall.cxx) to do this.
------------------------------------------------------------------------------------------
virtual void onOffer(InviteSessionHandle is, const SipMessage& msg,
const SdpContents& sdp)
{
     InfoLog( << name << ": InviteSession-onOffer(SDP)" );
     //ServerInviteSessionHandle mSis;
     mSis->provisional(183);
}
------------------------------------------------------------------------------------------
   But the stack only send a 183 message without SDP. and I found the
following code in ServerInviteSession.cxx.
------------------------------------------------------
  ServerInviteSession::sendProvisional(int code)
{
   mDialog.makeResponse(m1xx, mFirstRequest, code);
   if (mProposedLocalSdp.get()) // early media
   {
      setSdp(m1xx, *mProposedLocalSdp);
   }
   startRetransmit1xxTimer();
   mDialog.send(m1xx);
}
------------------------------------------------------
    The above code indicate that I must set the mProposedLocalSdp
before I call the provisional() method.So I want to know how can I set
the variable to send a provisional message with SDP answer.Or is there
another way to realize it?
   Can anyone give me some suggestions?

Thanks!!!