On Tue, 2009-09-15 at 07:49 -0400, Carolyn Beeton wrote: > The SAA sometimes needs to reject an incoming NOTIFY for a client > subscription (e.g. when two sets simultaneously attempt to "seize" the > same appearance (line key)). > > Initially I did this by implementing a MessageObserver, but it would > be much cleaner if I could configure the SipSubscribeClient to not > automatically OK NOTIFYs and instead allow the application to do it. > Would it be all right to add a boolean parameter to > SipSubscribeClient::addSubscription to set auto-OK on or off for the > subscription? SipSubscribeClient::handleNotifyRequest would do > everything it does now, except send an OK response only if the bool > autoOK was set to true.
Grumble -- That you need to do this comes from a layering violation in the SA design: using the response to the NOTIFY to indicate whether one agrees with the information presented, rather than indicating just whether one has received the information presented. But given that we can't change that... I would expand Scott's suggestion of implementing this functionality by subclassing SipSubscribeClient, but in this form: Modify SipSubscribeClient to have a method that generates the response to a received NOTIFY. The default method always generates a 200, of course. But in the SAA usage, you generate either a 200 or the appropriate failure response. This is cleaner, in that generating the NOTIFY response remains inside SipSubscribeClient (strictly speaking, its subclass), but the code can be modified to do the right thing for SAA or other applications. Dale _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
