[reSIProcate] (DUM) Best way to log details about a failed validation on an incoming request

Francis Joanis francis.joanis at gmail.com
Mon Feb 21 09:07:09 CST 2011


Hi guys,

I would like to log (using my application event log, so not the same as the
resip logger) when a validation fails when an incoming request is received
by the DUM.

For example, if an unsupported method is received I would like to log:

- The method that was unsupported
- Who was the sender (i.e. where this message comes from - Tuple, ...)
- Maybe other interesting things about the message as well...

The closest I got to was by having my own MasterProfile::isMethodSupported
method (so by subclassing it) but that only gave me the MethodType and not
the SipMessage itself.

Also, looking at the code that calls the various validation methods in the
DUM, not all validators end up calling a "is*Supported" in the
MasterProfile. For example, DialogUsageManager::validateRequiredOptions only
gets the list of unsupported options from the profile and thus wouldn't
enable overloading like MasterProfile::isMethodSupported did.

I currently see two options:

- Extend what is in MasterProfile so that the validation is actually
performed in there. That would enable subclassing and hooking into the
validation chain...
- Add a new handler to the DUM, like a MessageValidationHandler, that would
expose behaviors like onIncomingFailed, ...

I prefer the second option, but would like to know what you think :)
Hopefully adding a new handler wouldn't hinder performance too much.

Thanks,
Francis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20110221/8e19fa0f/attachment.htm>


More information about the resiprocate-devel mailing list