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

RE: [reSIProcate] INVITE and re-INVITE without SDP, how can I share the improves ?


Thanks Scott.
In the re-INVITE without SDP scenario, I did the changes in InviteSession.hxx 
and InviteSession.cxx
because the session is already established. The changes what I did were:

1.- Add a InviteSession class method: virtual void requireOffer();

2.- And I Implemented it as:
void
InviteSession::requireOffer()
{
   switch (mState)
   {
      case Connected:
         transition(SentReinvite);                              // for to 
prepare the StateMachine
         mProposedLocalSdp.release();                           // Clear the 
previous Offer (If had...)
         mCurrentLocalSdp.release();                            // Clear the 
current local desc
         mDialog.makeRequest(mLastSessionModification, INVITE); // Make the 
re-INVITE
         mLastSessionModification.setContents(0);               // Clear the 
SDP contents from the INVITE
         setSessionTimerHeaders(mLastSessionModification);
         InfoLog (<< "Sending " << mLastSessionModification.brief());
         mDialog.send(mLastSessionModification);
         break;

      default:
         WarningLog (<< "Can't provideOffer when not in Connected state");
         throw DialogUsage::Exception("Can't provide an offer", 
__FILE__,__LINE__);
   }
}

3.- I added a "case" to the InviteSession::provideAnswer() switch:

      case Connected:
      {
         mCurrentLocalSdp = InviteSession::makeSdp(answer);
         mCurrentRemoteSdp = mProposedRemoteSdp;
         sendAck(&answer);                                      // Sendthe ack 
with the answer
         break;
      }

4.- In InviteSession::DispatchConnected() I separated the states on2xxOffer and 
on2xxAnswer

      case On2xx:
      case On2xxAnswer:
         InfoLog (<< "InviteSession::dispatchConnected - Transmitting ACK due a 
2xx Answer");
         sendAck();
         break;

      case On2xxOffer:
         InfoLog (<< "InviteSession::dispatchConnected - Arrived a 2xx Offer 
again, cannot send the answer now");
         break;

5.- In InviteSession::dispatchSentReinvite() also I separated the states 
On2xxOffer and On2xxAnswer

      case On2xxOffer:
      {
         transition(Connected);
         handleSessionTimerResponse(msg);
         mProposedRemoteSdp = InviteSession::makeSdp(*sdp);
         handler->onOffer(getSessionHandle(), msg, *sdp);
         break;
      }

      case On2xxAnswer:
      {
         transition(Connected);
         handleSessionTimerResponse(msg);
         mCurrentLocalSdp = mProposedLocalSdp;
         mCurrentRemoteSdp = InviteSession::makeSdp(*sdp);
         sendAck();
         handler->onAnswer(getSessionHandle(), msg, *sdp);
         break;
          }


As far I tested it work OK, but I think it need to be tested more intensively

And also, in this case the changes was made in the version 0.9.0-5019.
I attach the InviteSession.hxx and InviteSession.cxx modified files for to 
compare.


 <<InviteSession.cxx>>  <<InviteSession.hxx>> 



Best regards
Rodrigo







> -----Original Message-----
> From: Scott Godin [SMTP:slgodin@xxxxxxxxxxxx]
> Sent: Thursday, September 15, 2005 10:52
> To:   Rodrigo Alcoberro; Micky Kaufmann; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject:      RE: [reSIProcate] INVITE and re-INVITE without SDP,how can I 
> share the improves ?
> 
> Good stuff!  The state transitions look good to me too.  I've committed this 
> change.
> 
> Scott
> 
> > -----Original Message-----
> > From: Rodrigo Alcoberro [mailto:ralcoberro@xxxxxxxxxxxxxxxxxx]
> > Sent: Thursday, September 15, 2005 9:32 AM
> > To: Micky Kaufmann; Scott Godin; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: RE: [reSIProcate] INVITE and re-INVITE without SDP,how can I
> > share the improves ?
> > 
> > Hello,
> > I think we can study the INVITE and re-INVITE without SDP as two separated
> > problems.
> > 
> > For the case of sending a INVITE without SDP the fix is simple, just
> > adding (in bold):
> > 
> >     if(initialOffer)
> >             mProposedLocalSdp = InviteSession::makeSdp(*initialOffer)> 
> > 
> > in the ClientInviteSession constructor. Then, If const SdpContents *
> > initialOffer == 0 don´t construct the SDP.
> > 
> > The rest of the Client Invite State Machine is OK for to handle the offer
> > that will be comming in a 1xx or 2xx, and allow us to send our answer in
> > the ACK
> > 
> > I´m have been using it for a month without problems.
> > 
> > I made this change (and I tested) from the 0.9.0-5019 version, I currently
> > working for to migrate to the svn HEAD.
> > 
> > 
> > I will send you information about the re-INVITE without SDP in another
> > mail
> > 
> > Best regards
> > Rodrigo
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > -----Original Message-----
> > > From:     Micky Kaufmann [SMTP:micky@xxxxxxxxxxx]
> > > Sent:     Wednesday, September 14, 2005 06:55
> > > To:       Scott Godin; Rodrigo Alcoberro; resiprocate-
> > devel@xxxxxxxxxxxxxxxxxxx
> > > Subject:  RE: [reSIProcate] INVITE and re-INVITE without SDP,how can I
> > share the improves ?
> > >
> > > Hi,
> > >
> > > I looked at all dum*.dot files - I'm working one of the latest svn
> > checkedout version and it looks like there are many small bugs in the dot
> > files (for example there are two states 'Finish' and 'Finished' that look
> > exactly the same). I'm working on fixing these files and also on creating
> > visio diagrams for them (soon I'll send them)...
> > >
> > > Is there a newer version of those files?
> > >
> > > Rodrigo,
> > > Did you change the state machine for allowing the INVITE and re-INVITE
> > without SDP transmission? (Did you use 'transition' function or any
> > InviteSession state/event?)
> > > Can you send a small description of the changes you made?
> > > Did you change only the ClientInviteSession constructor or anything
> > else?
> > > Are you sure that the problem occurred only when you didn't send initial
> > SDP?
> > >
> > > Anyone else encountered that problem and fixed it?
> > >
> > > Thanks,
> > >
> > > Micky
> > >
> > > -----Original Message-----
> > > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-
> > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Godin
> > > Sent: Wednesday, September 07, 2005 5:58 PM
> > > To: Rodrigo Alcoberro; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > Subject: RE: [reSIProcate] INVITE and re-INVITE without SDP,how can I
> > share the improves ?
> > >
> > > Great!
> > >
> > > I think a discussion of your new Invite session state transitions would
> > be a good place to start.  Posting a modified dum\doc\dum-invite-
> > connected-state.dot and dum-clientinvite-state.dot file would probably be
> > the best way.  Also a brief description of the modified/added interfaces
> > would be good.
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > > -----Original Message-----
> > > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-
> > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Rodrigo Alcoberro
> > > Sent: Wednesday, September 07, 2005 11:41 AM
> > > To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > Subject: [reSIProcate] INVITE and re-INVITE without SDP,how can I share
> > the improves ?
> > >
> > > Hello,
> > >
> > > I have done some improves to DUM to allow the INVITE and re-INVITE
> > without SDP transmission.
> > >
> > > How can I share them with you ?
> > >
> > > Best regards
> > > Rodrigo
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From:   resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > [SMTP:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Rodrigo
> > Alcoberro
> > > > Sent:   Wednesday, August 31, 2005 16:46
> > > > To:     resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > > Subject:        RE: [reSIProcate] Re-INVITE without SDP
> > > >
> > > > Thank you for the prompt answer Scott,
> > > > I´m trying to add this capability because is very usefull for us. The
> > re-INVITE message goes without SDP now but I think the state machine keep
> > in a "offering" (wrong) state. I´m viewing it in detail just now.> 
> > > > Please let me know if you have any comments or suggestions.
> > > >
> > > > Also, I have seen that the resiprocate release (0.9.0-5019) had a
> > problem with the initial INVITE without SDP, I fixed it doing in>
> > > > ClientInviteSession.cxx, Line 32 (inside ClientInviteSession
> > constructor)
> > > >
> > > >         if(initialOffer)
> > > >                 mProposedLocalSdp = 
> > > > InviteSession::makeSdp(*initialOffer)
> > > >
> > > >
> > > > Then, If const SdpContents * initialOffer == 0 don´t construct the
> > SDP.
> > > > I´m have been using it for a month.
> > > >
> > > >
> > > > Thank you very much
> > > > Rodrigo
> > > >
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Scott Godin [SMTP:slgodin@xxxxxxxxxxxx]
> > > > > Sent: Wednesday, August 31, 2005 12:50
> > > > > To:   Rodrigo Alcoberro; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > > > Subject:      RE: [reSIProcate] Re-INVITE without SDP
> > > > >
> > > > > Great question!  Currently this is not possible if you are using the
> > DUM layer.  All re-invites will carry an SDP.
> > > > >
> > > > > This does seem like a good interface to add though.  :)
> > > > >
> > > > > Note:  The current DUM is even broken on receiving a re-invites with
> > no offer.  However a fix for this problem is currently being worked on.
> > > > >
> > > > > Scott
> > > > >
> > > > > -----Original Message-----
> > > > > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> > Rodrigo Alcoberro
> > > > > Sent: Wednesday, August 31, 2005 11:10 AM
> > > > > To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > > > Subject: [reSIProcate] Re-INVITE without SDP
> > > > >
> > > > > Hello,
> > > > > I´m working in a system that requires a B2BUA re-inviting without
> > SDP to the caller party forcing it to send a SDP offer in the 200 OK
> > message. Is it possible to do that with DUM or resiprocate ?
> > > > >
> > > > > Thank you and best regards
> > > > >
> > > > >
> > > > >
> > > > > Rodrigo Alcoberro
> > > > > Ingeniero de Desarrollo
> > > > > Project Leader
> > > > >
> > > > > ATS Advanced Technology Solutions
> > > > > Av. Corrientes 880 Piso 11
> > > > > C1043AAV - Buenos Aires - Argentina
> > > > > Tel: +54-11-6393-4345 / Fax: +54-11-6393-4300 ext. 485
> > > > > Web: www.ats-connection.com
> > > > >
> > > > > _______________________________________________
> > > > > 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
> > >

Attachment: InviteSession.cxx
Description: InviteSession.cxx

Attachment: InviteSession.hxx
Description: InviteSession.hxx