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

RE: [reSIProcate] onSuccess for registration is called only ones


I'm pretty sure the ClientRegistration manager was not designed with
this in mind.  The requestRefresh is available to applications in order
to force the Client Registrations manager to perform a refresh before
the next scheduled time.  

I suppose you could set the automatic registration period very high and
then just use requestRefresh, if you want to control the interval
manually.  But I'm not sure I understand what the use case for doing
this would be.

Note:  The refresh period is specified in the UserProfile - you can use
different periods for each registration by passing in a different
UserProfile to the dum->makeXXXX call.

Scott
> -----Original Message-----
> From: Sasha Youkhananov [mailto:y_Sasha@xxxxxxxxxx]
> Sent: Monday, November 14, 2005 9:29 AM
> To: Scott Godin
> Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: RE: [reSIProcate] onSuccess for registration is called only
ones
> 
> Hello Scott.
> I would like to return to this problem.
> Anyway the idea about requestRefresh is not clear to me.
> According to the code in ClientRegistration.cxx there is a timer that
> created each time the client receives OK with contact header. When the
> timer fires the stack implicitly refreshes registration on behalf of
the
> client.  This is why onSuccess callback is not called (according to
your
> explanation).
> On the other hand I haven't found any way to suppress this timer and
to
> own the control of it.
> Let's imagine I decided to refresh registrations by myself using
> requestRefresh method, how I am supposed to accomplish it?
> Duplicate the existing mechanism? Kill the internal timer?
> If you developed the completely automatic mechanism then who needs the
> method requestRefresh?
> Am I missing something here?
> 
> Sasha.
> 
> -----Original Message-----
> From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
> Sent: Thursday, November 10, 2005 10:02 PM
> To: Scott Godin; Gianluca Martiniello; Asheesh Joshi
> Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx; Sasha Youkhananov
> Subject: RE: [reSIProcate] onSuccess for registration is called only
> ones
> 
> I've committed a solution for this.  onSuccess will be called if
> requestRefresh is explicitly called by the application.
> 
> > -----Original Message-----
> > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-
> > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Godin
> > Sent: Thursday, November 10, 2005 7:09 AM
> > To: 'Gianluca Martiniello'; 'Asheesh Joshi'
> > Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx; 'Sasha Youkhananov'
> > Subject: RE: [reSIProcate] onSuccess for registration is called only
> ones
> >
> > I agree - if the user explicitly requests a refresh, then there
should
> be
> > a
> > callback.  If the refresh is automatic, then there should NOT be a
> > callback.
> >
> >
> > Scott
> >
> > -----Original Message-----
> > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> > Gianluca
> > Martiniello
> > Sent: Thursday, November 10, 2005 6:17 AM
> > To: Asheesh Joshi
> > Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx; Sasha Youkhananov
> > Subject: Re: [reSIProcate] onSuccess for registration is called only
> ones
> >
> > Asheesh Joshi wrote:
> > >             Its not a bug. Its an intended behavior. Why would you
> need
> > > a call back for Registration "Refresh" ?  The stack automatically
> > > refreshes the Registration for you and keeps doing it unless you
> > > de-Register.  This is as per RFC 3261 and is perfectly ok.
> > >             Yes, if you do need to customize for your UA for every
> > > registration refresh, you will need to add the code you have
stated.
> But
> > > I don't think that should be a general solution to be submitted in
> the
> > > stack.
> >
> > But if an application using dum explicitly requests a registration
> > refresh with the  requestRefresh() method of the class
> > ClientRegistration maybe it would like to be notified about the
> outcome
> > of the refresh procedure... otherwise why should requestRefresh()
> method
> > exist?
> >
> >
> > > -----Original Message-----
> > > *From:* resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > > [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx]*On Behalf
Of
> > > *Sasha Youkhananov
> > > *Sent:* Thursday, November 10, 2005 4:21 PM
> > > *To:* resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > *Subject:* [reSIProcate] onSuccess for registration is called only
> ones
> > >
> > >
> > >
> > > Hello resiprocate developers.
> > >
> > >
> > >
> > > According to comments inside RegistrationHandler.hxx onSuccess ()
is
> > > supposed to be called each time when registration succeeds.
> > >
> > > Unfortunately, it doesn't happen.
> > >
> > > The callback above is called only ones when my client registers
for
> the
> > > first time. When the dum repeats registration on behalf of my
client
> > > automatically, I don't get onSuccess notifications.
> > >
> > > Moreover, I don't get this notification too even registration
> succeeds
> > > after any failure.
> > >
> > > By the way, the onFailure call-back is called each time a failure
> > occurred.
> > >
> > >
> > >
> > > I think it would be correct to add the following code to
> > >
> > > ClientRegistration::dispatch(...) in ClientRegistration.cxx:
> > >
> > >
> > >
> > >  From line 320:
> > >
> > >
> > >
> > > case Registered:
> > >
> > > case Refreshing:
> > >
> > > mState = Registered;
> > >
> > > //* the line below should be added to solve the problem
> > >
> > > mDum.mClientRegistrationHandler->onSuccess (getHandle (), msg);
> > >
> > > break;
> > >
> > >
> > >
> > > Can anybody from you be so kind to confirm this fix?
> > >
> > >
> > >
> > > Best Regards,
> > >
> > > //Sasha//
> > _______________________________________________
> > 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