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

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
>