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