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

[reSIProcate] How can convert a InviteSessionHandle to ServerInviteSessionHandle?


hi,
    Is there a method to convert a variable from InviteSessionHandle
to ServerInviteSessionHandle?Or how can I get the
ServerInviteSessionHandle from InviteSessionHandle?
In the BasicCall.cxx,the following code can be found.
------------------------------------------------------------------------
class TestUas : public TestInviteSessionHandler
{
..............................................
..............................................
      virtual void onOffer(InviteSessionHandle is, const SipMessage&
msg, const SdpContents& sdp)
      {
         cout << name << ": InviteSession-onOffer(SDP)" << endl;
         //sdp->encode(cout);
         cout << name << ": Sending 200 response with SDP answer." << endl;
         is->provideAnswer(sdp);
         mSis->accept();
         *pHangupAt = time(NULL) + 5;
      }
..............................................
..............................................
   private:
      ServerInviteSessionHandle mSis;
}
------------------------------------------------------------------------
As the above code shown, mSis->accept() is called. to call this method
correctly, we must save the mSis on onNewSession().
I want to know whether there is some way to get the correct
ServerInviteSessionHandle from the InviteSessionHandle? In another
word, get mSis from is.