Re: [reSIProcate] generate a 183 with SDP on the server side
Unless the 183 was sent with the 100rel extension (PRACK).
On 11/9/05, Scott Godin <slgodin@xxxxxxxxxxxx> wrote:
> This behavior is correct. You must send the same SDP in the 200 as you
> sent in the 18x.
>
> Scott
> > -----Original Message-----
> > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-
> > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of frank zhao
> > Sent: Wednesday, November 09, 2005 8:14 AM
> > To: resiprocate-devel
> > Subject: Re: [reSIProcate] generate a 183 with SDP on the server side
> >
> > Thanks for your help!I have download the newest version from
> > svn,The 183 message with SDP have been send successfully.but I have a
> > new problem.
> > After send a 183 message with SDP. I want to connect the call, so
> > I call accept() method.But I see that the 200 message still have a SDP
> > body.
> > The desired senario should be as following:
> >
> > Client Server
> > F1:INVITE(offer)
> > |--------------------------------->|
> > | F2:100 TRYING |
> > |<---------------------------------|
> > | F3:183 session process(answer) |
> > |<---------------------------------|
> > | F4:200 OK (without SDP)|
> > |<---------------------------------|
> > |.............
> > |
> >
> > 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
> > is->provideAnswer(*this->sdp);
> > mSis->provisional(183);
> > ........................
> > //some operation here.
> > mSis->accept();
> > }
> > After call accept() method, the stack send a 200 message with SDP
> body.
> >
> > Can anyone give me some suggestions that how I can elimanite the SDP
> > body in 200 message?
> >
> > Thanks!!!
> >
> > 2005/11/8, Scott Godin <slgodin@xxxxxxxxxxxx>:
> > > This bug was fixed a while ago. The sendProvisional code should be
> > > looking at mCurrentLocalSdp.
> > >
> > > > -----Original Message-----
> > > > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > > [mailto:resiprocate-
> > > > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of frank zhao
> > > > Sent: Tuesday, November 08, 2005 9:18 AM
> > > > To: resiprocate-devel
> > > > Subject: Re: [reSIProcate] generate a 183 with SDP on the server
> side
> > > >
> > > > sorry, I make a mistake. It will not throw an exception here.
> > > > what happen after I call provideAnswer () method is that it
> will
> > > > not revise mProposedLocalSdp. So when I call provisional() later,
> the
> > > > SDP message will still not be appended.
> > > > as shown In ServerInviteSession.cxx,
> > > > ServerInviteSession::provideAnswer(const SdpContents& answer)
> > > > {
> > > > .....................................
> > > > case UAS_Offer:
> > > > transition(UAS_OfferProvidedAnswer);
> > > > mCurrentRemoteSdp = mProposedRemoteSdp;
> > > > mCurrentLocalSdp = InviteSession::makeSdp(answer);
> > > > break;
> > > > .......................................
> > > > }
> > > > we can see that the revised variables are mCurrentRemoteSdp and
> > > > mCurrentLocalSdp, not mProposedLocalSdp.
> > > >
> > > >
> > > > 2005/11/8, Sasha Youkhananov <y_Sasha@xxxxxxxxxx>:
> > > > > I call provideAnswer (sdp) when I wish to accept an incoming
> call.
> > > > > I'm sure that session is not yet in connected state.
> > > > > My code looks like this:
> > > > >
> > > > > ....
> > > > >
> > > > > case TH_OP_ACCEPT_CALL:
> > > > > {
> > > > > Data *pCallID = reinterpret_cast <Data *>
> > > > > (Msg.wParam);
> > > > > ReSipAppDialog *pDlg = g_DlgHash.GetDlg
> > > > > (*pCallID);
> > > > >
> > > > > if (pDlg)
> > > > > {
> > > > > ServerInviteSession *pServInvSess = dynamic_cast
> > > > > <ServerInviteSession *> (pDlg->getInviteSession ().get ());
> > > > >
> > > > > if (pServInvSess)
> > > > > {
> > > > > g_pSdpHelper->CompleteAnswer (); //* this is my
> sdp
> > > > > //* here session is not connected yet
> > > > > pServInvSess->provideAnswer
> (*g_pSdpHelper->Answer
> > > > > ()); pServInvSess->accept ();
> > > > > }
> > > > > }
> > > > >
> > > > > delete pCallID;
> > > > > }
> > > > >
> > > > > ....
> > > > >
> > > > > I have no an exceptions for this code.
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > > > > [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf
> Of
> > > > > frank zhao
> > > > > Sent: Tuesday, November 08, 2005 3:53 PM
> > > > > To: resiprocate-devel
> > > > > Subject: Re: [reSIProcate] generate a 183 with SDP on the server
> > > side
> > > > >
> > > > > Thanks for your suggestion, but when I call provideAnswer ()
> method
> > > like
> > > > > this:
> > > > > ------------------------------------------------------
> > > > > mSis->provideAnswer (somesdp);
> > > > > mSis->provisional(183);
> > > > > -----------------------------------------------------
> > > > > an exception will throwed and a warning message will be printed
> like
> > > > > this:
> > > > > "Can't provideAnswer when not in Connected state",
> > > > > which is located on InviteSession.cxx.
> > > > >
> > > > > It seems that provideAnswer() method can't not be called here.So
> > > what
> > > > > will I do?
> > > > >
> > > > > 2005/11/8, Sasha Youkhananov <y_Sasha@xxxxxxxxxx>:
> > > > > > I think you should write something like this:
> > > > > >
> > > > > > mSis->provideAnswer (place here pointer to your sdp);
> > > > > > mSis->provisional(183);
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > > > > > [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On
> Behalf
> > > Of
> > > > > zhao
> > > > > > hongbin
> > > > > > Sent: Tuesday, November 08, 2005 3:28 PM
> > > > > > To: resiprocate-devel
> > > > > > Subject: [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!!!
> > > > > > _______________________________________________
> > > > > > resiprocate-devel mailing list
> > > > > > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > > > > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> > > > > >
> > > > > _______________________________________________
> > > > > resiprocate-devel mailing list
> > > > > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > > > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> > > > >
> > > > _______________________________________________
> > > > resiprocate-devel mailing list
> > > > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> > >
> > _______________________________________________
> > resiprocate-devel mailing list
> > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>