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

Re: [reSIProcate-users] Questions regarding ServerRegistrations


...inline...

On Wed, Sep 30, 2015 at 11:53 AM, Jorge Bustamante <jbustamante@xxxxxxxxxxxxx> wrote:
Hi guys,

Regarding a ServerRegistration object using DUM with a ServerRegistrationHandler, seems like a ServerRegistration object is created when the application receives a REGISTER message, and it is destroyed when accept(...)/reject(...) is called by the application. Is there a way to delete these objects manually even if accept(...)/reject(...) was never called to avoid memory leaking?

[Scott]  Why would you like to do this?  Are you trying to just silently ignore a register message for some reason?  Note:  If you don't install a Server Registration Handler then DUM will 405 (probably a bad choice of error codes) each received REGISTER message and cleanup ServerRegistration properly.  If you are trying to do the silent ignore thing, then you should be able to just delete ServerRegistration object yourself.  You will need to also call SipStack::abandonServerTransaction though to free up the stack transaction memory for the request that will never have a response.
 

Another question is, when reject(...) is called, I don't see a way to add an extra header to the outgoing response before it gets sent through the wire. For instance, I would like to add WWW-Authenticate header in a 401 response. Is there a way to do this?

[Scott]  Various message adorning mechanisms are discussed here:
https://www.resiprocate.org/Modifying/Decorating_messages_sent

The onReadyToSend will not work for ServerRegistration, so it is out.  The Outbound Decorator approach should work.  You will need to assign an OutboundDecorator to a UserProfile then assign the userprofile to inbound ServerRegistration DialogSets, via AppDialogSet::selectUASUserProfile:  
https://www.resiprocate.org/DUM_Configuration_and_Profiles
https://www.resiprocate.org/Associating_Application_Data_with_Dialogs/DialogSets

Hope this helps!
Scott Godin
 

Regards,
Jorge Bustamante


This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. If you are not the intended recipient and have received this email in error, please notify BroadSoft, Inc. immediately by replying to this message, and destroy all copies of this message, along with any attachment, prior to reading, distributing or copying it.

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