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

Re: [reSIProcate-users] [mSis not valid]


Where are you setting mSis?  It should be done in onNewSession(ServerInviteSessionHandle, ...).

You can also use code like:  
 ServerInviteSession* sis = dynamic_cast<ServerInviteSession*>(is.get());
 if(sis && !sis->isAccepted())
 { 
     sis->accept();
 }

Note: "is" is an InviteSessionHandle.

Scott

On Thu, Apr 16, 2009 at 5:53 PM, nadeige Da costa <nadeige2009@xxxxxxxxx> wrote:
Hi all,

I am using resiprocate and trying to modify the behaviour of my UAS in case that it receives a SIP INVITE.

Therefore, I have modified the onOffer function in this way:
Uas::onOffer(InviteSessionHandle is, const SipMessage& msg, const SdpContents& sdp) {
    Function1(is, ...);
}

The only thing done by the onOffer function is contacting an external function Function1(is, ...).
Moreover, I have added a new function in my UA's class

Uas::Function2(is, ...)
{
      is->provideAnswer(*(this->sdp));
      mSis->accept();
}

So that, when an external application will call the Function2, this one will be able to send an answer
to the INVITE message sent by a UAC.

The issue is that:  mSis->accept(); does not work. An exception is thrown and the 200 OK message is not sent.
 The mSis parameter used in the Function2 is declared to be not valid by the isValid() function.

Please could you give a piece of advice to solve my problem ?
Thanks in advance.

_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/